finilize gl

This commit is contained in:
marshal
2026-07-02 12:06:17 +03:00
parent 9c18d086d7
commit 4fefe4f827
50 changed files with 5150 additions and 1793 deletions

View File

@@ -348,9 +348,14 @@ export const bookingsService = {
finalizePreClearance: (id: string) =>
postBooking<BookingDetail>(B.CLEARANCE_FINALIZE_PRE(id)),
uploadTransitPermit: async (id: string, file: File): Promise<BookingDetail> => {
uploadTransitPermit: async (
id: string,
files: Record<string, File | null>,
): Promise<BookingDetail> => {
const form = new FormData();
form.append("file", file);
for (const [key, file] of Object.entries(files)) {
if (file) form.append(key, file);
}
const response = await client.post(B.CLEARANCE_TRANSIT_PERMIT(id), form, {
headers: { "Content-Type": "multipart/form-data" },
});

View File

@@ -268,10 +268,12 @@ export const contractsService = {
uploadContractTransitPermit: async (
id: string,
file: File,
files: Record<string, File | null>,
): Promise<Freight.IContract> => {
const form = new FormData();
form.append("file", file);
for (const [key, file] of Object.entries(files)) {
if (file) form.append(key, file);
}
const response = await client.post(C.CLEARANCE_TRANSIT_PERMIT(id), form, {
headers: { "Content-Type": "multipart/form-data" },
});
@@ -314,6 +316,9 @@ export const contractsService = {
confirmExportRelease: (id: string) =>
postContract<Freight.IContract>(C.CLEARANCE_EXPORT_RELEASE(id)),
finalizeExportClearance: (id: string) =>
postContract<Freight.IContract>(C.CLEARANCE_FINALIZE_EXPORT(id)),
uploadTransportDocument: async (bookingId: string, file: File) => {
const form = new FormData();
form.append("file", file);