From 34e139a283d7c47f2e66c39e16b209f9afe38e53 Mon Sep 17 00:00:00 2001 From: Noah Spannbauer Date: Fri, 28 Feb 2025 20:53:38 -0600 Subject: [PATCH] adding medical certificate to pilot form --- app/src/components/pilotForm/PilotForm.tsx | 80 ++++--------------- app/src/components/pilotForm/reducer.ts | 0 .../pilotFormMedical/PilotFormMedical.tsx | 77 ++++++++++++++++++ .../PilotFormMedicalProps.interface.ts | 3 + docker-compose.yaml | 5 +- 5 files changed, 100 insertions(+), 65 deletions(-) create mode 100644 app/src/components/pilotForm/reducer.ts create mode 100644 app/src/components/pilotFormMedical/PilotFormMedical.tsx create mode 100644 app/src/components/pilotFormMedical/PilotFormMedicalProps.interface.ts diff --git a/app/src/components/pilotForm/PilotForm.tsx b/app/src/components/pilotForm/PilotForm.tsx index 25f1c7a..4bbdfff 100644 --- a/app/src/components/pilotForm/PilotForm.tsx +++ b/app/src/components/pilotForm/PilotForm.tsx @@ -1,12 +1,15 @@ import { useEffect, useState } from 'react'; import { useForm, Controller, FormProvider } from 'react-hook-form'; import { + Accordion, Button, + DatePicker, Drawer, Grid, IconButton, PeoplePicker, SaveIcon, + Select, StateSelect, TextField, Typography, @@ -19,6 +22,7 @@ import { useAccessToken } from '../../hooks/accessToken/UseAcessToken'; import { useIsAuthenticated } from '@azure/msal-react'; import { FormMode } from '../../enums/formMode'; import { Person } from '@microsoft/microsoft-graph-types'; +import PilotFormMedical from '../pilotFormMedical/PilotFormMedical'; const PilotForm: React.FC = ({ pilotId, @@ -47,7 +51,9 @@ const PilotForm: React.FC = ({ state: '', postalCode: '', email: '', - phone: '' + phone: '', + medicalClass: '', + medicalExpiration: '' }; const methods = useForm({ defaultValues: defaultValues @@ -103,6 +109,7 @@ const PilotForm: React.FC = ({ }; const onSubmit = async (data: unknown) => { + console.log(data) try { setIsLoading(true); @@ -363,6 +370,11 @@ const PilotForm: React.FC = ({ )} /> + + +