-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add neighborhood amenities to listing #1462
Conversation
✅ Deploy Preview for detroit-partners-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for detroit-public-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for detroit-storybook-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
362ee08
to
4a5ebbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have thought that this change would require additions to the backend-swagger.ts files as well. Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM post swagger 🐯
3a4d1ca
to
0c00dce
Compare
"listing", | ||
"grocery", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few things that i got while connecting with frontend that doesn't seem right to me😅
- Should that ☝️ force me to pass id, createdAt, updatedAt on frontend ?
- on listing create/edit i got error "neighborhoodAmenities should not be null or undefined"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the listing dto to make neighborhoodAmenities be optional. That way you won't get the error when creating/editing.
You shouldn't have to pass the id, createdAt, or updatedAt. I'll add a test though to make sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: good catch, I did need to add the id and timestamps to this list in order for it to work. I added a test as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, It's working now 💪
3103773
to
b878590
Compare
@ColinBuyck The swagger changes have been added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I think some extra info made its way into the migration though
await queryRunner.query(`ALTER TABLE "listings" ADD CONSTRAINT "UQ_59b4618dfbe6dca2edda375b8d3" UNIQUE ("neighborhood_amenities_id")`); | ||
await queryRunner.query(`ALTER TABLE "listings" DROP COLUMN "marketing_season"`); | ||
await queryRunner.query(`DROP TYPE "public"."listings_marketing_season_enum"`); | ||
await queryRunner.query(`ALTER TABLE "listings" ADD "marketing_season" character varying`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think marketing season is already on the listing table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been updated. I don't know how that got added. That enum hasn't changed recently or anything
b878590
to
66b7900
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pull Request Template
Issue Overview
This PR addresses #1457
Description
Adds the new backend fields for neighborhood amenities to listings. These include "grocery", "medicalCenter", "park", "pharmacy", and "senior center"
How Can This Be Tested/Reviewed?
A new listing has been created in the seeded data called "Test: Neighborhood Amenities". This property has the neighborhood amenities field filled out. All but "senior center" has at least some text in it. Also, the "park" field has a large amount of text.
Checklist:
yarn generate:client
and/or created a migration if I made backend changes that require themReviewer Notes:
Steps to review a PR:
On Merge:
If you have one commit and message, squash. If you need each message to be applied, rebase and merge.