changes export flow

This commit is contained in:
Marshal
2026-07-30 11:30:34 +00:00
parent b671f07ce6
commit 2ca04b8f98
47 changed files with 1195 additions and 74 deletions

View File

@@ -239,6 +239,7 @@ export enum WagonStatus {
Maintenance = "MAINTENANCE",
/** Formerly RETIRED — wagons pulled from circulation. */
Detained = "DETAINED",
OutOfService = "OUT_OF_SERVICE",
}
export enum WagonReadiness {
@@ -654,6 +655,8 @@ export interface IBooking extends BaseEntity {
originYard?: IYard | null;
destinationYard?: IYard | null;
cargoTotalWeightVgm: number;
/** Break-bulk (PER_ITEM) only: actual total weight in tons — cargoTotalWeightVgm then holds the item count. */
bulkTotalWeightTons?: number | null;
freightType: FreightType;
freightSubtype?: string | null;
@@ -1090,6 +1093,30 @@ export interface BookableScheduleItem {
remainingWagons: number;
}
/** Per-wagon-type free space on one export train, for the booking's cargo. */
export interface ExportTrainOptionWagonType {
wagonTypeId: string | null;
code: string | null;
name: string | null;
freeWagons: number;
}
/**
* One export train the customer can pick for a shipment day
* (GET /bookings/:id/export-trains?date=). Space is measured against the
* booking's own allowed wagon types; unpaid holds count as taken.
*/
export interface ExportTrainOption {
scheduleId: string;
departure: string;
bookingClosesAt: string | null;
isOpen: boolean;
freeWagons: number;
neededWagons: number;
fits: boolean;
byWagonType: ExportTrainOptionWagonType[];
}
// ── DTOs ───────────────────────────────────────────────────────────────────────
export interface CreateBookingContainerDto {
@@ -1148,6 +1175,8 @@ export interface CreateBookingDto {
cargoFreeText?: string | undefined;
shippingLineId?: string | undefined;
cargoTotalWeightVgm: number;
/** Break-bulk (PER_ITEM) only: actual total weight in tons — cargoTotalWeightVgm then holds the item count. */
bulkTotalWeightTons?: number | undefined;
isHazardous?: boolean | undefined;
/** Booking-level refrigerated flag (bulk freight only; containers derive reefer from the container type). */
isReefer?: boolean | undefined;