feat: enhance cargo details handling and add document clearance features

- Improved handling of commodity selection in the cargo details form to prevent unwanted resets on re-renders.
- Added `isReefer` flag to the CreateBookingDto interface for booking-level refrigerated status.
- Introduced a new configuration file for clearance tabs to manage document clearance views.
- Implemented DocumentClearanceDetailPage for detailed review and management of clearance documents.
- Created DocumentClearanceListPage for listing and filtering clearance bookings with enhanced UI components.
This commit is contained in:
Marshal
2026-06-25 01:28:45 +00:00
parent c8377958a8
commit 23b353999a
15 changed files with 1545 additions and 799 deletions

View File

@@ -0,0 +1,26 @@
import type { LucideIcon } from "lucide-react";
import { Layers, ShieldCheck, ShipWheel, Truck } from "lucide-react";
/**
* The document-clearance queue is a single backend status
* (`DOCUMENTS_UNDER_REVIEW`); the tabs slice that queue by the operational axis
* that matters to a clearance officer — trade direction and customs scope —
* rather than by booking status (which is uniform here).
*/
export type ClearanceTabKey = "all" | "import" | "export" | "customs";
export interface ClearanceTab {
key: ClearanceTabKey;
label: string;
icon: LucideIcon;
}
export const CLEARANCE_TABS: ClearanceTab[] = [
{ key: "all", label: "All", icon: Layers },
{ key: "import", label: "Import", icon: Truck },
{ key: "export", label: "Export", icon: ShipWheel },
{ key: "customs", label: "With customs", icon: ShieldCheck },
];
/** The backend booking status that places a booking in the clearance queue. */
export const CLEARANCE_REVIEW_STATUS = "DOCUMENTS_UNDER_REVIEW";