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) <noreply@anthropic.com>
This commit is contained in:
Hagernesh
2026-07-14 15:04:03 +00:00
parent 9c864a3121
commit b71a53c4a9
2 changed files with 8 additions and 4 deletions

View File

@@ -179,17 +179,17 @@ export function WarehouseInventoryTable({
{selectable && (
<Table.Td>
<Checkbox
aria-label={`Select ${item.bookingId ?? item.id}`}
aria-label={`Select ${item.bookingReference ?? item.booking?.reference ?? item.bookingId ?? item.id}`}
checked={selectedIds?.has(item.id) ?? false}
onChange={() => onToggleSelect?.(item.id)}
/>
</Table.Td>
)}
<Table.Td>
{item.bookingId ? (
<Tooltip label={item.bookingId} withArrow>
{item.bookingReference || item.booking?.reference || item.bookingId ? (
<Tooltip label={item.bookingId ?? ''} withArrow disabled={!item.bookingId}>
<Text size="sm" fw={600}>
{item.bookingId.slice(0, 8)}...
{item.bookingReference ?? item.booking?.reference ?? `${item.bookingId?.slice(0, 8)}...`}
</Text>
</Tooltip>
) : (

View File

@@ -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. */