add lashing surcharge for cargo types with hasLashing flag

add lashing surcharge for cargo types with hasLashing flag
This commit is contained in:
Marshal
2026-07-17 23:25:53 +00:00
parent 6467173c76
commit 3a1a08b1e1
59 changed files with 1919 additions and 140 deletions

View File

@@ -3,6 +3,7 @@ import { Type } from 'class-transformer';
import {
ArrayMinSize,
IsArray,
IsBoolean,
IsDateString,
IsInt,
IsNumber,
@@ -61,4 +62,15 @@ export class CreateContainerTrainScheduleDto {
@IsInt()
@Min(1)
maxWagonsPerTrain?: number;
@ApiPropertyOptional({
description:
'Reverse the wagon order on this train: the physically-last wagon becomes ' +
'position 1. Frozen on the schedule; applied every time the wagon plan is ' +
'rebuilt so the stored train order and the schedule order stay in sync.',
default: false,
})
@IsOptional()
@IsBoolean()
reverseWagonOrder?: boolean;
}

View File

@@ -3,6 +3,7 @@ import { Type } from 'class-transformer';
import {
ArrayMinSize,
IsArray,
IsBoolean,
IsDateString,
IsInt,
IsNumber,
@@ -58,4 +59,15 @@ export class PreviewTrainScheduleDto {
@IsInt()
@Min(1)
maxWagonsPerTrain?: number;
@ApiPropertyOptional({
description:
'Reverse the wagon order on the train: the physically-last wagon becomes ' +
'position 1. The composition and allocations are unchanged — only the order ' +
'flips, applied at build so the stored train and schedule stay in sync.',
default: false,
})
@IsOptional()
@IsBoolean()
reverseWagonOrder?: boolean;
}

View File

@@ -67,4 +67,31 @@ export class UpdateTrainSchedulingGlobalRulesDto {
@IsInt()
@Min(1)
paymentWindowMinutes?: number;
// Booking-close offsets: minutes before departure the window shuts. The UI
// enters days/hours/minutes and converts to minutes. 0 or null clears the
// offset (close at departure). Nullable so it can be explicitly cleared.
@ApiPropertyOptional({
example: 180,
nullable: true,
description:
'Minutes before departure the IMPORT booking window closes; 0/null = close at departure',
})
@IsOptional()
@Type(() => Number)
@IsInt()
@Min(0)
importCloseOffsetMinutes?: number | null;
@ApiPropertyOptional({
example: 1440,
nullable: true,
description:
'Minutes before departure the EXPORT booking window closes; 0/null = close at departure',
})
@IsOptional()
@Type(() => Number)
@IsInt()
@Min(0)
exportCloseOffsetMinutes?: number | null;
}