From fd4c4d630faa59cad5b2b9dc86e295474b362bb5 Mon Sep 17 00:00:00 2001 From: Hagernesh Date: Wed, 15 Jul 2026 07:49:28 +0000 Subject: [PATCH] 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 */} + + + +