From 35b057da1d62b580ad3ceeeb1a88d71253a32ca2 Mon Sep 17 00:00:00 2001 From: natib21 Date: Sat, 20 Jun 2026 13:25:32 +0000 Subject: [PATCH] fix --- .../src/pages/operations/LastMilePage.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/apps/edr-freight-web/backoffice/src/pages/operations/LastMilePage.tsx b/apps/edr-freight-web/backoffice/src/pages/operations/LastMilePage.tsx index e5b4b7643..0c96311df 100644 --- a/apps/edr-freight-web/backoffice/src/pages/operations/LastMilePage.tsx +++ b/apps/edr-freight-web/backoffice/src/pages/operations/LastMilePage.tsx @@ -3,6 +3,7 @@ import { ArrowRight, Eye, MoreHorizontal, + Printer, RefreshCw, Truck, } from "lucide-react"; @@ -313,6 +314,11 @@ const LastMilePage = () => { }); }; + const handlePrintTripSlip = (job: LastMileJob) => { + // Placeholder — wire to the trip-slip document service when available. + toast({ title: "Printing trip slip", description: job.bookingRef }); + }; + const columns = useMemo((): ColumnDef[] => { const headerClassName = ruleEngineTable.headerCell; const cellClassName = ruleEngineTable.bodyCell; @@ -386,6 +392,9 @@ const LastMilePage = () => { cell: ({ row }) => { const isAssigned = row.original.status === "ASSIGNED"; const nextStatus = NEXT_DELIVERY_STATUS[row.original.deliveryStatus]; + const canPrintTripSlip = + row.original.deliveryStatus === "READY_TO_TRANSIT" || + row.original.deliveryStatus === "DELIVERED"; return ( @@ -426,6 +435,14 @@ const LastMilePage = () => { > View detail + {canPrintTripSlip && ( + } + onClick={() => handlePrintTripSlip(row.original)} + > + Print trip slip + + )}