mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 06:28:12 +00:00
- Added ShippingLineBookingCompletionController and associated service to handle the completion of shipping line bookings. - Introduced a new module for booking completion to maintain module separation and avoid cyclic dependencies. - Updated the train scheduling global rules to set default desk hours to 24 hours. - Modified existing services and entities to accommodate the new booking completion logic. - Enhanced the front-end components to support the new booking completion flow, including updates to the booking detail and bookings pages. - Implemented validation and error handling for booking completion, ensuring that only approved bookings can be completed. - Added migration to set default desk hours in the database.
30 lines
1.3 KiB
TypeScript
30 lines
1.3 KiB
TypeScript
import { Module } from "@nestjs/common";
|
|
import { TypeOrmModule } from "@nestjs/typeorm";
|
|
|
|
import { BookingsModule } from "../bookings/bookings.module";
|
|
import { Booking } from "../bookings/entities/booking.entity";
|
|
import { TrainSchedulingModule } from "../train-scheduling/train-scheduling.module";
|
|
import { ShippingLineBookingCompletionController } from "./shipping-line-booking-completion.controller";
|
|
import { ShippingLineBookingCompletionService } from "./shipping-line-booking-completion.service";
|
|
import { ShippingLineCompaniesModule } from "./shipping-line-companies.module";
|
|
|
|
/**
|
|
* Deliberately a LEAF module — registered in AppModule and imported by
|
|
* nothing. Completion needs BookingsModule (pricing + the operation-request
|
|
* transition), but ShippingLineCompaniesModule sits under rule-engine and
|
|
* companies, which sit under BookingsModule; importing bookings from there
|
|
* closes a module cycle Nest cannot construct. Keeping the completion flow
|
|
* here keeps the graph acyclic with no forwardRef chains.
|
|
*/
|
|
@Module({
|
|
imports: [
|
|
TypeOrmModule.forFeature([Booking]),
|
|
BookingsModule,
|
|
TrainSchedulingModule,
|
|
ShippingLineCompaniesModule,
|
|
],
|
|
controllers: [ShippingLineBookingCompletionController],
|
|
providers: [ShippingLineBookingCompletionService],
|
|
})
|
|
export class ShippingLineBookingCompletionModule {}
|