Skip to content
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

fix: adding home type to model #1502

Merged
merged 11 commits into from
Nov 23, 2022
Merged

fix: adding home type to model #1502

merged 11 commits into from
Nov 23, 2022

Conversation

ColinBuyck
Copy link
Collaborator

@ColinBuyck ColinBuyck commented Nov 14, 2022

Pull Request Template

Issue Overview

This PR addresses #1479

  • This change addresses the issue in full
  • This change addresses only certain aspects of the issue
  • This change is a dependency for another issue
  • This change has a dependency from another issue

Description

This PR adds home types to the listing model and handles updating/viewing this information on the partner's side.

How Can This Be Tested/Reviewed?

This can be reviewed by logging into the partner's side and then selecting a listing. View the home type in the Unit Section, click edit, update it, and ensure that the new information is reflected in that same Unit Section.

Checklist:

  • My code follows the style guidelines of this project
  • I have added QA notes to the issue with applicable URLs
  • I have performed a self-review of my own code
  • I have reviewed the changes in a desktop view
  • I have reviewed the changes in a mobile view
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have assigned reviewers
  • I have run yarn generate:client and/or created a migration if I made backend changes that require them
  • I have exported any new pieces added to ui-components
  • My commit message(s) is/are polished, and any breaking changes are indicated in the message and are well-described
  • Commits made across packages purposefully have the same commit message/version change, else are separated into different commits

Reviewer Notes:

Steps to review a PR:

  • Read and understand the issue, and ensure the author has added QA notes
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Also review the acceptance criteria on the Netlify deploy preview (noting that these do not yet include any backend changes made in the PR)
  • Either explicitly ask a clarifying question, request changes, or approve the PR if there are small remaining changes but the PR is otherwise good to go

On Merge:

If you have one commit and message, squash. If you need each message to be applied, rebase and merge.

@netlify
Copy link

netlify bot commented Nov 14, 2022

Deploy Preview for detroit-partners-dev ready!

Name Link
🔨 Latest commit 5ea6608
🔍 Latest deploy log https://app.netlify.com/sites/detroit-partners-dev/deploys/637c068f4772330009147f2a
😎 Deploy Preview https://deploy-preview-1502--detroit-partners-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 14, 2022

Deploy Preview for detroit-public-dev ready!

Name Link
🔨 Latest commit 5ea6608
🔍 Latest deploy log https://app.netlify.com/sites/detroit-public-dev/deploys/637c068fdbefe500090d29ea
😎 Deploy Preview https://deploy-preview-1502--detroit-public-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 14, 2022

Deploy Preview for detroit-storybook-dev ready!

Name Link
🔨 Latest commit 5ea6608
🔍 Latest deploy log https://app.netlify.com/sites/detroit-storybook-dev/deploys/637c068f5b7ac500096c7d07
😎 Deploy Preview https://deploy-preview-1502--detroit-storybook-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm"

export class addHomeTypes1668556487187 implements MigrationInterface {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have anticipated seeing a type created here for the home_type instead of character varying as happened here: https://github.com/CityOfDetroit/bloom/blob/dev/backend/core/src/migration/1649374032458-marketing-season.ts

Was this migration auto generated?

@@ -175,6 +180,23 @@ const FormUnits = ({ listing, unitsSummaries, setSummaries, disableUnitsAccordio
grid={false}
separator
>
<GridSection columns={3} className={"pb-10"}>
<GridCell>
<p className="field-label">{t("listings.homeType")}</p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to wrap this in <ViewItem> so the styling is consistent elsewhere, where we usually wraps selects in that component

@emilyjablonski
Copy link
Collaborator

emilyjablonski commented Nov 21, 2022

Screen Shot 2022-11-21 at 2 46 36 PM

Just two questions for you, and then the state above with a home type and no units is sort of awkward (I know it wasn't part of the designs, and would be an unusual state to be in, but I'm wondering if we can add a heading above the `None` indicating there are no units).

@ColinBuyck ColinBuyck changed the title fix: wip adding home type to model fix: adding home type to model Nov 21, 2022
@ColinBuyck
Copy link
Collaborator Author

@emilyjablonski Thanks for the feedback! All of those comments should be addressed with the most recent commit 🐟

Copy link
Collaborator

@emilyjablonski emilyjablonski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌲

Copy link
Collaborator

@ludtkemorgan ludtkemorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦖

@ColinBuyck ColinBuyck merged commit c3eefa2 into dev Nov 23, 2022
@ColinBuyck ColinBuyck deleted the 1479/home-types-partners branch November 23, 2022 21:55
ludtkemorgan pushed a commit that referenced this pull request Dec 6, 2022
* fix: wip adding home type to model

* fix: update for swagger changes

* fix: backend swagger updates

* fix: wip migration

* fix: updated migration, detail + summary view

* fix: clean up

* fix: seeding + figma alignment

* fix: added null default

* fix: cleanup per pr feedback

Co-authored-by: Yazeed Loonat <yazeedloonat@gmail.com>
ludtkemorgan added a commit that referenced this pull request Dec 13, 2022
* feat: change management company to contact information (#1507)

* feat: add verified at field to listings (#1501)

* fix: adding home type to model (#1502)

* fix: wip adding home type to model

* fix: update for swagger changes

* fix: backend swagger updates

* fix: wip migration

* fix: updated migration, detail + summary view

* fix: clean up

* fix: seeding + figma alignment

* fix: added null default

* fix: cleanup per pr feedback

Co-authored-by: Yazeed Loonat <yazeedloonat@gmail.com>

* 1482/home type filter (#1510)

* fix: wip adding home type to model

* fix: update for swagger changes

* fix: backend swagger updates

* fix: wip migration

* fix: updated migration, detail + summary view

* fix: clean up

* fix: seeding + figma alignment

* fix: added null default

* fix: home type filtering

* fix: merge clean up

* fix: single looping on home types

Co-authored-by: Yazeed Loonat <yazeedloonat@gmail.com>

* 1480/home types labels (#1511)

* feat: add home type label to listing card

* feat: add home type label to listing view

* feat: add home type tag to existing listing tags array

* feat: remove redundant homeType prop from ListingCard

* feat: add translations (#1513)

* feat: change leasing agent contact translations (#1517)

Co-authored-by: Krzysztof Zięcina <kriss.kontakt@gmail.com>
Co-authored-by: ColinBuyck <53269332+ColinBuyck@users.noreply.github.com>
Co-authored-by: Yazeed Loonat <yazeedloonat@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants