diff --git a/apps/edr-freight-web/backoffice/src/components/bookings/BookingActionsMenu.tsx b/apps/edr-freight-web/backoffice/src/components/bookings/BookingActionsMenu.tsx index 2fac40263..01a0db69a 100644 --- a/apps/edr-freight-web/backoffice/src/components/bookings/BookingActionsMenu.tsx +++ b/apps/edr-freight-web/backoffice/src/components/bookings/BookingActionsMenu.tsx @@ -8,6 +8,7 @@ import { useAuth } from "@/auth/useAuth"; import { getNextPendingApprovalStep, isAllocateAction, + isClearanceNavAction, isContractNavAction, listRowHasActions, type BookingActionContext, @@ -38,6 +39,7 @@ export function BookingActionsMenu({ reference: row.reference, approvalSteps: row.approvalSteps, schedulingStatus: row.schedulingStatus, + customsClearingEnabled: row.customsClearingEnabled, }; const flow = useBookingActionDialog(row.id, context); @@ -46,10 +48,15 @@ export function BookingActionsMenu({ const goToContract = () => navigate(`/dashboard/booking-requests/${row.id}/contract`); + const goToClearanceTab = () => + navigate(`/dashboard/booking-requests/${row.id}?tab=clearance`); + const handleAction = (action: (typeof actions)[number]) => { onSuppressRowClick?.(); if (isContractNavAction(action.id)) { goToContract(); + } else if (isClearanceNavAction(action.id)) { + goToClearanceTab(); } else if (isAllocateAction(action.id)) { onAllocateBooking?.(); } else { diff --git a/apps/edr-freight-web/backoffice/src/components/bookings/detail/ClearanceReviewSection.tsx b/apps/edr-freight-web/backoffice/src/components/bookings/detail/ClearanceReviewSection.tsx index 409f698d6..bb50168ad 100644 --- a/apps/edr-freight-web/backoffice/src/components/bookings/detail/ClearanceReviewSection.tsx +++ b/apps/edr-freight-web/backoffice/src/components/bookings/detail/ClearanceReviewSection.tsx @@ -44,9 +44,9 @@ const STATUS_META: Record< Freight.DocumentReviewStatus, { label: string; color: string } > = { - APPROVED: { label: "Approved", color: "edr-green" }, + APPROVED: { label: "Approved", color: "edr-blue" }, QUERIED: { label: "Queried", color: "red" }, - PENDING: { label: "Pending", color: "edr-slate" }, + PENDING: { label: "Pending", color: "edr-accent" }, }; /** @@ -142,7 +142,7 @@ export function ClearanceReviewSection({ if (isLoading || !clearance) { return ( - + Loading clearance… ); @@ -165,15 +165,15 @@ export function ClearanceReviewSection({ - + - + )} @@ -219,13 +219,13 @@ export function ClearanceReviewSection({ icon={Upload} title="Customs output documents" subtitle="Upload the cleared/customs paperwork to hand back to the customer." - accent="edr-blue" + accent="edr-accent" > {glDocs.map((doc) => ( - + {doc.label} {doc.required ? " *" : ""} @@ -239,7 +239,7 @@ export function ClearanceReviewSection({ href={doc.file.url} target="_blank" rel="noreferrer" - c="edr-blue" + c="edr-accent" style={{ display: "flex" }} > @@ -261,7 +261,7 @@ export function ClearanceReviewSection({ {...props} size="compact-xs" variant="light" - color="edr-green" + color="edr-accent" leftSection={} > {outputFiles[doc.fileKey] ? "Selected" : "Upload"} @@ -275,7 +275,7 @@ export function ClearanceReviewSection({