diff --git a/apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage.tsx b/apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage.tsx
index f7364af47..fc725c368 100644
--- a/apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage.tsx
+++ b/apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage.tsx
@@ -59,10 +59,11 @@ import { cn } from "@/lib/utils";
import useAuth from "@/hooks/useAuth";
const PROGRESS_STAGES = [
- { label: "Request", icon: FileText, statuses: ["DRAFT"] },
- { label: "Approval", icon: ClipboardCheck, statuses: ["CONFIRMED"] },
- { label: "In Transit", icon: Train, statuses: ["IN_TRANSIT"] },
- { label: "Complete", icon: PackageCheck, statuses: ["DELIVERED"] },
+ { label: "Request", icon: FileText, statuses: ["DRAFT", "CHANGES_REQUESTED"] },
+ { label: "Submitted", icon: ClipboardCheck, statuses: ["SUBMITTED", "PENDING_APPROVAL"] },
+ { label: "Approved", icon: ShieldCheck, statuses: ["APPROVED_PENDING_SIGNATURE", "APPROVED", "CONTRACT_READY", "SIGNED_CUSTOMER", "FULLY_EXECUTED"] },
+ { label: "In Transit", icon: Train, statuses: ["PNR_GENERATED", "PAYMENT_VERIFICATION_IN_PROGRESS", "PAID", "IN_TRANSIT", "PENDING_CONSOLIDATION", "CONSOLIDATED"] },
+ { label: "Complete", icon: PackageCheck, statuses: ["COMPLETED", "DELIVERED"] },
];
const STATUS_MAP: Record<
@@ -75,23 +76,107 @@ const STATUS_MAP: Record<
color: "text-muted-foreground",
stage: 0,
},
- CONFIRMED: {
- title: "Booking Confirmed",
- description: "Booking has been confirmed and approved.",
+ CHANGES_REQUESTED: {
+ title: "Changes Requested",
+ description: "Staff has requested changes. Please review and resubmit.",
+ color: "text-amber-600",
+ stage: 0,
+ },
+ SUBMITTED: {
+ title: "Submitted",
+ description: "Your booking has been submitted for review.",
color: "text-primary",
stage: 1,
},
+ PENDING_APPROVAL: {
+ title: "Pending Approval",
+ description: "Booking is in the approval process.",
+ color: "text-primary",
+ stage: 1,
+ },
+ APPROVED_PENDING_SIGNATURE: {
+ title: "Awaiting Signature",
+ description: "Approved — pending contract signature.",
+ color: "text-primary",
+ stage: 2,
+ },
+ APPROVED: {
+ title: "Approved",
+ description: "Booking has been fully approved.",
+ color: "text-primary",
+ stage: 2,
+ },
+ CONTRACT_READY: {
+ title: "Contract Ready",
+ description: "Contract is available for review and signature.",
+ color: "text-primary",
+ stage: 2,
+ },
+ SIGNED_CUSTOMER: {
+ title: "Customer Signed",
+ description: "Customer has signed. Awaiting staff signature.",
+ color: "text-primary",
+ stage: 2,
+ },
+ FULLY_EXECUTED: {
+ title: "Fully Executed",
+ description: "Contract has been fully signed and executed.",
+ color: "text-primary",
+ stage: 2,
+ },
+ PNR_GENERATED: {
+ title: "PNR Generated",
+ description: "Payment reference number generated.",
+ color: "text-primary",
+ stage: 3,
+ },
+ PAYMENT_VERIFICATION_IN_PROGRESS: {
+ title: "Payment Verification",
+ description: "Payment is being verified.",
+ color: "text-primary",
+ stage: 3,
+ },
+ PAID: {
+ title: "Paid",
+ description: "Payment has been confirmed.",
+ color: "text-primary",
+ stage: 3,
+ },
IN_TRANSIT: {
title: "Cargo Moving",
description: "Shipment is currently moving through the rail network.",
color: "text-primary",
- stage: 2,
+ stage: 3,
+ },
+ PENDING_CONSOLIDATION: {
+ title: "Pending Consolidation",
+ description: "Awaiting consolidation partner.",
+ color: "text-primary",
+ stage: 3,
+ },
+ CONSOLIDATED: {
+ title: "Consolidated",
+ description: "Cargo has been consolidated with partner shipment.",
+ color: "text-primary",
+ stage: 3,
+ },
+ COMPLETED: {
+ title: "Service Complete",
+ description: "Cargo delivered and service successfully terminated.",
+ color: "text-primary",
+ stage: 4,
},
DELIVERED: {
title: "Service Complete",
description: "Cargo delivered and service successfully terminated.",
color: "text-primary",
- stage: 3,
+ stage: 4,
+ },
+ REJECTED: {
+ title: "Rejected",
+ description: "This booking request has been rejected.",
+ color: "text-destructive",
+ stage: -1,
},
CANCELLED: {
title: "Cancelled",
@@ -178,7 +263,7 @@ export default function BookingDetailPage() {
);
}
- if (booking.status === "DRAFT") {
+ if (booking.status === "DRAFT" || booking.status === "CHANGES_REQUESTED") {
return (
- Complete the steps below to submit your booking request. + {booking.status === "CHANGES_REQUESTED" + ? "Staff has requested changes. Please review, update, and resubmit." + : "Complete the steps below to submit your booking request."}
@@ -334,6 +421,16 @@ function DraftBookingView({ + {booking.status === "CHANGES_REQUESTED" && booking.latestChangeRequestNote && ( +Changes Requested by Staff
+{booking.latestChangeRequestNote}
+