proper interface usage

This commit is contained in:
2025-08-26 12:44:28 +09:00
parent 7944581a45
commit c5afd523fb
2 changed files with 2 additions and 3 deletions

View File

@ -4,6 +4,7 @@ export interface IDriver {
snils: string
birthday: string
iin: string
license?: IDriverLicense[]
}
export interface IDriverLicense {

View File

@ -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>