From b71a53c4a98eec804907c16279222c764ecb61e6 Mon Sep 17 00:00:00 2001 From: Hagernesh Date: Tue, 14 Jul 2026 15:04:03 +0000 Subject: [PATCH] fix(warehouse): show booking reference instead of UUID in inventory table The inventory table's Booking column rendered a truncated bookingId UUID; use the bookingReference already attached to each row (fall back to the short UUID only when absent). Keep the UUID in the tooltip. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/components/warehouses/WarehouseInventoryTable.tsx | 8 ++++---- apps/edr-freight-web/backoffice/src/types/warehouse.ts | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/edr-freight-web/backoffice/src/components/warehouses/WarehouseInventoryTable.tsx b/apps/edr-freight-web/backoffice/src/components/warehouses/WarehouseInventoryTable.tsx index de262767f..060dc600e 100644 --- a/apps/edr-freight-web/backoffice/src/components/warehouses/WarehouseInventoryTable.tsx +++ b/apps/edr-freight-web/backoffice/src/components/warehouses/WarehouseInventoryTable.tsx @@ -179,17 +179,17 @@ export function WarehouseInventoryTable({ {selectable && ( onToggleSelect?.(item.id)} /> )} - {item.bookingId ? ( - + {item.bookingReference || item.booking?.reference || item.bookingId ? ( + - {item.bookingId.slice(0, 8)}... + {item.bookingReference ?? item.booking?.reference ?? `${item.bookingId?.slice(0, 8)}...`} ) : ( diff --git a/apps/edr-freight-web/backoffice/src/types/warehouse.ts b/apps/edr-freight-web/backoffice/src/types/warehouse.ts index 7a88b136e..348646dbb 100644 --- a/apps/edr-freight-web/backoffice/src/types/warehouse.ts +++ b/apps/edr-freight-web/backoffice/src/types/warehouse.ts @@ -217,6 +217,10 @@ export interface WarehouseInventoryItem { yard?: WarehouseYard | null; zone?: WarehouseZone | null; booking?: InventoryBookingRef | null; + /** Flat booking summary fields attached by the inventory list (attachBookingSummaries). */ + bookingReference?: string | null; + bookingStatus?: string | null; + customerName?: string | null; } /** Slim booking shape returned alongside inventory for the loading queue. */