mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
fix issue
This commit is contained in:
@@ -1632,6 +1632,18 @@ export class BookingBatchService implements OnModuleInit {
|
||||
for (const b of candidates) {
|
||||
if (!pinnedIds.has(b.id)) bookings.push(b);
|
||||
}
|
||||
// Expiry frees the schedule pin (expire() nulls train_schedule_id), so
|
||||
// expired bookings match neither query above — merge them back so the
|
||||
// board keeps its expired lane. Display-only: boardState maps them to
|
||||
// EXPIRED, which every capacity meter already excludes.
|
||||
const expiredPool =
|
||||
await this.bookingsRepository.findExpiredByCorridorDay(
|
||||
stops,
|
||||
eatDay(s.scheduledDepartureDate),
|
||||
);
|
||||
for (const b of expiredPool) {
|
||||
if (!pinnedIds.has(b.id)) bookings.push(b);
|
||||
}
|
||||
} catch (err) {
|
||||
// The board must still render the pinned bookings.
|
||||
this.logger.warn(
|
||||
|
||||
Reference in New Issue
Block a user