fix(admin): unblock tailleg inbound planning

This commit is contained in:
2026-08-27 15:56:13 +08:00
parent 00045a9764
commit 690f386bff
16 changed files with 241 additions and 34 deletions
@@ -27,8 +27,8 @@ function text(value: unknown) {
return normalized || '—'
}
function count(value: number | null | undefined) {
return Number.isFinite(value) ? Number(value) : 0
function metric(value: number | null | undefined): number | '—' {
return value != null && Number.isFinite(value) ? Number(value) : '—'
}
function yesNo(value: boolean | null | undefined) {
@@ -69,11 +69,11 @@ export function toLastMileOrderListItem(dto: LastMileOrderSummaryDto): LastMileO
containerStatus: text(dto.containerStatus),
abnormal: yesNo(dto.abnormal),
held: yesNo(dto.detained),
pallets: count(dto.palletCount),
cartons: count(dto.packageCount),
volume: count(dto.volumeCbm),
quantity: count(dto.productQuantity),
volumeWeight: count(dto.volumeWeightKg),
pallets: metric(dto.palletCount),
cartons: metric(dto.packageCount),
volume: metric(dto.volumeCbm),
quantity: metric(dto.productQuantity),
volumeWeight: metric(dto.volumeWeightKg),
portEta: formatOverseasDateTime(dto.estimatedArrivalAt),
portAta: formatOverseasDateTime(dto.actualArrivalAt),
warehouseEta: formatOverseasDateTime(dto.estimatedWarehouseAt),