Skip to content

Commit

Permalink
#105 fix: corrige build
Browse files Browse the repository at this point in the history
  • Loading branch information
DafneM committed Jun 4, 2023
1 parent 3507e0b commit 1c37d47
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/components/equipment-edit-form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export default function EquipmentEditForm({
defaultValues: equip,
});

console.log(equip);
const watchType = watch('type');

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/equipment-view-form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ export default function EquipmentViewForm({

<Input
label="Marca"
errors={errors.brand?.name}
{...register('brand.name', {
errors={errors.brandName}
{...register('brandName', {
required: 'Campo Obrigatório',
maxLength: 50,
})}
Expand Down
2 changes: 2 additions & 0 deletions src/components/equipment-view-modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ function transformFields(data: any) {
value: transformedData.initialUseDate.split('-')[0],
};

transformedData.brandName = transformedData.brand.name;

transformedData.acquisitionDate = new Date(transformedData.acquisitionDate);

return transformedData;
Expand Down

0 comments on commit 1c37d47

Please sign in to comment.