Skip to content

Commit

Permalink
Dev (#1606)
Browse files Browse the repository at this point in the history
* Dev updates from master before merge (#1594)

* Issue 1362/total flagged bug (#1366)

* Fix counting totalFlagged property in AFS module

* Fix a race condition in AFS module

* Update changelog

* fix retry import

* Throw 429 on application creation retry failure

Co-authored-by: Sean Albert <smabert@gmail.com>

* fix merge conflicts in master (#1375)

* Replace UserContext with AuthContext (#1311)

* Replace UserContext with AuthContext

* Remove api_requests

* Fix imports

* Fix userService params

* Fix ConfirmationModal

* Add missing appUrl

* Fixes after rebase and remove useRouter for ui-components

* Fix language passed to axios

* Adds debug instructions to backend/core readme (#15) (#1390)

* Adds start command for backend in debug mode (#15)

* Adds start command for backend in debug mode

* add notes to readme on debugging the backend

* remove package.json changes since there was already a debug command, and update readme (#16)

* Add backend/proxy Dockerfile, README.md and nginx config file (#1380)

* Add backend/proxy Dockerfile, README.md and nginx config file

* Update changelog

* Add /jurisdictions endpoint (#1391)

* Add /jurisdictions endpoint

* Update changelog

* Update migration to create jurisdiction relation automatically for existing listings

* Revert "Merge latest master (#1370)" (#1394)

* Revert "Merge latest master (#1370)"

This reverts commit 43c84a2.

* Retain overrideTranslations related change from housingbayarea fork

* Add reservedCommunityType endpoint (#1395)

* Revert "Merge latest master (#1370)"

This reverts commit 43c84a2.

* Add reservedCommunityType endpoint

* adds reservedCommunityType join and select to listing service qb

adds reservedCommunityType join and select to listing service qb and reverts change to _app

Co-authored-by: seanmalbert <smabert@gmail.com>

* fix from PR 1398

* #1378 Use specific aria props in LocalizedLink (#1379)

* Rename aria to ariaProps on LocalizedLink

avoids name colision with future react prop while allowing for flexibility in what aria props are passed

* Update CHANGELOG to document change

* Use aria attributes with the -

* Define aria-current type with AriaAttributes

* set fallback to true for getStaticPaths so new paths can be added

* adds revalidate to staticProps

* updates for cache revalidation on the frontend

* master resolved with merge conflicts from dev (#1482)

* 1320/additional eligibility, listings management (#1374)

* 1349/leasing agent section, listings management (#1376)

* Issue 1328/move property to the listing model (#1361)

* Working seeding and read/write

* Refactor seeds types

* Add tests for encapsulated property

* Update frontend client

* Update changelog

* Update sites/partners and sites/public according to new Listing schema

* Update Waitlist.test.tsx and listings-importer.ts

* Fix url-helper.ts

* Update ui-components tests after schema changes

* Fix listingUrlSlug and corresponding tests

* Fix types in cypress/support/helpers.ts

* Updated broken tests

Co-authored-by: dominikx96 <dominik@airnauts.com>

* Align dev with master (#1399)

* Issue 1362/total flagged bug (#1366)

* Fix counting totalFlagged property in AFS module

* Fix a race condition in AFS module

* Update changelog

* fix retry import

* Throw 429 on application creation retry failure

Co-authored-by: Sean Albert <smabert@gmail.com>

* fix merge conflicts in master (#1375)

* Replace UserContext with AuthContext (#1311)

* Replace UserContext with AuthContext

* Remove api_requests

* Fix imports

* Fix userService params

* Fix ConfirmationModal

* Add missing appUrl

* Fixes after rebase and remove useRouter for ui-components

* Fix language passed to axios

* Adds debug instructions to backend/core readme (#15) (#1390)

* Adds start command for backend in debug mode (#15)

* Adds start command for backend in debug mode

* add notes to readme on debugging the backend

* remove package.json changes since there was already a debug command, and update readme (#16)

* Add backend/proxy Dockerfile, README.md and nginx config file (#1380)

* Add backend/proxy Dockerfile, README.md and nginx config file

* Update changelog

* Add /jurisdictions endpoint (#1391)

* Add /jurisdictions endpoint

* Update changelog

* Update migration to create jurisdiction relation automatically for existing listings

* Revert "Merge latest master (#1370)" (#1394)

* Revert "Merge latest master (#1370)"

This reverts commit 43c84a2.

* Retain overrideTranslations related change from housingbayarea fork

* Add reservedCommunityType endpoint (#1395)

* Revert "Merge latest master (#1370)"

This reverts commit 43c84a2.

* Add reservedCommunityType endpoint

* adds reservedCommunityType join and select to listing service qb

adds reservedCommunityType join and select to listing service qb and reverts change to _app

Co-authored-by: seanmalbert <smabert@gmail.com>

* updates listing units reference

* fixes cypress tests for application household

Co-authored-by: Sean Albert <smabert@gmail.com>
Co-authored-by: Emily Jablonski <65367387+emilyjablonski@users.noreply.github.com>
Co-authored-by: Marcin Jędras <mjjedras@gmail.com>
Co-authored-by: Austin Valeske <avaleske@users.noreply.github.com>

* 1351 Preview (#1359)

* updates pull request template

* removes BACKEND_API_BASE from netlify.toml

* updates for partners translation locale overrides

* resolve issue with out of sync lock and package files

* removes package-lock

* updates Layout path

* removes gtm key for production, since it should be coming from netlify's settings

Already deployed to alameda.

* adds simple filter capability to listings and implements

* regenerated swagger

* changelog entry

* Brings dev up-to-date with master (#1360)

* updates pull request template

* removes BACKEND_API_BASE from netlify.toml

* updates for partners translation locale overrides

* resolve issue with out of sync lock and package files

* removes package-lock

* updates Layout path

* Fixed paper app submission error if there are no preferences (#1340)

* Fixed paper app submission error if there are no preferences

* Updated changelog

Co-authored-by: dominikx96 <dominik@airnauts.com>

* Add assets module (#1307)

* Add basic tests for assets module

* Add eager to createpresignedurl dto and implement CloudinaryService

* Move AppModule imports from module to dynamic resolver

* Rework assets service to return timestamp and signature

* Rework assets service to return timestamp and signature

* Add missing ApiProperty decorator for FormMetadata properties

* Add fake cloudinary environment variables to circleci config

* Add fake cloudinary secrets to circleci workflows

* Fix unit tests

* Update changelog

* Add assets migration

* Return UserBasicDto from POST /users (#1324)

* Return UserBasicDto from POST /users

* Update User DTO to not include resetToken and update frontend client

* Update changelog

* Fix user controller responses

* Fix yarn.lock being out of sync with package.json (#1342)

* removes gtm key for production, since it should be coming from netlify's settings

Already deployed to alameda.

* Removes GTM_KEY from netlify configuration - already deployed to alameda (#1347)

* updates pull request template

* removes BACKEND_API_BASE from netlify.toml

* updates for partners translation locale overrides

* resolve issue with out of sync lock and package files

* removes package-lock

* updates Layout path

* removes gtm key for production, since it should be coming from netlify's settings

Already deployed to alameda.

* Remove unused package-lock.json (#1344)

* refactor: seed data (#1312)

* Update hero button styles #1314 (#1329)

* feat: navbar custom widths and image only support (#1346)

* Add noWelcomeEmail query param to POST /users (#1326)

* Add noConfirmationEmail query param to POST /users

* Add tests for noConfirmationEmail

* Fix linter

* Update changelog

* Remove merge markers

* Fix yarn.lock being out of sync with package.json (#1342)

* Removes GTM_KEY from netlify configuration - already deployed to alameda (#1347)

* updates pull request template

* removes BACKEND_API_BASE from netlify.toml

* updates for partners translation locale overrides

* resolve issue with out of sync lock and package files

* removes package-lock

* updates Layout path

* removes gtm key for production, since it should be coming from netlify's settings

Already deployed to alameda.

* Remove unused package-lock.json (#1344)

* refactor: seed data (#1312)

* Update hero button styles #1314 (#1329)

* feat: navbar custom widths and image only support (#1346)

* Add noConfirmationEmail query param to POST /users

* Add tests for noConfirmationEmail

* Fix linter

* Update changelog

* Remove merge markers

* Remove duplicate tests from user e2e

Co-authored-by: Sean Albert <smabert@gmail.com>
Co-authored-by: Emily Jablonski <65367387+emilyjablonski@users.noreply.github.com>
Co-authored-by: Andrea Egan <akegan@users.noreply.github.com>

* Flagged Applications Table (#1132)

* Add Application flagged sets listing and onInsert creation

* Add resolve action

* Add client code

* Clean up DB after afs tests

* Fix backend cross test dependencies

* Created flags page

* Added listing param

* Created hook to fetch flagged applications

* Added flags navigation

* Added inner navigation

* Initial work on the flags page

* Added flags navigation

* Updated flags cols

* Added unique primary applicants qty

* Updated columns

* Updated columns and table style

* Added link to the single flag set

* Created new fag page

* Basic columns definition

* Added checkboxes to select applications

* Updated secondary nav applications qty

* Renamed and moved component

* Added SHOW_DUPLICATES variable to temporary enable/disable navigation

* Updated flags routes after next update

* Updated tag size

* Updated header title

* Updated duplicates table

* Created useMutation hook

* Updated mutation hook

* Updated duplicates table and data fetching hook

* Created pagionation component to use with ag-grid

* Applications page cleanup & implemented a new pagination component

* Added page and limit params to the flags hook

* Updated flags table and pagination

* Cleanup

* Updated changelog

* Pagination improvements on mobile

* Updated navigation tabs

* Disable next button when there are no appliacations

* Cleanup & updated Layout path

* Cleanup

* Move navigation component into partners dir

Co-authored-by: Michal Plebanski <michalp@airnauts.com>
Co-authored-by: dominikx96 <dominik@airnauts.com>

* Add table image thumbnails and minimal flush styles (#1339)

* Add table image thumbnails and minimal flush styles

* Switch to using a TableThumbnail component, fix CSS

* Update Changelog with PR #1339

* Update link in Changelog to PR #1339

* 1321/listings management, additional details section (#1338)

* adds step to db:reseed that adds the uuid extension if it's not present (#1357)

Co-authored-by: Will Lin <4317058+willrlin@users.noreply.github.com>

Co-authored-by: dominikx96 <dominikx96@gmail.com>
Co-authored-by: dominikx96 <dominik@airnauts.com>
Co-authored-by: Michał Plebański <michalp@airnauts.com>
Co-authored-by: Emily Jablonski <65367387+emilyjablonski@users.noreply.github.com>
Co-authored-by: Andrea Egan <akegan@users.noreply.github.com>
Co-authored-by: Jared White <jared@jaredwhite.com>
Co-authored-by: Austin Valeske <avaleske@users.noreply.github.com>
Co-authored-by: Will Lin <4317058+willrlin@users.noreply.github.com>

* update dev branch with master (#1373)

* addresses issues from review

* updates filter implementation

* completely changed filtering for listings

* updates to handle multiple values for the same key

* aside cleanup and log removal

Co-authored-by: dominikx96 <dominikx96@gmail.com>
Co-authored-by: dominikx96 <dominik@airnauts.com>
Co-authored-by: Michał Plebański <michalp@airnauts.com>
Co-authored-by: Emily Jablonski <65367387+emilyjablonski@users.noreply.github.com>
Co-authored-by: Andrea Egan <akegan@users.noreply.github.com>
Co-authored-by: Jared White <jared@jaredwhite.com>
Co-authored-by: Austin Valeske <avaleske@users.noreply.github.com>
Co-authored-by: Will Lin <4317058+willrlin@users.noreply.github.com>

* 1318/additional fees, listings management (#1377)

* Fix units availability display (#1398)

* Fix units availability display

* Add changelog for unit availability

* 1388/date component update take 2 (#1392)

* Adds uuid extension step to e2e tests, and update to .env.template (#19) (#1406)

* adds step to create uuid extension to e2e test initialization

* Add test database environment variable to .env.template and note to readme about it

* Add reserved_community_type seed migration (#1411)

* Add reserved_community_type seed migration

* Update changelog

* 1177/add image to listing (#1413)

* Add image field to listing

* Add image asset relation to listing model

Co-authored-by: seanmalbert <smabert@gmail.com>

* 1408/submission due date (#1409)

* Add due date check to application submission endpoint

* Add test checking if submission deadline works

* Revert listing state after changes in one of the e2e tests

* Add changelog.md udpates

* 1418/cache and cleanup (#1422)

* updates pull request template

* removes BACKEND_API_BASE from netlify.toml

* updates for partners translation locale overrides

* resolve issue with out of sync lock and package files

* removes package-lock

* updates Layout path

* removes gtm key for production, since it should be coming from netlify's settings

Already deployed to alameda.

* adds cache clearing, links for adding/editing and cleanup

* updated changelog

* updates application count logic

* adds clearCacheKeys in cacheLib

* Add assets endpoints for list and retrieve by id (#1412)

* Add assets endpoints for list and retrieve by id

* Add assets endpoints for list and retrieve by id

Co-authored-by: seanmalbert <smabert@gmail.com>

* 1317/listings management, building details & intro (#1420)

* 1319/listings management, building features (#1421)

* 1178 add result and waitlist related fields to Listing (#1434)

* Add tests for updating listing.image relation through listing endpoint

* Add resultLink, isWaitlistOpen and waitlistOpenSpots to Listing model

* Remove eager relation to listing from user entity

* Update client

* 1383/listings management, ranking and results (#1433)

* 1350 / Units (#1448)

* updates pull request template

* removes BACKEND_API_BASE from netlify.toml

* updates for partners translation locale overrides

* resolve issue with out of sync lock and package files

* removes package-lock

* updates Layout path

* removes gtm key for production, since it should be coming from netlify's settings

Already deployed to alameda.

* adds units to listings form

* cleanup around editing/saving units

* unit details

* updates for disableUnitAccourdion

* check for amiChart and FieldGroup revert

* fix new listing issue

* fixes issues from feedback

* moved code into formatFormData

* 1381/listings management, application addresses (#1425)

* 1381 wip

* last toggleable fields

* add office hours

* translations

* details

* Add applicationPickUpAddressType and applicationDropOffAddressType columns to Listing model

* new backend fields for dropoff address

* details page

* submit issues

* show address types

* remove unused application methods

* cleanup

* application submission notes

* default values load in the form

* default values for postmark date

* typing issues w add page

* use existing addresses on listing page

* can really share addresses

* Add additionalApplicationSubmissionNotes migration (#1441)

* pr feedback

* pr feedback pr 2

* changelog

* type yes/no

* combine types

* fixup address fxn

* update migration

* office hours fix

* test updated config yaml

* testing circleci config update

* updated circleci config test

* Updated config.yml

* Updated config.yml

* update migration file

Co-authored-by: Michal Plebanski <michalp@airnauts.com>
Co-authored-by: Sean Albert <smabert@gmail.com>

* 1382/listings management, application dates (#1432)

* set fallback to true for getStaticPaths so new paths can be added (#1461)

* Dev - adds cache revalidation to frontend app (#1462)

* set fallback to true for getStaticPaths so new paths can be added

* adds revalidate to staticProps

* updates for cache revalidation on the frontend

* removes listing controller update (#1464)

* Application method/paperpickup (#1469)

* adds PaperPickup back

* Update listings.controller.ts

* revert swagger changes

* removes preview logic from ListingView (#1476)

* 1153 Dropzone-style file upload component (#1437)

* First pass at a dropzone Cloudinary uploader

* Style the progress control and provide more complete flow

* Tighten up Dropzone usability

* Add id for accessibility

* Update Changelog with #1437

* 1331/hide eligibility header if no sections present (#1457)

* 1331/hide eligibility header if no sections present

* changelog

Co-authored-by: Emily Jablonski <65367387+emilyjablonski@users.noreply.github.com>
Co-authored-by: Michał Plebański <michalp@airnauts.com>
Co-authored-by: dominikx96 <dominik@airnauts.com>
Co-authored-by: Marcin Jędras <mjjedras@gmail.com>
Co-authored-by: Austin Valeske <avaleske@users.noreply.github.com>
Co-authored-by: dominikx96 <dominikx96@gmail.com>
Co-authored-by: Andrea Egan <akegan@users.noreply.github.com>
Co-authored-by: Jared White <jared@jaredwhite.com>
Co-authored-by: Will Lin <4317058+willrlin@users.noreply.github.com>

* trigger cleanup

* fixes listing bug issue

* adds additional checks for unit type and priority

* update master from dev pt 2 (#1554)

* new line

* Fix code style issues with Prettier

Co-authored-by: Michał Plebański <michalp@airnauts.com>
Co-authored-by: Emily Jablonski <65367387+emilyjablonski@users.noreply.github.com>
Co-authored-by: Marcin Jędras <mjjedras@gmail.com>
Co-authored-by: Austin Valeske <avaleske@users.noreply.github.com>
Co-authored-by: Andrea Egan <akegan@users.noreply.github.com>
Co-authored-by: dominikx96 <dominik@airnauts.com>
Co-authored-by: dominikx96 <dominikx96@gmail.com>
Co-authored-by: Jared White <jared@jaredwhite.com>
Co-authored-by: Will Lin <4317058+willrlin@users.noreply.github.com>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>

* Fix code style issues with Prettier

* Refactor ImageCard and ApplicationStatus components (#1555)

* Remove San Francisco email from ui-components general.json (#1571)

* Make unitsSummarized a Transform field within Listing (#259) (#1572)

* 1428/community type (#1540)

* Minor visual fixes 1465 (#1596)

* Minor style fixes

* Update changelog for style fixes

* Fix base button styles

* update changelog formatting

Co-authored-by: Emily Jablonski <emily.jablonski@exygy.com>

* Let the counselor page render if no props. (#1599)

* 1601/change open soon text (#1602)

* Update styling mobile image-only logo #1466 (#1597)

* Update height of image-only SiteHeader logo

* Update comment

* Change back to goal height of 75px

* Add changes to CHANGELOG

* Revert back to example of the listing image as an image-only logo

* updates package version to 1.0.5

Co-authored-by: Michał Plebański <michalp@airnauts.com>
Co-authored-by: Emily Jablonski <65367387+emilyjablonski@users.noreply.github.com>
Co-authored-by: Marcin Jędras <mjjedras@gmail.com>
Co-authored-by: Austin Valeske <avaleske@users.noreply.github.com>
Co-authored-by: Andrea Egan <akegan@users.noreply.github.com>
Co-authored-by: dominikx96 <dominik@airnauts.com>
Co-authored-by: dominikx96 <dominikx96@gmail.com>
Co-authored-by: Jared White <jared@jaredwhite.com>
Co-authored-by: Will Lin <4317058+willrlin@users.noreply.github.com>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: ant <anthony.kong@sfgov.org>
Co-authored-by: elenm <16543000+elenm@users.noreply.github.com>
Co-authored-by: Anders Schneider <anderseschneider@gmail.com>
Co-authored-by: Emily Jablonski <emily.jablonski@exygy.com>
  • Loading branch information
15 people authored Aug 3, 2021
1 parent c79ffaf commit d7a01b1
Show file tree
Hide file tree
Showing 72 changed files with 626 additions and 805 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file. The format

## Unreleased

## v1.0.5 08/03/2021

- Added:
- Debug flags for public and partner site ([Detroit Team #195](https://github.com/CityOfDetroit/bloom/pull/195), [#1519](https://github.com/bloom-housing/bloom/pull/1519))

Expand Down Expand Up @@ -40,16 +42,23 @@ All notable changes to this project will be documented in this file. The format
- refactors listing form submit to fix double submit issue ([#1501](https://github.com/bloom-housing/bloom/pull/1501))

- Added:

- A notice bar to the preview page of a listing ([#1532](https://github.com/bloom-housing/bloom/pull/1532)) (Jared White)
- Photo upload and preview to the Partner Listing screens ([#1491](https://github.com/bloom-housing/bloom/pull/1491)) (Jared White)
- AG-grid sorting now is connected with the backend sorting ([#1083](https://github.com/bloom-housing/bloom/issues/1083)) (Michał Plebański)
- Add Preferences section to listing management ([#1564](https://github.com/bloom-housing/bloom/pull/1564)) (Emily Jablonski)
- Add Community Type to listing management ([#1540](https://github.com/bloom-housing/bloom/pull/1540)) (Emily Jablonski)

- Changed:
- Remove coming soon text, use application open text instead ([#1602](https://github.com/bloom-housing/bloom/pull/1602)) (Emily Jablonski)

### UI Components

- Fixed:

- Fix a11y language navigation ([#1528](https://github.com/bloom-housing/bloom/pull/1528)) (Dominik Barcikowski)
- Update default mobile height for image-only navbar-logo ([#1466](https://github.com/bloom-housing/bloom/issues/1466))) (Andrea Egan)
- Remove border from navbar wrapper and align border color on primary button ([#1596](https://github.com/bloom-housing/bloom/pull/1596)) (Marcin Jedras)

- Added:
- Preview (disabled) state for Listings Application button ([#1502](https://github.com/bloom-housing/bloom/pull/1502)) (Jared White)
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ Bloom uses the Circle CI system to automatically run tests on any pull requests.
We use the ESlint linting system and the automatic code formatter Prettier (which the linter also enforces). **All** pull requests must pass linting to be accepted, so they don't create fix work for future contributors. If you're not using an IDE that integrates with these tools, please run eslint + prettier from the cli on all added or changed code before you submit a pull request.

As much as we'll try to keep current, the linting rules can become out of date, and in this case you should file an issue with the adjustments you're looking for. We'll be looking for a resulting PR with a minimum of two commits - one to adjust the rules or tooling, and another that updates the codebase to match. If the latter changes are complex, please discuss in advance and break up the work into reasonably reviewable commits.

41 changes: 0 additions & 41 deletions backend/core/archer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -420,7 +419,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -448,7 +446,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -476,7 +473,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -504,7 +500,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -532,7 +527,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -560,7 +554,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -588,7 +581,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -616,7 +608,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -644,7 +635,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -672,7 +662,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -700,7 +689,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -728,7 +716,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -756,7 +743,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -784,7 +770,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -812,7 +797,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -840,7 +824,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -868,7 +851,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -896,7 +878,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -924,7 +905,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -952,7 +932,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -980,7 +959,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1008,7 +986,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1036,7 +1013,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1064,7 +1040,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1092,7 +1067,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1120,7 +1094,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: "senior",
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1148,7 +1121,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1176,7 +1148,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1204,7 +1175,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1232,7 +1202,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1260,7 +1229,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1288,7 +1256,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1316,7 +1283,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1344,7 +1310,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1372,7 +1337,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1400,7 +1364,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1428,7 +1391,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1456,7 +1418,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1484,7 +1445,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down Expand Up @@ -1512,7 +1472,6 @@ export const ArcherListing: Listing = {
numBedrooms: null,
number: null,
priorityType: null,
reservedType: null,
sqFeet: "285",
status: UnitStatus.occupied,
unitType: {
Expand Down
19 changes: 13 additions & 6 deletions backend/core/src/listings/dto/listing.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,19 @@ export class ListingDto extends OmitType(Listing, [
yearBuilt?: number | null

@Expose()
@ApiProperty({ type: UnitsSummarized })
get unitsSummarized(): UnitsSummarized | undefined {
if (Array.isArray(this.units) && this.units.length > 0) {
return transformUnits(this.units as Unit[])
}
}
@IsDefined({ groups: [ValidationsGroupsEnum.default] })
@ValidateNested({ groups: [ValidationsGroupsEnum.default] })
@Type(() => UnitsSummarized)
@Transform(
(value, obj: Listing) => {
const units = obj.property.units
if (Array.isArray(units) && units.length > 0) {
return transformUnits(units)
}
},
{ toClassOnly: true }
)
unitsSummarized: UnitsSummarized | undefined
}

export class ListingCreateDto extends OmitType(ListingDto, [
Expand Down
Loading

0 comments on commit d7a01b1

Please sign in to comment.