-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: resolve bugs from bash #1597
Conversation
✅ Deploy Preview for detroit-storybook-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for detroit-public-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for detroit-partners-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ColinBuyck looks good a few tweaks I think
@@ -152,7 +152,9 @@ export class ListingsCsvExporterService { | |||
"Unit Types": listing.unitGroupSummary?.unitTypes | |||
.map((unitType) => formatBedroom[unitType]) | |||
.join(", "), | |||
"AMI Chart": listing.unitGroup?.amiLevels.map((level) => level.amiChart?.name).join(", "), | |||
"AMI Chart": [ | |||
...new Set(listing.unitGroup?.amiLevels.map((level) => level.amiChart?.name)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this for sure works, I think its not the most efficient approach though.
could we instead use a .reduce here and verify uniqueness in the accumulator ourselves then join that together?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I had gone back and forth on this decision here in development... I was feeling that using reduce() as a filter/map replacement sacrifices more readability than it would gain in efficiency (if I'm understanding correctly that it would have a linear runtime either way, just one less iteration). The lack of readability is coming from my personal difficulty in reading reduce functions that aren't reducing an array to a single value as intended. Much of this was inspired by this video and basically summarized here. Can also recognize that using set in this way may be less readable than a map + filter combo which I could also do and would definitely pull out into a helper. I'm totally good to change this to any of these, but just wanted to get your thoughts on these pieces first and see what you'd prefer @YazeedLoonat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after convo with colin, LGTM
* fix: resolve bugs from bash * fix: paper app helper * fix: refine helper
* feat: add user csv export (#1560) * feat: listing export (#1548) * feat: starting listing export * fix: wip building listing query * fix: csv support * fix: adding column definitions wip * fix: wip address query * fix: updates to fix query * fix: wip listing selects * fix: reformatted testing output * fix: completed select statements * fix: exporter service wip * fix: a11y features formatting * fix: wip adding to exporter * fix: wip lottery info formatting * fix: wip date formatting * fix: listings exporter service fields (95%) * fix: complete units csv building * fix: functioning zip download * fix: req.user type casting * fix: refactor to config approach * fix: various csv bugs * fix: debugging column values * fix: user access array * fix: clean up * fix: clean up pt 2 * fix: ui content and error handling * fix: ui content and error handling actually * fix: cleanup + cypress test * fix: cypress test and naming clean up * fix: unit test draft * fix: error handling fix * fix: removed unused seed * fix: functional cypress and wip unit tests * fix: one functional unit test * fix: functional unit tests * fix: wip error test * fix: error message test * fix: wip module mocking * fix: generateAsnyc readded to test * fix: controller cleanup * fix: functional success message testing * fix: testing cleanup * fix: further testing and comment cleanup * fix: toast timeout * fix: clean up formatting * fix: column cleanup * fix: console log cleanup * fix: rebase cleanup * fix: wip bug fixes * fix: wip data bug resolutions * fix: unit bug fixes * fix: formatting contd * fix: clean up * fix: button focus issue * fix: testing repository error * fix: include csv exporter service in test * fix: refined testing fix * fix: button color correction * fix: align sizing and export language --------- Co-authored-by: Yazeed Loonat <[email protected]> * fix: listings export clean up (#1590) * fix: local import * fix: unit tests fix * fix: add aria label to min/max rent fields (#1582) * fix: remove the due date question (#1584) * 1525/user access issue (#1592) * fix: include admin who are not partners * fix: correct user seed * fix: remove admin from permissions column * fix: testing cleanup * fix: change test location * fix: add undefined check * fix: add aria label to table (#1585) * fix: add aria label to table * fix: add aria labels to detail tables * fix: unit labeling on detailed page * fix: add aria-label to grouped table * fix: add descriptive alt tags to listings images (#1587) * fix: add descriptive alt tags to listings images * fix: add empty value to alt text * fix: remove redundant photo string * fix: remove redundant image string from translations * fix: change min/max rent inputs from number to text with only numbers (#1599) * fix: resolve bugs from bash (#1597) * fix: resolve bugs from bash * fix: paper app helper * fix: refine helper * fix: user export fixes (#1600) * fix: user export fixes * fix: fix tests * fix: add cypress downloads to gitignore file * fix: release scrub (#1604) * fix: align csv error messages * fix: timezone temporary approach * fix: align application export * fix: formatting case consistency * fix: missing UTC * feat: focus title on modal open (#1558) * feat: focus title on modal open * feat: bring back id to h1 in modal header * fix: add a11y statement (#1601) * fix: added english a11y statement * fix: formatting feedback * fix: spanish added * fix: add ar and bn * fix: remove unused div and styling --------- Co-authored-by: ColinBuyck <[email protected]> Co-authored-by: Yazeed Loonat <[email protected]> Co-authored-by: Krzysztof Zięcina <[email protected]> Co-authored-by: Emily Jablonski <[email protected]>
Pull Request Template
Issue Overview
This PR addresses #1597
Description
This PR addresses the 4 issues found in bash earlier (excluding the verifiedAt date issue since its out of scope).
Issue 1: Column should be Developer/Property Owner rather than Developer Property Owner
Issue 2: On the unit groups csv, ami charts have duplicates.
Issue 3: On the listings csv, the leasing management company is not successfully pulling in the data
Issue 4: On the listings csv, you can upload multiple paper applications in different languages but only one is showing in the paper app url field
Only thing to note here is on the third issue. Originally, it was set up to pull in listing.managementCompany which is a field that we seed with but no longer can be set from the partners side. Instead, the Property Management Company field label is set to fill the leasingAgentName field. Does anyone know the context of this and potentially provide more info to this #1598 ?
How Can This Be Tested/Reviewed?
Provide instructions so we can review.
Describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration.
Checklist:
yarn generate:client
and/or created a migration if I made backend changes that require themReviewer Notes:
Steps to review a PR:
On Merge:
If you have one commit and message, squash. If you need each message to be applied, rebase and merge.