proper interface usage
This commit is contained in:
@ -4,6 +4,7 @@ export interface IDriver {
|
||||
snils: string
|
||||
birthday: string
|
||||
iin: string
|
||||
license?: IDriverLicense[]
|
||||
}
|
||||
|
||||
export interface IDriverLicense {
|
||||
|
||||
@ -329,7 +329,7 @@ const handleDeleteLicense = async (licenseId: number) => {
|
||||
</Table.Thead>
|
||||
<Table.Tbody>
|
||||
{drivers.flatMap(driver =>
|
||||
driver.license?.map(license => (
|
||||
driver.license?.map((license: IDriverLicense) => (
|
||||
<Table.Tr key={license.id}>
|
||||
<Table.Td>{driver.fullname}</Table.Td>
|
||||
<DriverLicense
|
||||
@ -393,13 +393,11 @@ const handleDeleteLicense = async (licenseId: number) => {
|
||||
<MaskedDateInput
|
||||
label="Дата выдачи"
|
||||
required
|
||||
flex={1}
|
||||
{...licenseForm.getInputProps("form_date")}
|
||||
/>
|
||||
<MaskedDateInput
|
||||
label="Срок действия"
|
||||
required
|
||||
flex={1}
|
||||
{...licenseForm.getInputProps("to_date")}
|
||||
/>
|
||||
</Flex>
|
||||
|
||||
Reference in New Issue
Block a user