From c04859d333f94ecd1c709b4acb07ade326599103 Mon Sep 17 00:00:00 2001 From: Hagernesh Date: Mon, 17 Aug 2026 11:02:11 +0000 Subject: [PATCH] fix(warehouses): add container size to standalone container-return form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backend already accepted containerSize ('20'|'40') on CreateEmptyContainerReturnDto and enforces one-40ft-or-two-20ft-per-wagon via assertWagonLoad — the Standalone Return modal just never collected it. Add a Container Type select and wire it into the submit payload. --- .../src/pages/warehouses/ContainerReturnsPage.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/edr-freight-web/backoffice/src/pages/warehouses/ContainerReturnsPage.tsx b/apps/edr-freight-web/backoffice/src/pages/warehouses/ContainerReturnsPage.tsx index 0510ca997..685e7d2a3 100644 --- a/apps/edr-freight-web/backoffice/src/pages/warehouses/ContainerReturnsPage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/warehouses/ContainerReturnsPage.tsx @@ -961,6 +961,7 @@ interface StandaloneReturnModalProps { function StandaloneReturnModal({ opened, onClose, onSubmit, loading }: StandaloneReturnModalProps) { const [containerNumber, setContainerNumber] = useState(""); + const [containerSize, setContainerSize] = useState(null); const [returnedBy, setReturnedBy] = useState<"EDR" | "CUSTOMER" | null>(null); const [returnDate, setReturnDate] = useState(new Date().toISOString().split("T")[0]); const [warehouse, setWarehouse] = useState(null); @@ -1021,6 +1022,7 @@ function StandaloneReturnModal({ opened, onClose, onSubmit, loading }: Standalon containers: [ { containerNumber, + containerSize: containerSize ?? undefined, returnDate, warehouse: selectedWarehouse?.name || warehouse, yard: selectedYard?.name, @@ -1034,6 +1036,7 @@ function StandaloneReturnModal({ opened, onClose, onSubmit, loading }: Standalon }); setContainerNumber(""); + setContainerSize(null); setReturnedBy(null); setReturnDate(new Date().toISOString().split("T")[0]); setWarehouse(null); @@ -1071,6 +1074,17 @@ function StandaloneReturnModal({ opened, onClose, onSubmit, loading }: Standalon required /> +