You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 <[email protected]>
While integrating with
react-hook-form
we encountered this error. Side effects include:Current behavior
inputRef
as a direct propExpected behavior
ref
to underlying<input>
Screenshots
The text was updated successfully, but these errors were encountered: