diff --git a/src/data/box/box.model.ts b/src/data/box/box.model.ts index bc12102..6037198 100644 --- a/src/data/box/box.model.ts +++ b/src/data/box/box.model.ts @@ -82,7 +82,7 @@ export type UpdateBoxBodyType = { passportId?: number; status?: BoxStatus; packetId?: string; - print: boolean; + print?: boolean; // clientId: number; cargoId?: string; diff --git a/src/routes/private/boxes-create/DashboardCreateBox.tsx b/src/routes/private/boxes-create/DashboardCreateBox.tsx index ce6dda3..1ea8a68 100644 --- a/src/routes/private/boxes-create/DashboardCreateBox.tsx +++ b/src/routes/private/boxes-create/DashboardCreateBox.tsx @@ -277,7 +277,7 @@ const DashboardCreateBoxPage = ({ initialValues, partiesData }: Props) => { const item_delete_promises = initialValues.products_list .filter(item => { - if (!updateBody.items.find(i => String(i.id) === String(item.id))) { + if (!updateBody.items?.find(i => String(i.id) === String(item.id))) { return true; } else { return false;