-
Notifications
You must be signed in to change notification settings - Fork 1
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
[User Profile] - Layout View - Initial User Profile Form, Frontend Validation Schema #27
Conversation
Changes: - [feat] Created a link to the Profile Form - [feat] Created a route to the Profile Form - [feat] Started a Profile Form Component
Changes: - [chore] Added `react-hook-form`, `zod` and `@hookform/resolvers` - [style] Started initial form look
Changes: - [chore] form update with available fields
Changes: - [chore] Started a `store` folder for hooks - [style] Utilized the CFPB style for the User Profile form buttons - [feat] First Name and Last Name implemented on the User Profile
…from useSblAuth hook
Changes: - [feat]: Added `zustand` and `immer` for state management - [chore]: Renamed the initial User Profile form as a Step1Form - [chore]: Utilized User Profile state management via Zustand
Changes: - [chore]: Created the `InputEntry` component - [chore]: Created the `ProfileForm.data.ts` to place data and mock data - [feat]: Added `react-select` and `@types/react-select` packages
Changes: - [feat] Included all the initial validation schema fields - [feat] Included error messages for associated financial data - [chore] Included the `svgr` plugin to be able to import svg files
Changes: - [chore] added error and disabled color class in the tailwind config - [chore] added the correct error icon
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.
lastName: "", | ||
email: email ?? "", | ||
financialInstitutions: [], | ||
// fiData: fiData ?? [] |
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.
// fiData: fiData ?? [] |
const onSubmit: SubmitHandler<ValidationSchema> = (data) => { | ||
console.log('data:', data); | ||
} | ||
|
||
console.log('errors:', errors) | ||
|
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.
I'm guessing there is no API endpoint for this data yet? This PR is just the UI?
const onSubmit: SubmitHandler<ValidationSchema> = (data) => { | |
console.log('data:', data); | |
} | |
console.log('errors:', errors) | |
const onSubmit: SubmitHandler<ValidationSchema> = (data) => { | |
console.log('data:', data); | |
} | |
console.log('errors:', errors) | |
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.
@meissadia Not wired to a backend yet. Will mock some API calls soon.
// console.log("getValues:", getValues()) | ||
// console.log('onclick errors', errors); |
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.
// console.log("getValues:", getValues()) | |
// console.log('onclick errors', errors); |
{/* <h1>Complete your user profile</h1> | ||
<p className="lead-paragraph">In order to complete your user profile and access the filing platform your financial institution must have a Legal Entity Identifier (LEI). Visit the Global LEI Foundation (GLEIF) website for information on how to obtain an LEI for your institution.</p> */} | ||
<h1 className="text-[26px] md:text-[30px] font-semibold leading-tight mb-[0.44117647em]">Complete your user profile</h1> | ||
<p className="text-[18px] md:text-[20px] font-normal leading-tight mb-[30px]">In order to complete your user profile and access the filing platform your financial institution must have a Legal Entity Identifier (LEI). Visit the Global LEI Foundation (GLEIF) website for information on how to obtain an LEI for your institution.</p> |
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.
Unintended duplicate paragraphs indicating user must have an LEI?
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.
Resolved
<div className="ml-5 mr-5"> | ||
<div className="max-w-[1200px] mx-auto mb-12"> | ||
<div className="max-w-[770px] mx-auto"> |
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.
Is it too early to turn these Tailwinded wrappers into reusable Form components? i.e. Do you think these styles would be used in other Steps and we could abstract this into a <FormWrapper>
or something like that?
Fine if not...just contemplating how to make things more readable.
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.
Resolved in 843c4bf
@shindigira |
@natalia-fitzgerald |
@meissadia Resolved in this PR #32. |
Co-authored-by: Meis <meissadia@gmail.com>
- Removed `console.log` Co-authored-by: Meis <meissadia@gmail.com>
Removed duplicate button Co-authored-by: Meis <meissadia@gmail.com>
Removed duplicate paragraph Co-authored-by: Meis <meissadia@gmail.com>
Merging this PR and focusing on on the follow-up PR #32 that will address any remaining issues. |
Closes #26
Closes #28
Changes
react-hook-form
,zod
and@hookform/resolvers
store
folder for hookszustand
andimmer
for state managementInputEntry
componentProfileForm.data.ts
to place data and mock datareact-select
and@types/react-select
packagessvgr
plugin to be able to import svg files