diff --git a/apps/edr-freight-web/backoffice/src/pages/warehouses/ImportTrucksPage.tsx b/apps/edr-freight-web/backoffice/src/pages/warehouses/ImportTrucksPage.tsx index c82a3e9bb..84d103003 100644 --- a/apps/edr-freight-web/backoffice/src/pages/warehouses/ImportTrucksPage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/warehouses/ImportTrucksPage.tsx @@ -50,11 +50,14 @@ import type { ImportUnloadedItem } from "@/types/warehouse"; * would be several hundred requests for rows nobody opened. */ -const COLS = 9; +const COLS = 11; const money = (amount: number, currency: string) => `${Number(amount).toLocaleString(undefined, { maximumFractionDigits: 2 })} ${currency === "ETB" ? "ETB" : currency}`; +const formatTime = (iso: string | null | undefined) => + iso ? new Date(iso).toLocaleString() : "—"; + interface BookingGroup { bookingId: string; bookingReference: string; @@ -103,6 +106,8 @@ interface TruckRow { demurrage: number; storage: number; vehicleId: string | null; + arrivedAt: string | null; + departedAt: string | null; } /** @@ -185,6 +190,8 @@ function TruckRows({ group }: { group: BookingGroup }) { truckType: t.truckType, containers, vehicleId: t.vehicleId, + arrivedAt: t.arrivedAt, + departedAt: t.departedAt, ...costsFor(containers), }; }; @@ -197,6 +204,8 @@ function TruckRows({ group }: { group: BookingGroup }) { truckType: t.truckType, containers, vehicleId: null, + arrivedAt: t.arrivedAt ?? null, + departedAt: t.departedAt ?? null, ...costsFor(containers), }; }; @@ -283,6 +292,12 @@ function TruckRows({ group }: { group: BookingGroup }) {