feat(admin): adapt channel booking and smart loading contracts

This commit is contained in:
2026-08-12 18:43:54 +08:00
parent 9ebd0b2295
commit 41a131a33b
14 changed files with 58 additions and 26 deletions
+2 -2
View File
@@ -339,9 +339,9 @@ export async function getContainerBooking(bookingId: string | number) {
return normalizeContainer(unwrapApiResponse(response))
}
export async function listSmartLoadingCandidates(warehouseId: string | number) {
export async function listSmartLoadingCandidates(bookingId: string | number, warehouseId: string | number) {
const response = await http.get<ApiEnvelope<Record<string, unknown>[]>, ApiEnvelope<Record<string, unknown>[]>>(
`${smartLoadingBasePath}/candidates`, { params: { warehouseId: String(warehouseId) } },
`${smartLoadingBasePath}/candidates`, { params: { bookingId: String(bookingId), warehouseId: String(warehouseId) } },
)
return unwrapApiResponse(response).map(normalizeCandidate)
}