Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve bugs from bash #1597

Merged
merged 3 commits into from
Mar 23, 2023
Merged

fix: resolve bugs from bash #1597

merged 3 commits into from
Mar 23, 2023

Conversation

ColinBuyck
Copy link
Collaborator

@ColinBuyck ColinBuyck commented Mar 21, 2023

Pull Request Template

Issue Overview

This PR addresses #1597

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

Description

This PR 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:

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

Reviewer Notes:

Steps to review a PR:

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

On Merge:

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

@netlify
Copy link

netlify bot commented Mar 21, 2023

Deploy Preview for detroit-storybook-dev ready!

Name Link
🔨 Latest commit b34bb30
🔍 Latest deploy log https://app.netlify.com/sites/detroit-storybook-dev/deploys/641b90caa5cd2b00085c23da
😎 Deploy Preview https://deploy-preview-1597--detroit-storybook-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify
Copy link

netlify bot commented Mar 21, 2023

Deploy Preview for detroit-public-dev ready!

Name Link
🔨 Latest commit b34bb30
🔍 Latest deploy log https://app.netlify.com/sites/detroit-public-dev/deploys/641b90ca3a5ad80008723ce5
😎 Deploy Preview https://deploy-preview-1597--detroit-public-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify
Copy link

netlify bot commented Mar 21, 2023

Deploy Preview for detroit-partners-dev ready!

Name Link
🔨 Latest commit b34bb30
🔍 Latest deploy log https://app.netlify.com/sites/detroit-partners-dev/deploys/641b90cacad98d00084489c5
😎 Deploy Preview https://deploy-preview-1597--detroit-partners-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@ColinBuyck ColinBuyck marked this pull request as ready for review March 21, 2023 23:41
Copy link
Collaborator

@ludtkemorgan ludtkemorgan left a comment

Choose a reason for hiding this comment

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

🌳

Copy link
Collaborator

@YazeedLoonat YazeedLoonat left a 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

backend/core/src/listings/listings-csv-exporter.service.ts Outdated Show resolved Hide resolved
@@ -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)),
Copy link
Collaborator

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?

Copy link
Collaborator Author

@ColinBuyck ColinBuyck Mar 22, 2023

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

Copy link
Collaborator

@YazeedLoonat YazeedLoonat left a 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

@ColinBuyck ColinBuyck merged commit 53b35b8 into dev Mar 23, 2023
@ColinBuyck ColinBuyck deleted the 1595/listing-export-bash branch March 23, 2023 19:53
ludtkemorgan pushed a commit that referenced this pull request Mar 23, 2023
* fix: resolve bugs from bash

* fix: paper app helper

* fix: refine helper
@ludtkemorgan ludtkemorgan mentioned this pull request Mar 23, 2023
ludtkemorgan added a commit that referenced this pull request Mar 28, 2023
* 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 <yazeedloonat@gmail.com>

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

Successfully merging this pull request may close these issues.

3 participants