mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 16:35:42 +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:
@@ -0,0 +1,31 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddBookingWindowGlobalRules1861000000000 implements MigrationInterface {
|
||||
name = "AddBookingWindowGlobalRules1861000000000";
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.train_scheduling_global_rules
|
||||
ADD COLUMN import_window_lead_days integer NOT NULL DEFAULT 3,
|
||||
ADD COLUMN export_booking_lead_hours integer NOT NULL DEFAULT 24,
|
||||
ADD COLUMN window_open_hour integer NOT NULL DEFAULT 8,
|
||||
ADD COLUMN window_duration_hours numeric(4, 2) NOT NULL DEFAULT 3,
|
||||
ADD COLUMN doc_review_minutes integer NOT NULL DEFAULT 30,
|
||||
ADD COLUMN payment_window_minutes integer NOT NULL DEFAULT 60,
|
||||
ADD COLUMN reopen_delay_minutes integer NOT NULL DEFAULT 90;
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.train_scheduling_global_rules
|
||||
DROP COLUMN IF EXISTS import_window_lead_days,
|
||||
DROP COLUMN IF EXISTS export_booking_lead_hours,
|
||||
DROP COLUMN IF EXISTS window_open_hour,
|
||||
DROP COLUMN IF EXISTS window_duration_hours,
|
||||
DROP COLUMN IF EXISTS doc_review_minutes,
|
||||
DROP COLUMN IF EXISTS payment_window_minutes,
|
||||
DROP COLUMN IF EXISTS reopen_delay_minutes;
|
||||
`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user