Skip to content

Commit

Permalink
2022-07-05 release (#1371)
Browse files Browse the repository at this point in the history
* feat(backend): fix unit group model update tests

* feat: occupancy tables wip

* build: local db to bloom_detroit

* fix: add summary in seed

* refactor: rename unitssummary, add needed fields

* fix: rebase issues

* Fixes Partner Portal Users (#1009)

* fix: partner portal users

* style: remove console log

* feat: updates user list to filter by isPortalUser

* feat: adds hud and mshda 2021 ami charts (#1020)

* feat: adds hud and mshda 2021 ami charts

* fix: remove mixed content assets from seeds

* fix: adds Detroit jurisdiction by default for partners

* fix: fixes file name to include dto

* feat: hides/prevents partner publish (#1021)

* feat: hides/prevents partner publish

* fix: pr requests and user update

* fix: issues exposed by tests

* feat: occupancy table based on unit groups (#1023)

* feat: occupancy table based on unit groups

* test: add tests

* test: update strings

* refactor: remove SRO strings

* test: more test coverage

* fix: make range translated

* fix: pre-existing ListingView template issues

* fix: patch old unit summary table pieces

Co-authored-by: Sean Albert <[email protected]>

* feat: adding partner unit groups

* feat: adds programs to Detroit (#1022)

* feat: adds programs to Detroit

* feat: adds programs to public site

* style: removes comment

* feat: remove Community Type section from form and detail

* refactor: updates program titles

* feat: updates for program descriptions per Safiya

* feat: adding save functionality

* fix: updates for editing

* 987/import listings basic (#1019)

* feat(backend): add import listing basic

* chore: remove todo notes from scripts

* feat: adds programs to Detroit (#1022)

* feat: adds programs to Detroit

* feat: adds programs to public site

* style: removes comment

* feat: remove Community Type section from form and detail

* refactor: updates program titles

* feat: updates for program descriptions per Safiya

* test: fix backend unit tests

* test: fix backend tests

Co-authored-by: Sean Albert <[email protected]>

* feat: show a11y features on public site (#994)

* feat: show a11y features on public site

* fix: do not allow feature headers to overlap content

* fix: update base fetch

* refactor: cleanup

* fix: ami chart now saves correctly

* feat(backend): update units summary model (#997)

* feat(backend): update units summary model

* style: formatting

* feat: backend-swagger with unit summary updates

* refactor: comment out mistyped scripts

* fix: fixup base view

* feat(backend): fix unit group model update tests

* feat: occupancy tables wip

* fix: add summary in seed

* refactor: rename unitssummary, add needed fields

* fix: rebase issues

* fix: fixes file name to include dto

* feat: occupancy table based on unit groups (#1023)

* feat: occupancy table based on unit groups

* test: add tests

* test: update strings

* refactor: remove SRO strings

* test: more test coverage

* fix: make range translated

* fix: pre-existing ListingView template issues

* fix: patch old unit summary table pieces

Co-authored-by: Sean Albert <[email protected]>

* 987/import listings basic (#1019)

* feat(backend): add import listing basic

* chore: remove todo notes from scripts

* feat: adds programs to Detroit (#1022)

* feat: adds programs to Detroit

* feat: adds programs to public site

* style: removes comment

* feat: remove Community Type section from form and detail

* refactor: updates program titles

* feat: updates for program descriptions per Safiya

* test: fix backend unit tests

* test: fix backend tests

Co-authored-by: Sean Albert <[email protected]>

* 992/public primary unit group (#1024)

* feat: adds unit group summary to listing detail

* feat: adds household max income summary to public

* test: adds placheholders for getUnitGroupSummary and getHouseholdMaxIncomeSummary

* refactor: ListingView unit summaries to helpers

* fix: hide sections if no data on ListingView

* test: public build, ui-component tests, backend tests

* feat(backend): add import unit groups script (#1018)

* feat(backend): add import unit groups script

* feat(backend): Add unit groups import script

* style: import-unit-groups cleanup

Co-authored-by: Michal Plebanski <[email protected]>
Co-authored-by: Sean Albert <[email protected]>

Co-authored-by: Michal Plebanski <[email protected]>
Co-authored-by: Sean Albert <[email protected]>
Co-authored-by: Emily Jablonski <[email protected]>
Co-authored-by: Emily Jablonski <[email protected]>
Co-authored-by: Yazeed Loonat <[email protected]>

* fix: updates per emily

* fix: updates per emily pt 2

* fix: fixes to the merge

* Listing verification (#1029)

* feat: starting verified piece

* feat: verify alert and scrollTo

* feat: adds listing verificatoin to frontend

Co-authored-by: Yazeed Loonat <[email protected]>

* fix: updates for sean and emily

* fix: new listing should open now

* fix: table issues

* fix: hmi column sort, hmi link

* fix(backend): import scripts (#1031)

* fix(backend): import scripts

* style: linter

Co-authored-by: Michal Plebanski <[email protected]>
Co-authored-by: Sean Albert <[email protected]>

* fix: updates for 2 and 3

* test: updates to test for data-test-id

* fix: unit group reload when refocus

* fix: readds useEffect dependency checks

* fix: can delete last group

* fix: now can save without ami info

* fix: for when rent value is missing

* fix: occupancy max 8, selects can be deselected

* fix: add hearing mobility visual to a11y features (#1032)

* fix: removing placeholder

* fix: readding label, removing placeholder

* fix: was too specific

* fix(backend): import script percentageOfIncomeValue retrieval logic (#1034)

Co-authored-by: Michal Plebanski <[email protected]>

* fix: ami percentage

* fix: listing view detail list order

* fix: partner listing grid address column

* fix: properly set monthlyRentDeterminationType in import script

* fix: account for space after comma in spreadsheet for split types

* fix: hide hmi link if no hmi table (#1035)

* fix: hide hmi link if no hmi table

* fix: hide completely

* feat: catch up for migrations (#1030)

feat: catch up for migrations (#1030)

* fix: fix for when rent range was empty (#1038)

* fix: styling issues in features section (#1039)

* fix: preview close alert style fixes (#1040)

* fix: stray zero if no programs (#1042)

* fix: pagination fix for partner listing grid (#1041)

* fix: pagination fix for partner listing grid

* fix: removes unit groups second query and from inner filter

* test: fix for tests

* fix: listings e2e tests

Co-authored-by: Sean Albert <[email protected]>

* fix: update neighborhood list, unit type string

* 1045/allows re-request confirmation on partners (#1047)

* feat: allows re-request confirmation on partners

* fix: linting fixes (#1057)

fix: linting fixes

* fix: fixes pagination issue on detroit user grid (#1063)

* feat(backend): update listing filters (#1050)

* feat(backend): update listing filters

* fix: fix for partner and public builds

* fix(backend): listing bedrooms filter

* fix(backend): num_bedrooms filter fix

Co-authored-by: Michal Plebanski <[email protected]>
Co-authored-by: Yazeed Loonat <[email protected]>

* feat: Update listing table columns (#1067)

* feat: Update listing table columns

Closes #1008

* feat: Add per page qty select field

Closes #1008

* style: removes console log

Co-authored-by: Sean Albert <[email protected]>

* feat: filters to show only active listings (#1070)

* feat(backend): add marketingType to Listing entity

* Bump actions/setup-node from 2.5.0 to 3 (#999)

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.0 to 3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.5.0...v3)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: frontend type fix

* fix: change verified string (#1088)

* fix: select programs working with single jurisdiction (#1100)

* Bump actions/checkout from 2 to 3 (#1010)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: verify link should work on second application tab (#1068)

* fix: verify link should work on second application tab

* refactor: add new state

* fix: pr feedback

* feat: exposing leasing company website (#1069)

* feat: exposing leasing company website

* fix: no longer href on empty website

* fix: adding url validation

* fix: updates per sean

* feat: adds unit summaries to listings list to backend (#1077)

* feat: adds unit summaries to listings list

* fix: addresses issues noted in PR

* fix: cleans up detroit specific seeds

* fix: fixes issue with public latestListings filter

* fix: backend listing test unit groups

* fix: unit groups on partners types

* 78/favorites refactor test2 (#1089)

* initial setup of backend

initial setup with backend now including array of strings of just the Listing ID.  Verify e2e testing works as well.

* Implemented ListingCard fav

Implemented favorite buttons and features.  Only works after initial refresh.  Failure to get profile.preferences on first call.

* updated to include preference-entity default

* rename useState elements

* console.log cleanup on ListingCard

* Fix code style issues with Prettier

* useState updated and remove console logs

* feat: adding favorite feature

* fix: updates per emily and sean

* feat: moving user-prefence into their own pathway

* test: updates for tests

* test: fix for backend spec tests

* build: updates local db to bloom_detroit

* docs: update backend env template

* fix: updates to favorites

* fix: updates for styling and per sean

* fix: removing duplicate UsePipe

* test: fixes failing tests

* feat: adds UserPreferenceAuthzGuard

* fix: updates per sean

* feat: updates userPreferences to take user id

* fix: styling update per sean

* fix: styling updates per emily

* feat: adding toast for favorite

* test: fixes for tests

* fix: build fix

* fix: un-narrowing favorite toast

* feat: adds aria-live to favorites

* fix: getListings call on index

* fix: adds (un)favorited language

* fix: removes unused AlertBox element

* feat: exposing favorites on dashboard

* Merge remote-tracking branch 'detroit/dev' into 78/favorites_refactor_test2

* fix: merge fix

* feat: updates AG_PER_PAGE_OPTIONS

Co-authored-by: pfeeny5 <[email protected]>
Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Sean Albert <[email protected]>
Co-authored-by: Emily Jablonski <[email protected]>

* feat: load overlay to partner listings grid (#1116)

* feat: load overlay to partner listings grid

* feat: agpage hides total items when no items

* feat: disables overdue listings status cron (#1109)

* feat: disables overdue listings status cron

* style: removes commented out code

* feat: Remove signup subscription fields (#1112)

* feat: Add summary tables into the listing (#1118)

* feat(backend): create property.region from property.neighborhood (#1110)

* feat(backend): create property.region from property.neighborhood

* feat(backend): update neighborhood migration script

Co-authored-by: Michal Plebanski <[email protected]>
Co-authored-by: Sean Albert <[email protected]>

* fix: about page content edit and margin top and bottom fix (#1133)

* fix: about page content and margin top and bottom

* fix: add partners list and remove copy from non-english json files

* fix: remove json keys entirely

* feat: updated content & styles on homepage, footer

* fix: move new copy to translations

* feat: update email copy (#1135)

* feat: update email copy

* fix: update email service test

* feat: add comma

* fix: comma unit test fail

* fix: unit test comma

* feat: can add a marketing status to a listing in partners (#1128)

* feat: can add a marketing status to a listing in partners

* fix: mobile fix

* fix: fix migration to check for new object (#1139)

* 2022-04-06 sync upstream (#1132)

* chore: merge upstream/master backend

* chore: merges upstream/master ui-components

* chore: merge upstream/master sites/partners

* feat: flattens translations

* chore: merge upstream/master shared-helpers

* fix: address issues with ui-components merge

* fix: partners merge issues

* chore: merge upstream/master sites/public

* test: updates listing order by tests

* test: updates listing e2e tests

* test: adds script for test to package.json

* fix: uptake listing card

* fix: prop updates for uptaking new listing card (#1136)

* fix: prop updates for uptaking new listing card

* fix: styling updates to the home page listing cards

* fix: tag color

* style: updates horizontal scroll margins

Co-authored-by: Sean Albert <[email protected]>

* fix: duplicate DetailApplicationAddress import

* fix: add missing translations and style cleanup

Co-authored-by: Emily Jablonski <[email protected]>
Co-authored-by: Emily Jablonski <[email protected]>

* feat: update summary tables and tags with coming soon (1076) (1098) (1074) (#1131)

* fix: listing list dupes in pagination (#1140)

* fix: listing list dupes in pagination

* test: updates listings e2e tests

* fix: managementwebsite url seeds

* feat: add 100 to ag page options (#1149)

* feat: Add .5 and 1.5 bathroom options to min and max dropdown in Add … (#1113)

* feat: disable mfa for Detroit (#1148)

* fix: adds check for unitSummaries?.unitGroupSummary on listing (#1156)

* 973/favorites on dashboard (#1095)

* initial setup of backend

initial setup with backend now including array of strings of just the Listing ID.  Verify e2e testing works as well.

* Implemented ListingCard fav

Implemented favorite buttons and features.  Only works after initial refresh.  Failure to get profile.preferences on first call.

* updated to include preference-entity default

* rename useState elements

* console.log cleanup on ListingCard

* Fix code style issues with Prettier

* useState updated and remove console logs

* feat: adding favorite feature

* fix: updates per emily and sean

* feat: moving user-prefence into their own pathway

* test: updates for tests

* test: fix for backend spec tests

* build: updates local db to bloom_detroit

* docs: update backend env template

* fix: updates to favorites

* fix: updates for styling and per sean

* fix: removing duplicate UsePipe

* test: fixes failing tests

* feat: adds UserPreferenceAuthzGuard

* fix: updates per sean

* feat: updates userPreferences to take user id

* fix: styling update per sean

* fix: styling updates per emily

* feat: adding toast for favorite

* test: fixes for tests

* fix: build fix

* fix: un-narrowing favorite toast

* feat: adds aria-live to favorites

* fix: getListings call on index

* fix: adds (un)favorited language

* fix: removes unused AlertBox element

* feat: exposing favorites on dashboard

* Merge remote-tracking branch 'detroit/dev' into 78/favorites_refactor_test2

* fix: merge fix

* fix: updates per emily

* fix: updates per emily and jesse

* fix: reduces weird re-renders

* fix: updates per emily

* fix: enforces log in requirements

* style: removes console log

* fix: favorite pagination

* fix: issue with initial favoriting

* feat: adds classNames to LoadingOverlay

Co-authored-by: pfeeny5 <[email protected]>
Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Sean Albert <[email protected]>
Co-authored-by: Emily Jablonski <[email protected]>

* fix: homepage layout/copy

* feat: show tags on listing cards for community programs, a11y (#1146)

* feat: show tags on listing cards for community programs, a11y

* fix: build fix

* refactor: pr feedback

* feat: adds sorting to programs in listing tags

Co-authored-by: Sean Albert <[email protected]>

* fix: improve presentation of the City regions section

* Feature/region enum (#1137)

* feat(backend): add region Enum to listing dtos

* feat: Add region select input

Closes #1097

* feat: Add region into the listing view

Closes #1097

* feat: Update tests

Closes #1097

Co-authored-by: Michal Plebanski <[email protected]>
Co-authored-by: Sean Albert <[email protected]>

* fix: update styling of coming soon tag (#1154)

* fix: update styling of coming soon tag

* refactor: pr review

* fix: refactor

* 1091/listing sort order (#1157)

* feat: updates listing sort order to coming soon

* fix: fixes public listing pagination

* fix: wrap DashBlock anchor tag in Link component to display selected … (#1159)

* fix: wrap DashBlock anchor tag in Link component to display selected language

* fix: swap Link for LinkComponent

* fix: nested anchor tags

* chore: replace hero background image (for now)

* fix: eslint errors in dev (#1163)

* fix: eslint errors in dev

* style: eslint next line

* 1115/min max validation (#1155)

* feat: min max validation errors for Add Unit Group form

* fix: console warnings for faulty validation

* feat: add instant validation for all  min and max fields

* style: remove unnecessary

* change non-dropdown min max fields to onBlur

* move error strings to partners override

* fix: error when passing empty string as phone number to usToIntlPhone… (#1160)

* fix: error when passing empty string as phone number to usToIntlPhone helper

* style: prettier

* feat: update IntlToUsPhone and update both types to include null

* fix: retrigger checks

* style: run prettier

Co-authored-by: Emily Jablonski <[email protected]>

* feat(backend): update how order by comingSoon works (#1174)

* feat(backend): update how order by comingSoon works

* fix: marketingDate order dir

* fix: forgot password empty warning and two minor style changes (#2680)

Co-authored-by: Michal Plebanski <[email protected]>
Co-authored-by: Sean Albert <[email protected]>

* fix: coming soon tag color on listing detail page (#1170)

* fix: cannot update waitlist status to open (#1171)

* feat: new verified tag icon (#1172)

* feat: add new sign up link to home page (#1173)

* feat: add new sign up link to home page

* fix: open link in a new tab

* style: add void before trigger functions to avoid eslint errors (#1178)

* style: Arabic RTL layout changes (#1166)

* style: remove text-align from page header so rtl can display properly

* feat: savepoint aside no longer absolute positioned, still need more styling edits

* style: responsive element widths

* style: swap empty div tags with <>

* style: cleanup temp classes

* style: cleanup commented

* listing process separated into component (needs to move to ui components)

* feat: ListingProcess component and rtl padding swap

* feat: ListingProcess component

* fix: rtl workaround

* style: change prop types

* refactor: move ListingProcess component back to public

* refactor: git re-add component

* refactor: ListingProcess back to ListingView

* style: remove unnecessary

* feat: tooltip component

* * feat: updates to UI of public listing filters (#1138)

* 1058/updated public listing filters (#1138)

* feat: fixes backend to filter properly

* fix: some touch ups

* fix: updates per emily

* fix: updates per emily

* fix: fixes for tests

* fix: updates per emily

* fix: matching filters to mocks

* fix: remove test class

* fix: updates per emily

* fix: reset fix

* fix: fix for the tests

* fix: modifying the region filter to be an OR

* fix: test updates

Co-authored-by: Emily Jablonski <[email protected]>

* 1083/header hover issues (#1177)

* fix: improved hover and dropdown menu alignment

* removed unnecessary comments

* fix: update padding issues

* fix: centering dropdown menu

* fix: new approach with visual regressions addressed

* fix: add leasing agent address field back to listing form (#1195)

* 1168/arabic listing section overlap (#1184)

* style: rtl css refactors for listing containers

* style: rtl friendly border

* style: desktop media queries

* Update ui-components/src/global/headers.scss

Co-authored-by: Emily Jablonski <[email protected]>

Co-authored-by: Emily Jablonski <[email protected]>

* fix: check for empty translations before sending to google translate service (#1191)

* 1167/page-not-found-ui (#1185)

* style: white text and rm yellow background from button on Page Not Found

* style: remove hover border

* style: conditional rendering of Hero components

* style: remove unnecessary

* style: conditional styling without using new props

* style: titleClassName prop

* feat: default what to expect text and additional what to expect field (#1145)

* fix: authservice.token data null issue (#2703) (#1197)

* fix: show street2 for addresses (#1209)

* fix: show street2 for addresses

* test: fixup tests

* feat: set default what to expect text for coming soon listings (#1210)

* fix: update homepage subtext copy (#1217)

* fix: remove link to eligibility calculator (#1216)

* fix: Fix tooltip visibility (#1212)

* Removes listing queue imports (#1211)

* fix: removes listing queue imports

* feat: removes bull module from listings

* feat: adds new filter, fix region (#1214)

* fix: content update (#1220)

* style: listing page rtl css changes (#1221)

* style: rtl css changes

* style: one more pr > pe since it's here

* style: rtl accessibility button

* fix: fixes bedrooom and accessibility filters

* fix: fixes bedrooom and accessibility filters

* fix: vacant unit/waitlist filter fixes

* style: filtered page cleanup

* fix: test fix

* fix: update for availability filter

* fix: update per emily

Co-authored-by: Sean Albert <[email protected]>

* 1090/resources page (#1181)

* feat: add a new Resources page

* fix: header spacing and phone links

* chore: use local components for Additional Resources

Co-authored-by: Yazeed Loonat <[email protected]>

* chore: refactor Resources to use per-card md files

* chore: remove full resources page

Co-authored-by: Yazeed Loonat <[email protected]>

* 2022-05-03 sync main (#1228)

* 2022-03-10 release (#1044)

* 2022-02-10 core (#982)

* fix: retnal assistance eror message

* Preferences cleanup (#1947)

* feat(backend): preferences cleanup

BREAKING CHANGE: Preferences are now M-N relation with a listing and have an intermediate table with ordinal number

* refactor(backend): preferences deduplication

So far each listing referenced it's own unique Preferences. This change introduces Many to Many
relationship between Preference and Listing entity and forces sharing Preferences between listings.

* feat(backend): extend preferences migration with moving existing relations to a new intermediate tab

* feat(backend): add Preference - Jurisdiction ManyToMany relation

* feat: adapt frontend to backend changes

* fix(backend): typeORM preferences select statement

* fix(backend): connect preferences with jurisdictions in seeds, fix pref filter validator

* fix(backend): fix missing import in preferences-filter-params.ts

* refactor: rebase issue

* feat: uptake jurisdictional preferences

* fix: fixup tests

* fix: application preferences ignore page, always separate

* Remove page from src/migration/1633359409242-add-listing-preferences-intermediate-relation.ts

* fix: preference fetching and ordering/pages

* Fix code style issues with Prettier

* fix(backend): query User__leasingAgentInListings__jurisdiction_User__leasingAgentIn specified more

* fix: perferences cypress tests

Co-authored-by: Emily Jablonski <[email protected]>
Co-authored-by: Sean Albert <[email protected]>
Co-authored-by: Lint Action <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: updates household member count (#2112)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: updates household member count

picked 3dee0f7d676ff42d546ecf83a17659cd69d7e1bc

* fix: reverts preferences to re-add as breaking/major bump

* fix: reverts preferences to re-add as breaking/major bump

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* refactor: listing preferences and adds jurisdictional filtering

BREAKING CHANGE: updates preference relationship with listings

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: Updates lastName on application save

* docs: Update changelog

* Fix code style issues with Prettier

* chore(release): version

 - @bloom-housing/[email protected]

* fix: a11y color contrast issues with tint on ImageCard component (#2074)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* feat: two new common app questions - Household Changes and Household Student (#2070)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: household member cypress test (#2113)

* chore(release): version

 - @bloom-housing/[email protected]

* fix: SiteHeader visual issues with long menu bars (#2068)

* feat: jurisdictional email signatures (#2111)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: don't send email confirmation on paper app submission (#2110)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* 1838/ami chart jurisdictionalized (#2102)

* fix: jurisdictionalizes ami charts on partners

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* feat: Updates application confirmation numbers (#2072)

* feat: Updates application confirmation numbers

* docs: Update changelog

* feat: adds confirmation number to csv export

Co-authored-by: Sean Albert <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: updates lastName on application save

picked from aff87ec99ad2fbd4a1f9a6853157ea7770f85a56

* fix(backend): make it possible to filter portal users in /users endpoint (#2078)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* Revert "refactor: listing preferences and adds jurisdictional filtering"

This reverts commit 9f661b43921ec939bd1bf5709c934ad6f56dd859.

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* hotfix: ensure Triton seed doesn't error out

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* 1837/preferences cleanup 3 (#2144)

* feat(backend): preferences cleanup

BREAKING CHANGE: Preferences are now M-N relation with a listing and have an intermediate table with ordinal number

* refactor(backend): preferences deduplication

So far each listing referenced it's own unique Preferences. This change introduces Many to Many
relationship between Preference and Listing entity and forces sharing Preferences between listings.

* feat(backend): extend preferences migration with moving existing relations to a new intermediate tab

* feat(backend): add Preference - Jurisdiction ManyToMany relation

* feat: adapt frontend to backend changes

* fix(backend): typeORM preferences select statement

* fix(backend): connect preferences with jurisdictions in seeds, fix pref filter validator

* fix(backend): fix missing import in preferences-filter-params.ts

* refactor: rebase issue

* feat: uptake jurisdictional preferences

* fix: fixup tests

* fix: application preferences ignore page, always separate

* Remove page from src/migration/1633359409242-add-listing-preferences-intermediate-relation.ts

* fix: preference fetching and ordering/pages

* Fix code style issues with Prettier

* fix(backend): query User__leasingAgentInListings__jurisdiction_User__leasingAgentIn specified more

* fix: perferences cypress tests

Co-authored-by: Michal Plebanski <[email protected]>
Co-authored-by: Emily Jablonski <[email protected]>
Co-authored-by: Lint Action <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* feat(backend): extend UserUpdateDto to support email change with confirmation (#2120)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* 2056/user account edit fix (#2073)

* fix: Replaces service to use newly created

* fix: Fix DOB initial values

* feat(backend): extend UserUpdateDto to support email change with confirmation

* fix: Update email form to use a new service

* fix: updates email change language

* Fix code style issues with Prettier

Co-authored-by: Michal Plebanski <[email protected]>
Co-authored-by: Sean Albert <[email protected]>
Co-authored-by: Lint Action <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* feat: add Programs section to listings management (#2093)

* feat: add Programs section to listings management

* fix: sorting on detail page

* fix: merge issues

* feat: make program fetching jurisdictional

* fix: replace preference with program

* fix: program delete removes jurisdiction

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* 2085/adds top level catchAll exception filter (#2132)

* fix: adds top level catchAll error filter

* fix: removing now unused exception filter

Co-authored-by: Sean Albert <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* feat: Change unit number field type to text (#2136)

* chore(release): version

 - @bloom-housing/[email protected]

* chore(deps): bump electron from 13.1.7 to 13.3.0 (#2137)

Bumps [electron](https://github.com/electron/electron) from 13.1.7 to 13.3.0.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v13.1.7...v13.3.0)

---
updated-dependencies:
- dependency-name: electron
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump axios from 0.21.1 to 0.21.2 (#2138)

Bumps [axios](https://github.com/axios/axios) from 0.21.1 to 0.21.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.21.1...v0.21.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(backend): improve application flagged set saving efficiency (#2147)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* 1655/invite user edit (#1982)

* feat: Update title to be also a react node

* feat: Update translations

* feat: Create reusable form to add and edit users

* feat: Add delete function

* feat(backend): Add ON UPDATE SET NULL to application-user relation

* fix: Fix type

* Fix code style issues with Prettier

* fix(jurisdictionResolverService): updates to return undefined if no jurisdictionName

* feat: Update drawer state name

* feat: Add missing translations

Co-authored-by: Michal Plebanski <[email protected]>
Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Sean Albert <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* Add a phone number column to the user_accounts table (#2134)

* Merge pull request #710 from CityOfDetroit/feature/add-phonenumber-to-user-entity

Add phone number to user accounts.

* Merge pull request #728 from CityOfDetroit/fix/modify-phone-number-test

Fix user E2E tests.

* Merge pull request #728 from CityOfDetroit/fix/modify-phone-number-test

Fix user E2E tests.

* fix: add validation groups to phoneNumber

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* refactor: make backend a peer dependency in ui-components (#2146)

* refactor: make backend a peer dependency in ui-components

* fix: fix flaky test

Co-authored-by: Sean Albert <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: updates address order (#2151)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* feat(backend): add nginx proxy-cache configuration (#2119)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* Release 11 11 21 (#2162)

* fix: fix: adding unit tests to the unit type

picked from dev 1f8d7094e508337131d3033476cd70c2befaecd0

* fix: fix: a11y color contrast issues with tint on ImageCard component

picked from dev 505929149ee1485b9fc59402a9e14ead6de5dfc4

* feat: feat: two new common app questions - Household Changes and Household Student

picked from dev 42a752ec073c0f5b65374c7a68da1e34b0b1c949

* fix: fix: SiteHeader visual issues with long menu bars

picked from dev fd6686e206b4e53ae8b6ab757ad0506eaead0d01

* feat: feat: jurisdictional email signatures

picked from dev 7a146ffb5de88cfa2950e2a469a99e38d71b33c8

* fix: fix: don't send email confirmation on paper app submission

picked from dev 7f83b70327049245ecfba04ae3aea4e967929b2a

* feat: feat: Updates application confirmation numbers

picked from dev 75cd67bcb62280936bdeeaee8c9b7b2583a1339d

* fix: fix(backend): make it possible to filter portal users in /users endpoint

picked from dev 29bf714d28755916ec8ec896366c8c32c3a227c4

* feat: feat(backend): add languages (Language[]) to Jurisdiction entity

picked from dev 9ceed24d48b14888e6ea59b421b409f875d12b01

* fix: feat(backend): try fixing SETEX redis e2e tests flakiness

picked from dev 4087c532ddba672a415a048f4362e509aba7fd7f

* feat: feat(backend): Add user delete endpoint

picked from dev a13f73574b470beff2f8948abb226a6786856480

* fix: fix: improved UX for the Building Selection Criteria drawer

picked from dev 4bd8b09456b54584c3731bcca64019dc231d0c55

* feat: feat(backend): add Program entity

picked from dev 492ec4d333cf9b73af772a1aceed29813f405ba0

* refactor: breaking: 1837/preferences cleanup

picked from dev 3ce6d5eb5aac49431ec5bf4912dbfcbe9077d84e

BREAKING CHANGE: preferences model and relationships changed

* feat: feat(backend): extend UserUpdateDto to support email change

picked from dev 3e1fdbd0ea91d4773973d5c485a5ba61303db90a

* fix: 2056/user account edit fix

picked from dev a15618c0cb548ff5b2ae913b802c9e08bb673f30

* refactor: 2085/adds top level catchAll exception filter

picked from dev aeaa63d1af1fa3d11671e169cb3bd23d356fface

* feat: feat: Change unit number field type to text

picked from dev f54be7c7ba6aac8e00fee610dc86584b60cc212d

* feat(backend): improve application flagged set saving efficiency

* fix: fix: updates address order

picked from dev 252e014dcbd2e4c305384ed552135f5a8e4e4767

* fix: sets programs to optoinal and updates versions

* chore: chore(deps): bump electron from 13.1.7 to 13.3.0

* chore: chore(deps): bump axios from 0.21.1 to 0.21.2

* fix: adds programs service

* fix: fix lisitng e2e tests

* fix: fix member tests

* fix: fixes program, preference, ami-chart de-dupe (#2169)

* chore(release): version

 - @bloom-housing/[email protected]

* fix: adds jurisdictionId to useSWR path

* fix: recalculate units available on listing update (#2150)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: recalculate units available on listing update

picked form dev f1a3dbce6478b16542ed61ab20de5dfb9b797262

* feat: feat(backend): make use of new application confirmation codes

picked from dev 3c45c2904818200eed4568931d4cc352fd2f449e

* Revert "chore(deps): bump axios from 0.21.1 to 0.21.2 (#2138)"

This reverts commit 7711604323ae2f6a1782a35f7a26176f215f6c00.

* revert: revert "chore(deps): bump axios from 0.21.1 to 0.21.2

picked from dev 2b83bc0393afc42eed542e326d5ef75502ce119c

* refactor: remove applicationAddress (#2009)

* refactor: remove applicationAddress

* docs: readme update

* test: fix backend test

* fix: db migration

* Fix code style issues with Prettier

* test(backend): fix SETEX impossible to process

Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Michal Plebanski <[email protected]>
Co-authored-by: Sean Albert <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* feat: refactor and add public site application flow cypress tests (#2118)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: sapp submission w/ no due date

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* Revert "feat(backend): add nginx proxy-cache configuration (#2119)"

This reverts commit 34d32e75ceae378a26c57f4c9b7feec8c88339e0.

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: app submission w/ no due date

picked from dev 4af1f5a8448f16d347b4a65ecb85fda4d6ed71fc

* 1975/better seed data for ami-charts (#2156)

* fix: better seed data for ami-charts

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* 2154/avance prefs (#2177)

* feat: new preferences

* feat: preference updates

* Fix code style issues with Prettier

Co-authored-by: Lint Action <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* 2154/avance prefs (#2178)

* feat: new preferences

* feat: preference updates

* Fix code style issues with Prettier

* feat: preference options bottom border

Co-authored-by: Lint Action <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]

* 2154/avance prefs III (#2179)

* feat: new preferences

* feat: preference updates

* Fix code style issues with Prettier

* feat: preference options bottom border

* feat: liveWorkLivermore preference

Co-authored-by: Lint Action <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* 1988/adds listing management cypress tests to partner portal (#2103)

* test: adds listing management tests

* test: minor tweaks

* test: big updates for LM cypress tests

* test: fixes selectors

* feat: adding partner cypress tests to pr workflow

* fix: undoing

* chore: adds latest bloom-housing packages to partners

Co-authored-by: Sean Albert <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* feat: adds new preferences, reserved community type

* feat: adds bottom border to preferences

* feat: updates preference string

* fix: preference cleanup for avance

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: preference cleanup for avance

* 1975/one month rent (#2158)

* feat: add depoist helper text

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix(backend): fix view.spec.ts test (#2175)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* refactor: removes jsonpath (#2206)

* refactor: removes jsonpath

* Fix code style issues with Prettier

Co-authored-by: Lint Action <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* 1869/application program display (#2114)

* feat: add programs step to application forms

* test: add Cypress tests for the programs step

* feat: rework the Programs page and enhance seeds

* chore: fix programs Cypress test

* fix: fixup cypress tests

* fix: update mock data

* fix: fixup mock data pt 2

* fix: type issues

* fix: bugs and simplify program data processing

Co-authored-by: Emily Jablonski <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* feat: adds jurisdictions to pref seeds (#2199)

* feat: adds jurisdictions to pref seeds

* Fix code style issues with Prettier

Co-authored-by: Lint Action <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* 1901/application program partners (#2182)

* feat: add programs step to application forms

* test: add Cypress tests for the programs step

* feat: rework the Programs page and enhance seeds

* chore: fix programs Cypress test

* feat: add programs step to application forms

* test: add Cypress tests for the programs step

* feat: rework the Programs page and enhance seeds

* chore: fix programs Cypress test

* fix: fixup cypress tests

* fix: update mock data

* fix: fixup mock data pt 2

* fix: type issues

* feat: Create programs mapper

Closes #1901

* feat: Add programs section

Closes #1901

* feat: Create details section for programs

Closes #1901

* feat: Update translations

Closes #1901

* refactor: Remove console log

Closes #1901

* refactor: Simpify code

Closes #1901

* chore: remove console log

* fix: mapProgramToApi return

Co-authored-by: Jared White <[email protected]>
Co-authored-by: Emily Jablonski <[email protected]>
Co-authored-by: Sean Albert <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* test: update program test

* chore(release): version

 - @bloom-housing/[email protected]

* feat: new demographics sub-race questions (#2109)

* feat: new demographics sub-race questions

* fix: update migration to keep data

* feat: other text boxes

* feat: wip other labels

* feat: can edit demo in partners

* fix: cleanup

* feat: csv formatting

* fix: type issue

* feat: remove gender and sexual orientation

* fix: add test id

* fix: more test ids

* fix: select by checkboxes

* fix: dont use select

* fix: data

* fix: add tests, fixup other option

* Fix code style issues with Prettier

* fix: remove unneeded dependencies

* test: add additional test

* Fix code style issues with Prettier

* test: change test id attribute

* chore: cleanup formatApplicationData imports

Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Sean Albert <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* feat: updates email confirmation for lottery (#2200)

* feat: updates email confirmation for lottery

* Fix code style issues with Prettier

Co-authored-by: Lint Action <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: add ariaHidden to Icon component

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: add ariaLabel prop to Button component

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: change the yes/no radio text to be more descriptive (#2208)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: remove alameda reference in demographics (#2209)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* refactor: remove applicationAddress

picked from dev bf10632a62bf2f14922948c046ea3352ed010f4f

* feat: refactor and add public site application flow cypress tests

picked from dev 9ec0e8d05f9570773110754e7fdaf49254d1eab8

* feat: better seed data for ami-charts

picked from dev d8b1d4d185731a589c563a32bd592d01537785f3

* feat: adds listing management cypress tests to partner portal

* fix: listings management keep empty strings, remove empty objects

picked from dev c4b1e833ec128f457015ac7ffa421ee6047083d9

* feat: one month rent

picked from dev 883b0d53030e1c4d54f2f75bd5e188bb1d255f64

* test: view.spec.ts test

picked from dev 324446c90138d8fac50aba445f515009b5a58bfb

* refactor: removes jsonpath

picked from dev deb39acc005607ce3076942b1f49590d08afc10c

* feat: adds jurisdictions to pref seeds

picked from dev 9e47cec3b1acfe769207ccbb33c07019cd742e33

* feat: new demographics sub-race questions

picked from dev 9ab892694c1ad2fa8890b411b3b32af68ade1fc3

* feat: updates email confirmation for lottery

picked from dev 1a5e824c96d8e23674c32ea92688b9f7255528d3

* fix: add ariaHidden to Icon component

picked from dev c7bb86aec6fd5ad386c7ca50087d0113b14503be

* fix: add ariaLabel prop to Button component

picked from dev 509ddc898ba44c05e26f8ed8c777f1ba456eeee5

* fix: change the yes/no radio text to be more descriptive

picked from dev 0c46054574535523d6f217bb0677bbe732b8945f

* fix: remove alameda reference in demographics

picked from dev 7d5991cbf6dbe0b61f2b14d265e87ce3687f743d

* chore: release version

picked from dev fe82f25dc349877d974ae62d228fea0354978fb7

* feat: ami chart jurisdictionalized

picked from dev 0a5cbc88a9d9e3c2ff716fe0f44ca6c48f5dcc50

* refactor: make backend a peer dependency in ui-components

picked from dev 952aaa14a77e0960312ff0eeee51399d1d6af9f3

* feat: add a phone number column to the user_accounts table

picked from dev 2647df9ab9888a525cc8a164d091dda6482c502a

* chore: removes application program partners

* chore: removes application program display

* Revert "chore: removes application program display"

This reverts commit 14825b4a6c9cd1a7235e32074e32af18a71b5c26.

* Revert "chore: removes application program partners"

This reverts commit d7aa38c777972a2e21d9f816441caa27f98d3f86.

* chore: yarn.lock and backend-swagger

* fix: removes Duplicate identifier fieldGroupObjectToArray

* feat: skip preferences if not on listing

* chore(release): version

* fix: cannot save custom mailing, dropoff, or pickup address

* chore(release): version

* chore: converge on one axios version, remove peer dependency

* chore(release): version

* feat: simplify Waitlist component and use more flexible schema

* chore(release): version

* fix: lottery results uploads now save

* chore(release): version

* feat: add SRO unit type

* chore(release): version

* fix: paper application submission

* chore(release): version

* fix: choose-language context

* chore(release): version

* fix: applications/view hide prefs

* chore(release): version

* feat: overrides fallback to english, tagalog support

* chore(release): version

* fix: account translations

* chore(release): version

* fix: units with invalid ami chart

* chore(release): version

* fix: remove description for the partners programs

* fix: fix modal styles on mobile

* fix: visual improvement to programs form display

* fix: submission tests not running

* chore: translations (#2293)

* chore: translations (#2295)

* chore: missing translations (#2296)

* fix: prefUnits on autofill summary (#2294)

* chore: move Programs step to come after Students (#2277)

* feat: adds whatToExpect to GTrans

* chore: missing translations (#2299)

* fix: 2259/fixes idle timeout not resetting properly (#2292)

* chore(release): version

* fix: demographics howDidYouHear options (2305)

* chore(release): version

* fix: mobile notice text wrap issue (#2308)

* feat: postmark date time fields partners (#2239)

* fix: versioning issues (#2311)

* chore(release): version

* chore(backend): move libs/ to shared/utils, clean up modules (#2230)

* feat(backend): all programs to csv export (#2302)

* chore(release): version

* feat: filter partner users

* chore(release): version

* feat: adds updating open listing modal (#2288)

* fix: closed listings allowed apps (#2317)

* feat: 2165/rosefield preference updates (#2386)

* chore(release): version

* Revert "chore(release): version"

This reverts commit 7c414ca7f8c5709e4ff19b94e3fb1089bdc45e97.

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* feat(backend): add storing listing translations (#2215)

* feat: adds whatToExpect to GTrans (#2303)

* fix: patch issue with submit application section

* fix: patches translations for preferences (#2410)

* fix: issues with public app and readds auto save (2428)

* fix: ami charts without all households (#2430)

* fix: load blank application

* 2022-01-27 release (#2439)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix(backend): nginx with heroku configuration (#2196)

* fix(backend): nginx with heroku configuration

* feat(backend): nginx make hostname and port variable

* feat: nginx proxy updates

* feat(backend): modify proxy_pass and Host header settings

Co-authored-by: seanmalbert <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: fetchBaseListingData (#2238)

* fix: fetchBaseListingData

* fix: fetchBaseListingData

* chore(release): version

 - @bloom-housing/[email protected]

* fix: lottery results uploads now save (#2226)

* fix: lottery results uploads now save

* fix: switch to partial typing

* chore(release): version

 - @bloom-housing/[email protected]

* feat: getStaticPaths fallback blocking test

* chore(release): version

 - @bloom-housing/[email protected]

* chore: add temp logs for testing id/slug

* chore(release): version

 - @bloom-housing/[email protected]

* chore(backend): move libs/ to shared/utils, clean up modules (#2230)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* chore: add SRO unit type (#2243)

* chore: add SRO unit type to DB / translations

* chore: additional string changes to SRO

* test(backend): add SRO to unit types test

* feat: SRO unit type additions

Co-authored-by: Sean Albert <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* 2140/fix paper application submission (#2195)

* fix: fix paper application submission

* chore(release): version

 - @bloom-housing/[email protected]

* Fix code style issues with Prettier

* test: adds cypress test coverage

* fix: updates per sean

* fix: one more update

* test: fix partners unit tests

* fix: choose-language context

* chore(release): version

 - @bloom-housing/[email protected]

* fix: applications drop off address

* fix: applications/view hide prefs

* chore(release): version

 - @bloom-housing/[email protected]

* feat(backend): add storing listing translations (#2215)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix(backend): make nginx proxy use Language HTTP header in cache key (#2266)

* 2098/fix partner applications grid display (#2188)

* fix: partner applications grid display

* Fix code style issues with Prettier

* test: fix tests

* Fix code style issues with Prettier

* fix: updates to using views

* tests: add application grid test

* fix: updates per sean

* fix: one more update

Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Sean Albert <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: fixes some issues with the deployment

* Revert/2188 (#2270)

* fix: fixes some issues with the deployment

* revert: partner applications grid display

* fix: view.spec

Co-authored-by: Yazeed Loonat <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* 2098/fix partner applications grid display (#2188)

* fix: partner applications grid display

* Fix code style issues with Prettier

* test: fix tests

* Fix code style issues with Prettier

* fix: updates to using views

* tests: add application grid test

* fix: updates per sean

* fix: one more update

Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Sean Albert <[email protected]>

* feat(backend): add listings closing routine (#2213)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* feat(backend): add user password expiration

* fix: Remove description for the partners programs (#2234)

Closes #1901

* chore(release): version

 - @bloom-housing/[email protected]

* 2227/lock login attempts frontend (#2260)

* feat: Add new translations

Closes #1927

* refactor: Make title as optional

Closes #1927

* feat: Update login alert text

Closes #1927

* fix: Use translation, instead of hardcoded text

Closes #1927

* feat: Add translation

Closes #1927

* feat: Update type name

Closes #1927

* feat: Add new alerts

Closes #1927

* fix: Fix translation

Closes #1927

* fix(AlertBox.tsx): Fix close icon placement

Closes #1927

* feat: Create helper to catch network errors

Closes #1927

* feat: Add translations

Closes #1927

* feat: Create reusable sign-in form

Closes #1927

* refactor(sign-in page, public and partners): Update sign-in pages to use reusable form

BREAKING CHANGE: sign-in pages have been updated

Closes #1927

* Fix code style issues with Prettier

* fix: fixes tests and also issue with user grid

* fix: fixes linting error

* feat(backend): add appropriate http exception for password outdated login failure

* fix: Fix modal styles on mobile (#2280)

Closes #2253

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: visual improvement to programs form display (#2276)

* chore(release): version

 - @bloom-housing/[email protected]

* fix: submission tests not running (#2282)

* chore(release): version

 - @bloom-housing/[email protected]

* feat: overrides fallback to english, tagalog support (#2262)

* chore: allow work-in strings to take jurisdiction name

* feat: add support for tagalog

* Fix code style issues with Prettier

* feat: tagalog language

* feat: translations precedence includes en overrides

Co-authored-by: Lint Action <[email protected]>

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* fix: account translations (#2278)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]
 - @bloom-housing/[email protected]

* test: fixes test issues

* fix: fix sortig on applications partner grid

* chore: translations (#2293)

* chore(release): version

 - @bloom-housing/[email protected]
 - @bloom-housing/partn…
  • Loading branch information
22 people authored Jul 6, 2022
1 parent dead180 commit 0bd0782
Show file tree
Hide file tree
Showing 71 changed files with 1,255 additions and 168 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,6 @@ dump.rdb
# csv import files
backend/core/detroit-listings.csv
backend/core/detroit-listings-units.csv

# DB backups
.dump
2 changes: 1 addition & 1 deletion backend/core/scripts/import-listing-from-json-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from "fs"
import { Listing } from "../types/src/backend-swagger"

// Example usage (from within /backend/core):
// $ yarn ts-node scripts/import-listing-from-json-file.ts http://localhost:3100 [email protected]:abcdef scripts/minimal-listing.json
// $ yarn ts-node scripts/import-listing-from-json-file.ts http://localhost:3100 [email protected]:abcdef scripts/script-data/minimal-listing.json

async function main() {
if (process.argv.length < 5) {
Expand Down
46 changes: 46 additions & 0 deletions backend/core/scripts/import-section-8-info.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import * as fs from "fs"
import * as path from "path"
import CsvReadableStream from "csv-reader"
import { Connection, QueryRunner } from "typeorm"
import dbOptions from "../ormconfig"

// uses data from script-data/section-8-existing-info.csv
// from backend/core run with yarn ts-node ./scripts/import-section-8-info.ts [path to file]

/* eslint-disable-next-line @typescript-eslint/no-var-requires */
const getStream = require("get-stream")

async function main() {
const connection = new Connection(dbOptions)
await connection.connect()
const queryRunner: QueryRunner = connection.createQueryRunner()
await queryRunner.connect()

const inputRows = await getStream.array(
fs
.createReadStream(path.resolve("", "scripts/script-data/section-8-existing-info.csv"), "utf8")
.pipe(
new CsvReadableStream({
parseNumbers: true,
parseBooleans: true,
trim: true,
asObject: true,
})
)
)
const section8Rows = inputRows.reduce((acc, current) => {
if (current.section_8 === "yes") acc += `'${current.id}',`
return acc
}, "")
try {
await queryRunner.query(
//slice to remove trailing comma
`UPDATE listings set section8_acceptance = true WHERE id in (${section8Rows.slice(0, -1)})`
)
} catch (e) {
console.log({ e })
}
await queryRunner.release()
}

void main()
File renamed without changes.
273 changes: 273 additions & 0 deletions backend/core/scripts/script-data/section-8-existing-info.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export class ApplicationCsvExporterService {
// could use translations
unitTypeToReadable(type) {
const typeMap = {
SRO: "SRO",
studio: "Studio",
oneBdrm: "One Bedroom",
twoBdrm: "Two Bedroom",
Expand Down
1 change: 1 addition & 0 deletions backend/core/src/listings/dto/filter-type-to-field-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,5 @@ export const filterTypeToFieldMap: Record<keysWithMappedField, string> = {
barrierFreeBathroom: "listing_features.barrierFreeBathroom",
wideDoorways: "listing_features.wideDoorways",
loweredCabinets: "listing_features.loweredCabinets",
section8Acceptance: "listings.section8Acceptance",
}
12 changes: 11 additions & 1 deletion backend/core/src/listings/dto/listing-filter-params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,5 +308,15 @@ export class ListingFilterParams extends BaseFilter {
})
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
@IsString({ groups: [ValidationsGroupsEnum.default] })
[ListingFilterKeys.region]?: string
[ListingFilterKeys.region]?: string;

@Expose()
@ApiProperty({
type: Boolean,
example: "true",
required: false,
})
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
@IsBooleanString({ groups: [ValidationsGroupsEnum.default] })
[ListingFilterKeys.section8Acceptance]?: boolean
}
9 changes: 9 additions & 0 deletions backend/core/src/listings/dto/listing-utilities.dto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { OmitType } from "@nestjs/swagger"
import { ListingUtilities } from "../entities/listing-utilities.entity"

export class ListingUtilitiesDto extends OmitType(ListingUtilities, [
"id",
"createdAt",
"updatedAt",
"listing",
] as const) {}
7 changes: 7 additions & 0 deletions backend/core/src/listings/dto/listing.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { UserBasicDto } from "../../auth/dto/user-basic.dto"
import { ApplicationMethodDto } from "../../application-methods/dto/application-method.dto"
import { UnitGroupDto } from "../../units-summary/dto/unit-group.dto"
import { ListingFeaturesDto } from "./listing-features.dto"
import { ListingUtilitiesDto } from "./listing-utilities.dto"
import { ListingPreferenceDto } from "../../preferences/dto/listing-preference.dto"
import { ListingProgramDto } from "../../program/dto/listing-program.dto"
import { Column } from "typeorm"
Expand All @@ -41,6 +42,7 @@ export class ListingDto extends OmitType(Listing, [
"result",
"unitGroups",
"features",
"utilities",
] as const) {
@Expose()
@IsDefined({ groups: [ValidationsGroupsEnum.default] })
Expand Down Expand Up @@ -358,4 +360,9 @@ export class ListingDto extends OmitType(Listing, [
@Type(() => ListingFeaturesDto)
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
features?: ListingFeaturesDto

@Expose()
@Type(() => ListingUtilitiesDto)
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
utilities?: ListingUtilitiesDto
}
63 changes: 63 additions & 0 deletions backend/core/src/listings/entities/listing-utilities.entity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { Expose, Type } from "class-transformer"
import { IsBoolean, IsOptional, ValidateNested } from "class-validator"
import { ValidationsGroupsEnum } from "../../shared/types/validations-groups-enum"
import { AbstractEntity } from "../../shared/entities/abstract.entity"
import { Column, Entity, OneToOne } from "typeorm"
import { Listing } from "./listing.entity"

@Entity({ name: "listing_utilities" })
export class ListingUtilities extends AbstractEntity {
@OneToOne(() => Listing, (listing) => listing.utilities)
@Expose()
@ValidateNested({ groups: [ValidationsGroupsEnum.default] })
@Type(() => Listing)
listing: Listing

@Column({ type: "boolean", nullable: true })
@Expose()
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
@IsBoolean({ groups: [ValidationsGroupsEnum.default] })
water?: boolean | null

@Column({ type: "boolean", nullable: true })
@Expose()
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
@IsBoolean({ groups: [ValidationsGroupsEnum.default] })
gas?: boolean | null

@Column({ type: "boolean", nullable: true })
@Expose()
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
@IsBoolean({ groups: [ValidationsGroupsEnum.default] })
trash?: boolean | null

@Column({ type: "boolean", nullable: true })
@Expose()
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
@IsBoolean({ groups: [ValidationsGroupsEnum.default] })
sewer?: boolean | null

@Column({ type: "boolean", nullable: true })
@Expose()
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
@IsBoolean({ groups: [ValidationsGroupsEnum.default] })
electricity?: boolean | null

@Column({ type: "boolean", nullable: true })
@Expose()
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
@IsBoolean({ groups: [ValidationsGroupsEnum.default] })
cable?: boolean | null

@Column({ type: "boolean", nullable: true })
@Expose()
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
@IsBoolean({ groups: [ValidationsGroupsEnum.default] })
phone?: boolean | null

@Column({ type: "boolean", nullable: true })
@Expose()
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
@IsBoolean({ groups: [ValidationsGroupsEnum.default] })
internet?: boolean | null
}
19 changes: 19 additions & 0 deletions backend/core/src/listings/entities/listing.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import { ListingPreference } from "../../preferences/entities/listing-preference
import { ListingImage } from "./listing-image.entity"
import { ListingMarketingTypeEnum } from "../types/listing-marketing-type-enum"
import { ListingSeasonEnum } from "../types/listing-season-enum"
import { ListingUtilities } from "./listing-utilities.entity"

@Entity({ name: "listings" })
@Index(["jurisdiction"])
Expand Down Expand Up @@ -136,6 +137,12 @@ class Listing extends BaseEntity {
@IsBoolean({ groups: [ValidationsGroupsEnum.default] })
referralOpportunity?: boolean

@Column({ type: "boolean", nullable: true })
@Expose()
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
@IsBoolean({ groups: [ValidationsGroupsEnum.default] })
section8Acceptance?: boolean | null

// end application method booleans

@Column("jsonb")
Expand Down Expand Up @@ -617,6 +624,18 @@ class Listing extends BaseEntity {
@Type(() => ListingFeatures)
features?: ListingFeatures

@OneToOne(() => ListingUtilities, {
nullable: true,
eager: true,
cascade: true,
})
@JoinColumn()
@Expose()
@IsOptional({ groups: [ValidationsGroupsEnum.default], each: true })
@ValidateNested({ groups: [ValidationsGroupsEnum.default], each: true })
@Type(() => ListingUtilities)
utilities?: ListingUtilities

@Column({ type: "boolean", default: false, nullable: true })
@Expose()
@IsOptional({ groups: [ValidationsGroupsEnum.default] })
Expand Down
2 changes: 2 additions & 0 deletions backend/core/src/listings/listings.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { ActivityLogModule } from "../activity-log/activity-log.module"
import { UnitGroup } from "../units-summary/entities/unit-group.entity"
import { UnitType } from "../unit-types/entities/unit-type.entity"
import { Program } from "../program/entities/program.entity"
import { ListingUtilities } from "./entities/listing-utilities.entity"

@Module({
imports: [
Expand All @@ -28,6 +29,7 @@ import { Program } from "../program/entities/program.entity"
Property,
AmiChart,
ListingFeatures,
ListingUtilities,
UnitGroup,
UnitType,
Program,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export enum ListingFilterKeys {
barrierFreeBathroom = "barrierFreeBathroom",
wideDoorways = "wideDoorways",
loweredCabinets = "loweredCabinets",
section8Acceptance = "section8Acceptance",
}

export enum AvailabilityFilterEnum {
Expand Down
24 changes: 24 additions & 0 deletions backend/core/src/listings/views/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const views: Views = {
"listings.status",
"listings.assets",
"listings.isVerified",
"listings.section8Acceptance",
"jurisdiction.id",
"jurisdiction.name",
"reservedCommunityType.id",
Expand Down Expand Up @@ -43,6 +44,15 @@ const views: Views = {
"features.barrierFreeBathroom",
"features.wideDoorways",
"features.loweredCabinets",
"utilities.id",
"utilities.water",
"utilities.gas",
"utilities.trash",
"utilities.sewer",
"utilities.electricity",
"utilities.cable",
"utilities.phone",
"utilities.internet",
"listingPrograms.ordinal",
"listingsProgramsProgram.id",
"listingsProgramsProgram.title",
Expand All @@ -56,6 +66,7 @@ const views: Views = {
{ join: "listings.images", alias: "listingImages" },
{ join: "listingImages.image", alias: "listingImagesImage" },
{ join: "listings.features", alias: "features" },
{ join: "listings.utilities", alias: "utilities" },
{ join: "listings.listingPrograms", alias: "listingPrograms" },
{ join: "listingPrograms.program", alias: "listingsProgramsProgram" },
{ join: "listings.unitGroups", alias: "unitGroups" },
Expand Down Expand Up @@ -118,6 +129,7 @@ views.detail = {
"listings.waitlistOpenSpots",
"listings.customMapPin",
"listings.features",
"listings.utilities",
"buildingSelectionCriteriaFile.id",
"buildingSelectionCriteriaFile.fileId",
"buildingSelectionCriteriaFile.label",
Expand Down Expand Up @@ -209,6 +221,7 @@ views.full = {
["unitGroups.priorityType", "summaryPriorityType"],
["unitGroups.amiLevels", "unitGroupsAmiLevels"],
["listings.features", "listing_features"],
["listings.utilities", "listing_utilities"],
["listings.listingPrograms", "listingPrograms"],
["listingPrograms.program", "listingProgramsProgram"],
["listings.images", "listingImages"],
Expand All @@ -224,6 +237,7 @@ views.publicListings = {
"listings.marketingDate",
"listings.marketingSeason",
"listings.isVerified",
"listings.section8Acceptance",
"property.id",
...getBaseAddressSelect(["buildingAddress"]),
"listingImages.ordinal",
Expand All @@ -246,6 +260,15 @@ views.publicListings = {
"features.heatingInUnit",
"features.acInUnit",
"features.laundryInBuilding",
"utilities.id",
"utilities.water",
"utilities.gas",
"utilities.trash",
"utilities.sewer",
"utilities.electricity",
"utilities.cable",
"utilities.phone",
"utilities.internet",
],
leftJoins: [
{ join: "listings.property", alias: "property" },
Expand All @@ -255,6 +278,7 @@ views.publicListings = {
{ join: "listings.listingPrograms", alias: "listingPrograms" },
{ join: "listingPrograms.program", alias: "listingsProgramsProgram" },
{ join: "listings.features", alias: "features" },
{ join: "listings.utilities", alias: "utilities" },
],
}

Expand Down
4 changes: 2 additions & 2 deletions backend/core/src/listings/views/view.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe("listing views", () => {
view.getViewQb()

expect(mockQueryBuilder.select).toHaveBeenCalledTimes(1)
expect(mockQueryBuilder.leftJoin).toHaveBeenCalledTimes(11)
expect(mockQueryBuilder.leftJoin).toHaveBeenCalledTimes(12)
})

it("should map unitSummary to listings", () => {
Expand All @@ -80,7 +80,7 @@ describe("listing views", () => {

view.getViewQb()

expect(mockQueryBuilder.leftJoinAndSelect).toHaveBeenCalledTimes(33)
expect(mockQueryBuilder.leftJoinAndSelect).toHaveBeenCalledTimes(34)
})
})

Expand Down
13 changes: 13 additions & 0 deletions backend/core/src/migration/1654884722218-adding-section-8.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { MigrationInterface, QueryRunner } from "typeorm"

export class addingSection81654884722218 implements MigrationInterface {
name = "addingSection81654884722218"

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "listings" ADD "section8_acceptance" boolean`)
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "listings" DROP COLUMN "section8_acceptance"`)
}
}
29 changes: 29 additions & 0 deletions backend/core/src/migration/1655243355949-add-utilities.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { MigrationInterface, QueryRunner } from "typeorm"

export class addUtilities1655243355949 implements MigrationInterface {
name = "addUtilities1655243355949"

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`CREATE TABLE "listing_utilities" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "updated_at" TIMESTAMP NOT NULL DEFAULT now(), "water" boolean, "gas" boolean, "trash" boolean, "sewer" boolean, "electricity" boolean, "cable" boolean, "phone" boolean, "internet" boolean, CONSTRAINT "PK_8e88f883b389f7b31d331de764f" PRIMARY KEY ("id"))`
)
await queryRunner.query(`ALTER TABLE "listings" ADD "utilities_id" uuid`)
await queryRunner.query(
`ALTER TABLE "listings" ADD CONSTRAINT "UQ_61b80a947c9db249548ba3c73a5" UNIQUE ("utilities_id")`
)
await queryRunner.query(
`ALTER TABLE "listings" ADD CONSTRAINT "FK_61b80a947c9db249548ba3c73a5" FOREIGN KEY ("utilities_id") REFERENCES "listing_utilities"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`
)
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "listings" DROP CONSTRAINT "FK_61b80a947c9db249548ba3c73a5"`
)
await queryRunner.query(
`ALTER TABLE "listings" DROP CONSTRAINT "UQ_61b80a947c9db249548ba3c73a5"`
)
await queryRunner.query(`ALTER TABLE "listings" DROP COLUMN "utilities_id"`)
await queryRunner.query(`DROP TABLE "listing_utilities"`)
}
}
Loading

0 comments on commit 0bd0782

Please sign in to comment.