generated from cfpb/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Page] Update your financial institution profile #222
Comments
meissadia
added a commit
that referenced
this issue
Feb 9, 2024
Part of #222 This PR is primarily to rename the "InstitutionsDetails" page to "ViewInstitutionProfile" in order to better align with other profile pages (view/update of institution/user) we are building. Since it touches so many files it made sense to break this task into a separate PR for easier review. ## Changes - Rename "InstitutionsDetails" to "ViewInstitutionProfile" - Address ESLint errors - Destructure properties (Unicorn) - No magic numbers - Address Typescript errors - Update Zod schemas ## How to test this PR 1. Verify app loads 2. Verify that you can load an Institution Profile (ex: http://localhost:8899/institution/TESTBANK123) ## Screenshots - No visual changes
3 tasks
7 tasks
7 tasks
This was referenced Feb 28, 2024
meissadia
added a commit
that referenced
this issue
Mar 6, 2024
Phase 1-3 of #222 ## Changes - Creates `Update your financial institution profile` page - Presents all of the associated input fields - Populates input fields with pre-existing Institution data - Upon `Submit`, simulates a successful submission and displays the corresponding `/summary` confirmation page --------- Co-authored-by: shindigira <shindigira@gmail.com>
meissadia
added a commit
that referenced
this issue
Mar 13, 2024
Part 2 of #222 ## Changes - Populates form's `defaultValues` with existing Institution data - Implements `Clear form` functionality - Removes previous method of providing form input defaults - Removes vague `id=stuff` - Temp fix for TextArea resizing issue ## TODO - Lots of Typescript stuff (Will work to address these issues in my next PR) ## How to test this PR 1. In browser console, ensure routing is enabled (`setIsRoutingEnabled(true)`) 1. Login with a user who has an associated institution 2. Click on the institution to `View` it's profile 3. Click on `Update your financial institution profile` 5. Modify a single field 6. Hit the `Clear form` button, observe that the edited data is reset 5. Modify a single field 8. Hit `Submit` 9. Verify you are redirected to the `/summary` route and shown a simulated "Success" confirmation 10. In console, look for `data to be submitted (before format)` and confirm the field you edited reflects the data you entered --------- Co-authored-by: shindigira <shindigira@gmail.com>
This was
linked to
pull requests
Mar 14, 2024
meissadia
added a commit
that referenced
this issue
Mar 20, 2024
Part 3 of #222 <img width="1226" alt="Screenshot 2024-02-29 at 4 05 55 PM" src="https://github.com/cfpb/sbl-frontend/assets/2592907/9dd7c191-a102-44ff-9709-3758d9e72f5b"> ## Changes - Formats form data for email submission - Triggers Mail API call upon submission - Replace "Simulated" submission with actual Mail API call ## Planned improvements - [ ] Data submission (formatFinancialProfileObject): Do further comparison against `defaultValues` to determine which data was changed, so that we only send SBL Help the info they actually need to update. This may also be resolved if we can address the [`forwardRef` errors](cfpb/design-system-react#316) we've been seeing, which may fix the issue of changes to these fields not being registered in `react-hook-form` ## How to test this PR 1. In `console` ensure routing is enabled: `setIsRoutingEnabled(true)` 1. Login as a user with an associated institution 2. Click on the Institution to `View institution profile` 3. Click on `Update institution profile` 4. Change some Institution data 5. Hit submit 6. Hopefully an email gets generated 🤞🏾 7. In `console`, you should also see the data that will be sent. <img width="549" alt="Screenshot 2024-02-28 at 5 41 29 PM" src="https://github.com/cfpb/sbl-frontend/assets/2592907/f0515aae-b02b-473c-88b3-4a7a9a881536"> ## Notes - Submission data format (decoded) ``` decoded { "tax_id": "tax_id", "rssd_id": "rss_id", "parent_legal_name": "parent-name", "parent_lei": "parent_lei", "parent_rssd_id": "parent-rssd", "top_holder_legal_name": "top-name", "top_holder_lei": "top-lei", "top_holder_rssd_id": "top-rssd", "sbl_institution_types": "bankSavings,minorityDepository,other", "sbl_institution_types_other": "Test SBL Type", "additional_details": "details" } ``` - Submission data format (encoded) ``` tax_id=tax_id&rssd_id=rss_id&parent_legal_name=parent-name&parent_lei=parent_lei&parent_rssd_id=parent-rssd&top_holder_legal_name=top-name&top_holder_lei=top-lei&top_holder_rssd_id=top-rssd&sbl_institution_types=bankSavings%2CminorityDepository%2Cother&sbl_institution_types_other=Test+SBL+Type&additional_details=details ``` --------- Co-authored-by: shindigira <shindigira@gmail.com>
3 tasks
3 tasks
5 tasks
meissadia
added a commit
that referenced
this issue
Mar 28, 2024
Phase 4 of #222 ## Changes - Eliminates the majority of ESLint exception previously applied in the UpdateFinancialProfile folder - Updates type structures used to manage the UFP form - Validates TIN - Validates RSSD ID - Ensures at least one Type of financial institution is selected - Ensures that if Type - `Other` is selected, a description is entered in the checkbox - Clears the description textbox and disables it if Type - `Other` is deselected - Ensures *some* Institution data has been modified before allowing the user to submit the form - Note: Disabling the `Submit` button requires more extensive modifications due to struggles I've had getting `react-hook-form` to recognize changes to the `Type of financial institution` and `Additional details` fields.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clear form
button doesn't work, need to refactor the way we generatedefaultValues
checked
for checkboxes does not register in the DTO. May be fixed with the ^ above ^defaultValues
refactor.Additional details
TextArea outside of grey bounding box. Do we need to restrict this?Issues that need to be addressed
/summary
page so users have a way to navigate away from the pageView Institution...
causing a noticeable shift in page content when navigating betweenView...
andUpdate...
.defaultValues
to determine which data was changed, so that we only send SBL Help the info they actually need to updatereact-hook-form
react-hook-form
The text was updated successfully, but these errors were encountered: