diff --git a/src/components/equipment-edit-form/index.tsx b/src/components/equipment-edit-form/index.tsx index 5d1290d7..5d3cc27f 100644 --- a/src/components/equipment-edit-form/index.tsx +++ b/src/components/equipment-edit-form/index.tsx @@ -4,7 +4,6 @@ import { AxiosResponse } from 'axios'; import { useEffect } from 'react'; import { Button, Flex, Grid, GridItem } from '@chakra-ui/react'; import { Datepicker } from '../form-fields/date'; -import { ControlledSelect } from '../form-fields/controlled-select'; import { ESTADOS_EQUIPAMENTO, @@ -16,28 +15,29 @@ import { Input } from '../form-fields/input'; import { TextArea } from '../form-fields/text-area'; import { toast } from '@/utils/toast'; import { api } from '@/config/lib/axios'; +import { NewControlledSelect } from '../form-fields/new-controlled-select'; export type EditEquipFormValues = { tippingNumber: string; serialNumber: string; - type: { value: string; label: string }; + type: string; situacao: string; model: string; description?: string; - initialUseDate: { value: number; label: string }; + initialUseDate: number; acquisitionDate: Date; screenSize?: string; invoiceNumber: string; power?: string; - screenType?: { value: string; label: string }; + screenType?: string; processor?: string; - storageType?: { value: string; label: string }; + storageType?: string; storageAmount?: string; brandName: string; acquisition: { name: string }; unitId?: string; ram_size?: string; - estado: { value: string; label: string }; + estado: string; }; interface EditEquipmentFormProps { @@ -114,11 +114,11 @@ export default function EquipmentEditForm({ const dateString = formatDate(acquisitionDate); const payload = { - type: type.value, - estado: estado.value, - initialUseDate: initialUseDate.value, - storageType: storageType?.value, - screenType: screenType?.value, + type, + estado, + initialUseDate, + storageType, + screenType, acquisitionDate: dateString, ...rest, }; @@ -141,13 +141,15 @@ export default function EquipmentEditForm({ return (