Skip to content

Page 6 #166

@MoheEdeen

Description

@MoheEdeen

Objective

Redesign the minors pages based on the figma, PULL FROM THE JOSEPH/CONNECTING BRANCH

Figma link:

https://www.figma.com/design/ZYieFH7oizlxCrnaiJfp2U/New-Registration?node-id=0-1&p=f&t=j1dNgwgsmnjtKh75-0

When doing it follow the format of the other pages, basically this:
Basically this is how portal works now:
There are some objects and props that are the same for all pages, these are it:
touched object: an array that stores all the inputs for the current page, and for each field it has true or false based on if it was touched (typed input, or checked box, etc)
Example:
touched: Object.fromEntries(
[...secondPageRequiredFields, ...secondPageOptionalFields].map((key) => [key, false])
),
pageNumberRequiredFields: the required fields in the current page that needs to be filled (like first name)
pageNumberOptionalFields: the optional fields that u dont need to fill (like address)
pageNumberOptionalRequiredFields: the required fields that appear when an optional field is selected (for example if u select other school which is an optional field u are required to write what is the other school which is the optional required field.
showState(field): show state basically checked if something is touched and not filled and if it is then it shows the PLEASE FILL WHATEVER
showInvalid(field): return true or false if its touched and wasnt filled
validateForm(field): loop through every field and check if its valid (filled) and return true or false

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions