This commit is contained in:
2026-09-04 15:19:45 +08:00
parent 2c21d27f61
commit 4aed53a8af
18 changed files with 162 additions and 84 deletions
@@ -111,12 +111,10 @@ export function portScheduleFieldGaps(record) {
}
export function truckAppointmentFieldGaps(record) {
return gaps(record, {
const result = gaps(record, {
id: isPositiveId,
appointmentNo: isNonBlank,
oceanBookingId: isPositiveId,
containerBookingId: isPositiveId,
loadingPlanId: (value) => value == null || isPositiveId(value),
warehouseId: (value) => value == null || isPositiveId(value),
plannedLoadingAt: isIsoDateTime,
status: isNonBlank,
@@ -126,6 +124,10 @@ export function truckAppointmentFieldGaps(record) {
currency: (value) => value === 'RMB' || value === 'USD',
attachmentCount: isNonNegativeNumber,
})
for (const field of ['containerBookingId', 'loadingPlanId', 'containerNo', 'cabinetNo', 'containers']) {
if (Object.hasOwn(record || {}, field)) result.push(`forbidden:${field}`)
}
return result
}
export function customsCaseFieldGaps(record) {