mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 13:05:44 +00:00
Add booking window management and locomotive scheduling features
- Implemented migration to release stuck assigned locomotives. - Added schedule window phases to train schedules. - Created booking batch offers table for partial capacity bookings. - Developed BookingSplitService to handle partial booking offers and splits. - Introduced BookingWindowService to manage booking window lifecycle and transitions. - Added BookingBatchOffer entity to represent offers made during booking splits. - Enhanced locomotive options with warnings for scheduling. - Created UpcomingWindowsSection component to display upcoming booking windows.
This commit is contained in:
@@ -41,4 +41,36 @@ export class TrainSchedulingGlobalRules extends BaseEntity {
|
||||
default: 10,
|
||||
})
|
||||
max20ftPairWeightDiffTons!: number;
|
||||
|
||||
/** Days before departure the single import booking-window day falls on. */
|
||||
@Column({ name: 'import_window_lead_days', type: 'int', default: 3 })
|
||||
importWindowLeadDays!: number;
|
||||
|
||||
/** Hours before departure an export booking becomes acceptable (FCFS, no window cycle). */
|
||||
@Column({ name: 'export_booking_lead_hours', type: 'int', default: 24 })
|
||||
exportBookingLeadHours!: number;
|
||||
|
||||
/** Local (Africa/Addis_Ababa) hour at which the import window opens on its window day. */
|
||||
@Column({ name: 'window_open_hour', type: 'int', default: 8 })
|
||||
windowOpenHour!: number;
|
||||
|
||||
@Column({
|
||||
name: 'window_duration_hours',
|
||||
type: 'numeric',
|
||||
precision: 4,
|
||||
scale: 2,
|
||||
default: 3,
|
||||
})
|
||||
windowDurationHours!: number;
|
||||
|
||||
/** Max time staff have to accept booking documents after the window closes. */
|
||||
@Column({ name: 'doc_review_minutes', type: 'int', default: 30 })
|
||||
docReviewMinutes!: number;
|
||||
|
||||
@Column({ name: 'payment_window_minutes', type: 'int', default: 60 })
|
||||
paymentWindowMinutes!: number;
|
||||
|
||||
/** Delay after window close before the window reopens when the train is not yet full. */
|
||||
@Column({ name: 'reopen_delay_minutes', type: 'int', default: 90 })
|
||||
reopenDelayMinutes!: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user