-
Notifications
You must be signed in to change notification settings - Fork 26
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: household member delete + order #4510
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for partners-bloom-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for bloom-exygy-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -170,7 +170,7 @@ const FormHouseholdMembers = ({ | |||
</Drawer> | |||
|
|||
<Dialog | |||
isOpen={!!membersDeleteModal} |
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.
note: When the modal number was set to zero (when app submitted on public side) this would be false
✅ Deploy Preview for partners-bloom-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for bloom-exygy-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Seeing this in the issue: |
6e3cfe9
to
9a0a5dd
Compare
Good call out @emilyjablonski! I think there was an issue with my query checking the production db because as discussed in workshop... there are certainly household members with null order ids. I just pushed a new change that updates the order ids when they are pulled into the Paper Application Form and sorts them so they display in order that the user added them. While I don't love it, the reason I took this path rather than using the id is because a freshly added household member will not have an id until the paper app has been submitted so users would be unable to edit or delete household members while working on the paper application form. |
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 PR addresses #977
Description
This PR updates the deleteModal open logic to handle an orderId=0. When a user applies online, the first household member is set to an OrderId of 0 but when added via the partner's side, it adds it with an orderId of 1. This PR also updates the ordering on the partner's side so that a user sees the household members in the order they added them (public side is already demonstrating this behavior). However, I stopped short of refactoring the orderId to be used more consistently to avoid any risks in conflicting with existing data. Instead, that work is captured here: #4511
Note: I had originally assumed the orderId was null causing this issue but querying production showed no household members with null orderIds so this should resolve the issue.
How Can This Be Tested/Reviewed?
This can be tested a few ways. On the public side, sign in and apply to a listing while adding household members, editing and deleting household members. Then submit, and do the same on an autofill application. Ensure that the household members behave as expected and maintain the order at which they were added.
Then on the partner's side, check these same applications and click delete to ensure the modal opens for each of them. Also, check that the order updates and saves correctly when deleting a household member.
Author Checklist:
yarn generate:client
and/or created a migration when requiredReview Process: