-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update enrollment form info modal (#70)
Co-authored-by: Rudra Patel <patelrudra2003@gmail.com>
- Loading branch information
1 parent
be27830
commit caff8f6
Showing
33 changed files
with
1,465 additions
and
550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
151 changes: 0 additions & 151 deletions
151
src/components/AdminDashboard/PendingApplicationDashboard/PendingApplicationInfoModal.tsx
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
...s/AdminDashboard/PendingApplicationDashboard/PendingApplicationInfoModal/FormResponse.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Typography } from "@mui/material"; | ||
|
||
type FormResponse = { | ||
label: string; | ||
value: string; | ||
isListItem?: boolean; | ||
}; | ||
|
||
export default function FormResponse({ | ||
label, | ||
value, | ||
isListItem = false, | ||
}: FormResponse) { | ||
if (isListItem) { | ||
return ( | ||
<Typography> | ||
<Typography component="span" sx={{ fontWeight: "bold" }}> | ||
- {label}:{" "} | ||
</Typography> | ||
{value} | ||
</Typography> | ||
); | ||
} else { | ||
return ( | ||
<Typography> | ||
<Typography component="span" sx={{ fontWeight: "bold" }}> | ||
{label}:{" "} | ||
</Typography> | ||
{value} | ||
</Typography> | ||
); | ||
} | ||
} |
148 changes: 148 additions & 0 deletions
148
...d/PendingApplicationDashboard/PendingApplicationInfoModal/GeneralInformationResponses.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
import { Box, Typography } from "@mui/material"; | ||
|
||
import FormResponse from "@/components/AdminDashboard/PendingApplicationDashboard/PendingApplicationInfoModal/FormResponse"; | ||
import { GeneralInformationSection } from "@/types/EnrollmentForm"; | ||
|
||
type GeneralInformationResponsesProps = { | ||
generalInformationSection: GeneralInformationSection; | ||
}; | ||
|
||
export default function GeneralInformationResponses({ | ||
generalInformationSection, | ||
}: GeneralInformationResponsesProps) { | ||
return ( | ||
<Box> | ||
<Typography variant="h5" gutterBottom> | ||
General Information Responses | ||
</Typography> | ||
<Box | ||
sx={{ | ||
display: "flex", | ||
flexDirection: "column", | ||
gap: 2, | ||
}} | ||
> | ||
<FormResponse | ||
label="First Name" | ||
value={generalInformationSection.firstName} | ||
/> | ||
<FormResponse | ||
label="Last Name" | ||
value={generalInformationSection.lastName} | ||
/> | ||
<FormResponse label="Email" value={generalInformationSection.email} /> | ||
<FormResponse | ||
label="Phone Number" | ||
value={generalInformationSection.phoneNumber} | ||
/> | ||
<FormResponse | ||
label="Date of Birth" | ||
value={generalInformationSection.dateOfBirth} | ||
/> | ||
<FormResponse label="Sex" value={generalInformationSection.sex} /> | ||
<FormResponse | ||
label="Address" | ||
value={generalInformationSection.address} | ||
/> | ||
<FormResponse | ||
label="Preferred Method of Contact" | ||
value={generalInformationSection.preferredMethodOfContact} | ||
/> | ||
<FormResponse | ||
label="U.S. Citizen" | ||
value={generalInformationSection.isUsCitizen ? "Yes" : "No"} | ||
/> | ||
<FormResponse | ||
label="Class A CDL" | ||
value={generalInformationSection.hasClassACdl ? "Yes" : "No"} | ||
/> | ||
{generalInformationSection.hasClassACdl && ( | ||
<FormResponse | ||
label="CDL Number" | ||
value={generalInformationSection.cdlNumber || "Not Provided"} | ||
/> | ||
)} | ||
<FormResponse | ||
label="Trucking Industry Affiliation" | ||
value={generalInformationSection.truckingIndustryAffiliation} | ||
/> | ||
<FormResponse | ||
label="Job Description" | ||
value={generalInformationSection.jobDescription} | ||
/> | ||
<FormResponse | ||
label="Referral Source" | ||
value={generalInformationSection.referralSource} | ||
/> | ||
{generalInformationSection.employer.name && ( | ||
<FormResponse | ||
label="Employer Name" | ||
value={generalInformationSection.employer.name} | ||
/> | ||
)} | ||
{generalInformationSection.employer.contact && ( | ||
<FormResponse | ||
label="Employer Contact" | ||
value={generalInformationSection.employer.contact} | ||
/> | ||
)} | ||
|
||
<FormResponse | ||
label="Monthly Household Expenses" | ||
value={`$${generalInformationSection.monthlyHouseholdExpenses}`} | ||
/> | ||
<FormResponse | ||
label="Is A Owner Or Operator" | ||
value={generalInformationSection.isOwnerOperator ? "Yes" : "No"} | ||
/> | ||
{generalInformationSection.isOwnerOperator && ( | ||
<Box display="flex" flexDirection="column" gap={1}> | ||
<FormResponse | ||
label="Business Income" | ||
value={ | ||
generalInformationSection.ownerOperatorInfo.businessIncome | ||
? `$${generalInformationSection.ownerOperatorInfo.businessIncome}` | ||
: "Not Provided" | ||
} | ||
isListItem={true} | ||
/> | ||
<FormResponse | ||
label="Business Expenses" | ||
value={ | ||
generalInformationSection.ownerOperatorInfo.businessExpenses | ||
? `$${generalInformationSection.ownerOperatorInfo.businessExpenses}` | ||
: "Not Provided" | ||
} | ||
isListItem={true} | ||
/> | ||
</Box> | ||
)} | ||
<FormResponse | ||
label="Acknowledged Privacy Notice" | ||
value={ | ||
generalInformationSection.hasAcknowledgedPrivacyNotice | ||
? "Yes" | ||
: "No" | ||
} | ||
/> | ||
<FormResponse | ||
label="Acknowledged HIPAA Notice" | ||
value={ | ||
generalInformationSection.hasAcknowledgedHipaaNotice ? "Yes" : "No" | ||
} | ||
/> | ||
{generalInformationSection.doctors.map((doctor, index) => ( | ||
<Box key={doctor.id} display="flex" flexDirection="column" gap={1}> | ||
<Typography variant="h6">Doctor {index + 1}</Typography> | ||
<FormResponse label="Name" value={doctor.name} isListItem={true} /> | ||
<FormResponse | ||
label="Phone" | ||
value={doctor.phone} | ||
isListItem={true} | ||
/> | ||
</Box> | ||
))} | ||
</Box> | ||
</Box> | ||
); | ||
} |
Oops, something went wrong.