ui design for schedule

This commit is contained in:
Marshal
2026-06-09 23:25:52 +00:00
parent 5774d7db9d
commit 257428be18
19 changed files with 2088 additions and 408 deletions

View File

@@ -1201,6 +1201,15 @@ export class TrainSchedulingService {
const lineEntry = lineById.get(placement.bookingContainerId);
if (!lineEntry) continue;
// Durably persist the container number on the booking container line first, so it
// survives a refresh regardless of whether a wagon allocation slot can be matched
// below. booking_container is the source of truth re-read into the preview units.
if (placement.containerNumber && placement.containerNumber.trim()) {
await manager.getRepository(BookingContainer).update(placement.bookingContainerId, {
containerNumber: placement.containerNumber.trim(),
});
}
const allocationId = allocationBySlotBooking.get(
`${placement.sequenceNo}:${lineEntry.bookingId}`,
);
@@ -1226,13 +1235,6 @@ export class TrainSchedulingService {
bookingContainerId: placement.bookingContainerId,
});
}
// Save container number to booking_container when staff enters a new container number
if (placement.containerNumber && placement.containerNumber.trim()) {
await manager.getRepository(BookingContainer).update(placement.bookingContainerId, {
containerNumber: placement.containerNumber.trim(),
});
}
}
if (containerItems.length) {