adding pilots

This commit is contained in:
2024-07-27 21:42:54 -05:00
parent 1e5f6a72d8
commit d550c90184
3 changed files with 5 additions and 6 deletions

View File

@@ -83,12 +83,15 @@ const PilotForm: React.FC<PilotFormProps> = ({
<DrawerHeader text="Add Pilot" onClose={onOpenCloseDrawer} /> <DrawerHeader text="Add Pilot" onClose={onOpenCloseDrawer} />
<form onSubmit={methods.handleSubmit(onSubmit)}> <form onSubmit={methods.handleSubmit(onSubmit)}>
<DrawerBody> <DrawerBody>
<div className="grid grid-cols-1 gap-4"> <div className="grid grid-cols-3 gap-4">
<div className="col-span-1"> <div className="col-span-1">
<Typography variant="h5">Info</Typography> <Typography variant="h5">Info</Typography>
<hr className="my-3" /> <hr className="my-3" />
</div> </div>
<div className="col-span-1"> <div className="col-span-1">
<Typography>Name</Typography>
</div>
<div className="col-span-2">
<Controller <Controller
name="name" name="name"
control={methods.control} control={methods.control}
@@ -97,7 +100,7 @@ const PilotForm: React.FC<PilotFormProps> = ({
results={peoplePickerResults} results={peoplePickerResults}
inputProps={{ inputProps={{
disabled: disabled, disabled: disabled,
label: 'Name', // label: 'Name',
onChange: (event) => handlePeoplePickerOnChange(event), onChange: (event) => handlePeoplePickerOnChange(event),
value: value value: value
}} }}

View File

@@ -28,7 +28,6 @@ const PilotFormCertificates: React.FC<IPilotFormCertificates> = ({
{fields.map((field, index) => { {fields.map((field, index) => {
return ( return (
<> <>
{/* // <div key={field.id}> */}
<div> <div>
<Controller <Controller
name={`certificates.${index}.type`} name={`certificates.${index}.type`}
@@ -86,7 +85,6 @@ const PilotFormCertificates: React.FC<IPilotFormCertificates> = ({
<div> <div>
<Button onClick={() => remove(index)}>Remove</Button> <Button onClick={() => remove(index)}>Remove</Button>
</div> </div>
{/* </div> */}
</> </>
); );
})} })}

View File

@@ -28,7 +28,6 @@ const PilotFormEndorsements: React.FC<IPilotFormEndorsements> = ({
{fields.map((field, index) => { {fields.map((field, index) => {
return ( return (
<> <>
{/* // <div key={field.id}> */}
<div> <div>
<Controller <Controller
name={`endorsements.${index}.type`} name={`endorsements.${index}.type`}
@@ -74,7 +73,6 @@ const PilotFormEndorsements: React.FC<IPilotFormEndorsements> = ({
<div> <div>
<Button onClick={() => remove(index)}>Remove</Button> <Button onClick={() => remove(index)}>Remove</Button>
</div> </div>
{/* </div> */}
</> </>
); );
})} })}