add customs clearing filter and enhance clearance documents page for non-customs contracts

This commit is contained in:
Marshal
2026-07-12 14:14:21 +00:00
parent 84ba56f7d0
commit e7e5b93ffc
10 changed files with 417 additions and 10 deletions

View File

@@ -457,9 +457,14 @@ export const contractsService = {
},
// ── Path A self-clearance (Operations review) ──
getOpsClearanceQueue: async (): Promise<PaginatedContracts> => {
getOpsClearanceQueue: async (filter?: {
page?: number;
pageSize?: number;
search?: string;
}): Promise<PaginatedContracts> => {
const response = await client.get<PaginatedContracts>(
C.OPS_CLEARANCE_QUEUE,
{ params: filter },
);
const data = unwrap(response.data);
return {
@@ -474,8 +479,15 @@ export const contractsService = {
return { items: (data.items ?? []) as Freight.IContract[], total: data.total ?? 0 };
},
getOpsClearanceHistory: async (): Promise<PaginatedContracts> => {
const response = await client.get<PaginatedContracts>(C.OPS_CLEARANCE_HISTORY);
getOpsClearanceHistory: async (filter?: {
page?: number;
pageSize?: number;
search?: string;
}): Promise<PaginatedContracts> => {
const response = await client.get<PaginatedContracts>(
C.OPS_CLEARANCE_HISTORY,
{ params: filter },
);
const data = unwrap(response.data);
return { items: (data.items ?? []) as Freight.IContract[], total: data.total ?? 0 };
},