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

feat(tfi, poc): Provide Your Types of Financial Institutions - Skeleton; Point of Contact - Skeleton, Input Validation, Error Handling, Submission #300

Merged
merged 67 commits into from
Mar 19, 2024

Conversation

shindigira
Copy link
Contributor

@shindigira shindigira commented Mar 12, 2024

closes #284
closes #287
closes #297
closes #288

Changes

  • style(Fieldgroup): Adhere's to the 770px max-width with box-border (includes borders, margins and padding into the max-width)
  • style(SectionIntro): Adhere's to the 670px max-width with box-border (includes borders, margins and padding into the max-width)
  • feat(poc): Point of Contacts - Skeleton
  • feat(poc): Point of Contacts - Zod Schema
  • feat(tfi): Types of Financial Institutions - Skeleton Implemented - awaiting functionality
  • feat(vite proxy): add v1/filing as a vite proxy point.
  • feat(poc): Create a submitPointOfContact request for use on the Point of Contact form.
  • chore(FormMain): Created a FormMain component which is a wrapper component for <form />.

Screenshots

Point of Contact PoC Error Header Types of Financial Institutions
Screenshot 2024-03-15 at 11 35 42 AM Screenshot 2024-03-15 at 11 35 59 AM Screenshot 2024-03-15 at 11 39 12 AM

How to Test

Pre-requisites

  • Make sure to yarn update, wipe all Docker containers and Docker volumes, run yarn seed.
  • Add SBL_FILING_BASE_URL="http://localhost:8882" to your .env.

Test Set 0

  • Code inspect the proxy changes
  • Ensure all previously create requests are functioning properly
  • Inspect the styling of Fieldgroup and ensure the 770px (48.125rem) limit is met (including borders, margins, etc).

Test Set 1

  • If needed, toggleRouting() to disable enforced routing
  • Navigate to http://localhost:8899/point-of-contact to verify Point of Contact
  • Do not fill anything and hit submit. Double-check regex verification (ZIP code, phone number, email, etc)
  • Fill out everything properly and hit submit. Check in Network tab along (compare with the swagger docs) that the request is properly implemented. NOTE: Currently, the request is not working (backend problem).

Test Set 2

  • If needed, toggleRouting() to disable enforced routing
  • Navigate to http://localhost:8899/types-financial-institutions to verify Types of Financial Institutions. No functionality at this moment.

TODO

  • submitPointOfContact requires a corresponding lei and filing_period, so temporarily using HARDCODED values.
  • Types of Financial Institutions: Waiting on Update Your Financial Institution to be completed before further updates to the zod schema, input validation and error handling.

Notes

  • Includes commits from 222: Update Your Financial Institution; wait till that PR is merged in before this one.
  • Currently, the submitPointOfContact request will return an 500 Internal Server Error. This can be ignored, see here.

meissadia and others added 30 commits February 22, 2024 12:03
- [Add] Fetch Institution data
- [Add] Breadcrumb to return to View page
- [Add] Review FI details
-  Improved population of existing form data
- Temp fix for TextArea resizing issue
- Implements `Clear form` functionality
@shindigira shindigira changed the base branch from 222-update-fi-profile-phase3-beta to main March 12, 2024 23:32
@shindigira
Copy link
Contributor Author

shindigira commented Mar 13, 2024

Heyo! Can I review this one @shindigira, with the assumption the other PRs get merged?

Sure, still WIP but it's at a good point for feedback!

Currently, in condition for review.

@shindigira shindigira marked this pull request as ready for review March 13, 2024 01:08
@shindigira shindigira changed the title feat(poc): Provide Your Types of Financial Institutions - Skeleton feat(tfi, poc): Provide Your Types of Financial Institutions - Skeleton , Point of Contact - Skeleton Part 2 Mar 13, 2024
changeOrigin: true,
secure: false,
},
"/v1/filing": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These changes will prevent CORS errors. Be sure to set SBL_FILING_BASE_URL in your .env

@shindigira shindigira changed the base branch from main to 222-update-fi-profile-phase2-mail-api-integration March 15, 2024 04:21
@shindigira shindigira changed the base branch from 222-update-fi-profile-phase2-mail-api-integration to main March 15, 2024 04:21
@shindigira shindigira changed the title feat(tfi, poc): Provide Your Types of Financial Institutions - Skeleton , Point of Contact - Skeleton Part 2 feat(tfi, poc): Provide Your Types of Financial Institutions - Skeleton , Point of Contact - Skeleton, Input Validation and Error Handling Mar 15, 2024
@shindigira shindigira changed the title feat(tfi, poc): Provide Your Types of Financial Institutions - Skeleton , Point of Contact - Skeleton, Input Validation and Error Handling feat(tfi, poc): Provide Your Types of Financial Institutions - Skeleton , Point of Contact - Skeleton, Input Validation, Error Handling, Submission Mar 15, 2024
@shindigira shindigira changed the title feat(tfi, poc): Provide Your Types of Financial Institutions - Skeleton , Point of Contact - Skeleton, Input Validation, Error Handling, Submission feat(tfi, poc): Provide Your Types of Financial Institutions - Skeleton; Point of Contact - Skeleton, Input Validation, Error Handling, Submission Mar 15, 2024
@shindigira
Copy link
Contributor Author

shindigira commented Mar 15, 2024

If you want to test the submitPointOfContact:

1.) Run the below script for the 123456789TESTBANK123 institution.

export RT_ACCESS_TOKEN=$(curl 'localhost:8880/realms/regtech/protocol/openid-connect/token' \
-X POST \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'username=admin1' \
--data-urlencode 'password=admin' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'client_id=regtech-client' | jq -r '.access_token')

curl localhost:8881/v1/admin/me -H "Authorization: Bearer ${RT_ACCESS_TOKEN}" | jq -r '.'

curl -v -X POST http://localhost:8882/v1/filing/institutions/123456789TESTBANK123/filings/2024/ -H "Authorization: Bearer ${RT_ACCESS_TOKEN}" | jq -r '.'

2.) Then attempt the submitPointOfContact request in the app or in Bruno. For now, you will still get a 500 after the PUT request above. However, running:

GET {{filing_url}}/v1/filing/institutions/123456789TESTBANK123/filings/2024/contact-info

will still function properly to verify that the request worked properly as the contact information will be returned.

{
  "id": 2,
  "first_name": "asdf",
  "last_name": "asdf",
  "hq_address_street_1": "23423",
  "hq_address_street_2": "",
  "hq_address_city": "234",
  "hq_address_state": "arizona",
  "hq_address_zip": "23451",
  "email": "[email protected]",
  "phone": "234-234-2344"
}

Copy link
Collaborator

@meissadia meissadia left a comment

Choose a reason for hiding this comment

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

Looking good 👍🏾

@shindigira shindigira merged commit e083993 into main Mar 19, 2024
2 checks passed
@billhimmelsbach billhimmelsbach deleted the 222-284-287-types-of-financial-institutions branch May 31, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants