mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 14:08:11 +00:00
small fix
This commit is contained in:
@@ -1073,11 +1073,16 @@ export class TrainSchedulingService {
|
|||||||
containerPlacements ?? [],
|
containerPlacements ?? [],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// The link above puts these bookings on the train: they are SCHEDULED, not
|
||||||
|
// ELIGIBLE. Leaving them ELIGIBLE re-offers an allocated booking to the next
|
||||||
|
// batch fill, which unlinks it and frees its wagons on the next window cycle.
|
||||||
|
const scheduledAt = new Date();
|
||||||
for (const booking of bookings) {
|
for (const booking of bookings) {
|
||||||
await this.bookingsRepository.updateSchedulingFields(
|
await this.bookingsRepository.updateSchedulingFields(
|
||||||
booking.id,
|
booking.id,
|
||||||
{
|
{
|
||||||
schedulingStatus: SchedulingStatus.Eligible,
|
schedulingStatus: SchedulingStatus.Scheduled,
|
||||||
|
scheduledAt,
|
||||||
wagonsRequired: sumWagonsRequired(booking),
|
wagonsRequired: sumWagonsRequired(booking),
|
||||||
},
|
},
|
||||||
manager,
|
manager,
|
||||||
|
|||||||
Reference in New Issue
Block a user