mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 18:48:11 +00:00
ui design for schedule
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user