This commit is contained in:
2026-08-17 19:57:32 +08:00
parent ee4cd35927
commit 8f53c81196
15 changed files with 64 additions and 10 deletions
+2 -1
View File
@@ -32,11 +32,12 @@ function normalizePage(payload: PagePayload): TruckAppointmentPage {
}
function normalizeResource(resource: TruckAppointmentResource): TruckAppointmentResource {
const idKeys = ['id', 'outboundOrderId', 'oceanBookingId', 'containerBookingId', 'loadingPlanId', 'warehouseId', 'customerId', 'carrierId']
const idKeys = ['id', 'outboundOrderId', 'oceanBookingId', 'containerBookingId', 'loadingPlanId', 'warehouseId', 'customerId', 'shippingCompanyId', 'bookingAgentId', 'carrierId']
const normalized = { ...resource } as Record<string, unknown>
for (const key of idKeys) {
if (normalized[key] !== null && normalized[key] !== undefined) normalized[key] = String(normalized[key])
}
normalized.attachmentCount = Number(normalized.attachmentCount ?? 0)
return normalized as unknown as TruckAppointmentResource
}