From b71a53c4a98eec804907c16279222c764ecb61e6 Mon Sep 17 00:00:00 2001 From: Hagernesh Date: Tue, 14 Jul 2026 15:04:03 +0000 Subject: [PATCH 1/2] 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. */ From fd4c4d630faa59cad5b2b9dc86e295474b362bb5 Mon Sep 17 00:00:00 2001 From: Hagernesh Date: Wed, 15 Jul 2026 07:49:28 +0000 Subject: [PATCH 2/2] fix(warehouse): disable Receive-At-Warehouse once booking is received The Warehouse Information card kept the receive button active after the booking already had an inventory record. Disable it (relabel "Received At Warehouse", add a tooltip) when an inventory item exists. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../warehouses/WarehouseInfoCard.tsx | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/apps/edr-freight-web/backoffice/src/components/warehouses/WarehouseInfoCard.tsx b/apps/edr-freight-web/backoffice/src/components/warehouses/WarehouseInfoCard.tsx index e28513821..6bda9e88d 100644 --- a/apps/edr-freight-web/backoffice/src/components/warehouses/WarehouseInfoCard.tsx +++ b/apps/edr-freight-web/backoffice/src/components/warehouses/WarehouseInfoCard.tsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { Badge, Button, Card, Divider, Group, Stack, Text } from '@mantine/core'; +import { Badge, Button, Card, Divider, Group, Stack, Text, Tooltip } from '@mantine/core'; import { PackagePlus, Train as TrainIcon, Warehouse as WarehouseIcon } from 'lucide-react'; import { useQuery } from '@tanstack/react-query'; @@ -126,14 +126,24 @@ export function WarehouseInfoCard({ bookingId, bookingReference }: WarehouseInfo )} - + {/* span wrapper so the tooltip still fires on the disabled button */} + + + +