mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 15:30:56 +00:00
refactor: remove gate pass granting logic from clearance services and UI
- Removed the gate pass granting functionality from the BookingClearanceService and ContractClearanceService, replacing it with a new method to retrieve gate pass status from train schedules. - Updated the ContractsController to eliminate endpoints related to gate pass granting. - Refactored the UI components (ExportClearanceStepper and PhasedClearanceActionPanel) to reflect the new gate pass securing process, linking to the train scheduling interface instead. - Cleaned up related constants and query hooks, removing unused code and references to the gate pass functionality. - Adjusted types in the contracts to accommodate changes in the gate pass handling logic.
This commit is contained in:
@@ -265,6 +265,7 @@ export interface ClearanceT1State {
|
||||
|
||||
/** Train link state for the booking tied to a customs clearance flow. */
|
||||
export interface ClearanceTrainState {
|
||||
scheduleId: string | null;
|
||||
wagonAllocated: boolean;
|
||||
departedAt: string | null;
|
||||
arrivedAt: string | null;
|
||||
@@ -305,31 +306,6 @@ export interface ClearanceSecondDuty {
|
||||
paid: boolean;
|
||||
}
|
||||
|
||||
/** A customs booking riding a train schedule, as shown on the GL DJ schedules tab. */
|
||||
export interface DjClearanceScheduleBooking {
|
||||
bookingId: string;
|
||||
reference: string;
|
||||
tradeDirection: string;
|
||||
contractId: string | null;
|
||||
gatepassGranted: boolean;
|
||||
gatepassAt: string | null;
|
||||
}
|
||||
|
||||
/** Train schedule row for the GL Djibouti gate-pass table. */
|
||||
export interface DjClearanceSchedule {
|
||||
id: string;
|
||||
trainNumber: string | null;
|
||||
routeName: string | null;
|
||||
origin: string | null;
|
||||
destination: string | null;
|
||||
status: string;
|
||||
scheduledDepartureDate: string | null;
|
||||
actualDepartureAt: string | null;
|
||||
actualArrivalAt: string | null;
|
||||
freightType: string | null;
|
||||
customsBookings: DjClearanceScheduleBooking[];
|
||||
}
|
||||
|
||||
export interface ContractClearanceView {
|
||||
contractId: string;
|
||||
/** Overall contract status (e.g. CLEARANCE_UNDER_REVIEW). */
|
||||
|
||||
Reference in New Issue
Block a user