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 */} + + + + 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. */