diff --git a/src/components/movement-form/index.tsx b/src/components/movement-form/index.tsx index 43c45ea7..f7e48e2b 100644 --- a/src/components/movement-form/index.tsx +++ b/src/components/movement-form/index.tsx @@ -203,11 +203,11 @@ export default function MovementForm({ materiais.includes(equipment.id) ? 'rgba(244, 147, 32, 0.2)' : 'white' } > - {equipment.type.name} - {equipment.brand.name} - {equipment.model} - {equipment.tippingNumber} - {equipment.serialNumber} + {equipment?.type?.name} + {equipment?.brand?.name} + {equipment?.model} + {equipment?.tippingNumber} + {equipment?.serialNumber} {equipment?.tippingNumber} - {equipment?.type.name} + {equipment?.type?.name} {equipment?.brand?.name} {equipment?.model} {equipment?.serialNumber} @@ -247,7 +247,7 @@ export function MovementsModal({ } equipments={selectedMoviment.equipments} date={selectedMoviment.date} - destination={selectedMoviment.destination.name} + destination={selectedMoviment?.destination?.name} /> } fileName={`termo_de_${ diff --git a/src/components/movements-pdf/MovementsPdfDocument.tsx b/src/components/movements-pdf/MovementsPdfDocument.tsx index 485f5f4d..60776cce 100644 --- a/src/components/movements-pdf/MovementsPdfDocument.tsx +++ b/src/components/movements-pdf/MovementsPdfDocument.tsx @@ -192,7 +192,7 @@ export function MovementsPDF({ {equipment?.tippingNumber} - {equipment?.type.name} + {equipment?.type?.name} {equipment?.brand?.name} diff --git a/src/components/side-bar/index.tsx b/src/components/side-bar/index.tsx index fbac8940..7cea1478 100644 --- a/src/components/side-bar/index.tsx +++ b/src/components/side-bar/index.tsx @@ -11,7 +11,6 @@ export const SideBar = memo(() => { { name: 'Controle de Equipamento', link: '/equipments' }, { name: 'Controle Ordem Serviço', link: '/order-services' }, { name: 'Movimentações', link: '/movements' }, - { name: 'Relatórios', link: '/reports' }, ]; const optionUser = [ { name: 'Controle de Cadastro', link: '/equipments-fields' }, diff --git a/src/pages/reports/Reports.tsx b/src/pages/reports/Reports.tsx index 4b97d524..2713d245 100644 --- a/src/pages/reports/Reports.tsx +++ b/src/pages/reports/Reports.tsx @@ -120,7 +120,7 @@ function ReportsTable() { const formattedWorkstations = (data: Workstation[]): ISelectOption[] => { return data?.map((item: Workstation) => { - return { label: item.name, value: item.name }; + return { label: item?.name, value: item?.name }; }); };