mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 13:28:11 +00:00
Merge pull request #458 from Tria-plc/freight_feature/usermanagement
refactor: remove gate pass granting logic from clearance services and UI
This commit is contained in:
@@ -391,35 +391,6 @@ export const contractsService = {
|
||||
return unwrap(response.data) as Freight.ClearanceT1State;
|
||||
},
|
||||
|
||||
/** Train schedules carrying customs bookings — GL DJ gate-pass table. */
|
||||
getDjClearanceSchedules: async (): Promise<Freight.DjClearanceSchedule[]> => {
|
||||
const response = await client.get(C.CLEARANCE_DJ_SCHEDULES);
|
||||
return unwrap(response.data) as Freight.DjClearanceSchedule[];
|
||||
},
|
||||
|
||||
/** Gate pass for every customs booking on a train schedule (captures time). */
|
||||
grantScheduleGatepass: async (
|
||||
scheduleId: string,
|
||||
gatepassAt?: string,
|
||||
): Promise<{ granted: number; skipped: Array<{ bookingId: string; error: string }> }> => {
|
||||
const response = await client.post(C.CLEARANCE_SCHEDULE_GATEPASS(scheduleId), {
|
||||
gatepassAt,
|
||||
});
|
||||
return unwrap(response.data) as {
|
||||
granted: number;
|
||||
skipped: Array<{ bookingId: string; error: string }>;
|
||||
};
|
||||
},
|
||||
|
||||
/** Gate pass for a single customs booking (captures time). */
|
||||
grantGatepass: async (
|
||||
bookingId: string,
|
||||
gatepassAt?: string,
|
||||
): Promise<{ bookingId: string; gatepassAt: string }> => {
|
||||
const response = await client.post(C.BOOKING_GATEPASS(bookingId), { gatepassAt });
|
||||
return unwrap(response.data) as { bookingId: string; gatepassAt: string };
|
||||
},
|
||||
|
||||
/** GL DJ raises the post-offload final invoice (amount + invoice document). */
|
||||
sendFinalInvoice: async (
|
||||
bookingId: string,
|
||||
|
||||
Reference in New Issue
Block a user