update import gl flow

This commit is contained in:
Marshal
2026-07-02 13:27:59 +00:00
parent fe40d9f4be
commit fec2a5d320
12 changed files with 452 additions and 252 deletions

View File

@@ -333,6 +333,27 @@ export const contractsService = {
return unwrap(response.data);
},
/** GL Djibouti uploads T1 transit documents (multi-file, post wagon allocation). */
uploadT1Documents: async (
bookingId: string,
files: Record<string, File | null>,
) => {
const form = new FormData();
for (const [key, file] of Object.entries(files)) {
if (file) form.append(key, file);
}
const response = await client.post(C.BOOKING_T1_DOCUMENTS(bookingId), form, {
headers: { "Content-Type": "multipart/form-data" },
});
return unwrap(response.data);
},
/** GL Ethiopia closes (accepts) the T1 document set after the train arrives. */
closeT1: async (bookingId: string): Promise<Freight.ClearanceT1State> => {
const response = await client.post(C.BOOKING_T1_CLOSE(bookingId));
return unwrap(response.data) as Freight.ClearanceT1State;
},
// ── Path A self-clearance (Operations review) ──
getOpsClearanceQueue: async (): Promise<PaginatedContracts> => {
const response = await client.get<PaginatedContracts>(