feat: add BookingWagonsPanel component for displaying allocated wagons in booking details

- Implemented BookingWagonsPanel to show allocated wagons, their containers, and export functionality.
- Integrated the new panel into BookingRequestDetailPage and BookingRequestsPage.
- Enhanced wagon cancellation modal to support rebooking of wagon cancellations with partner units.
- Updated API service to include a method for downloading wagons workbook.
- Modified types and constants to accommodate new features related to wagons.
- Adjusted various components and pages to ensure compatibility with the new wagon-related functionality.
This commit is contained in:
marshalyordanos
2026-09-03 15:39:27 +03:00
parent 165146c09d
commit 9c57aa1c0c
23 changed files with 1244 additions and 61 deletions

View File

@@ -105,6 +105,31 @@ export class RebookContainerLineDto {
units!: RebookUnitDto[];
}
/** One edited container unit on the consolidation partner booking. */
export class PartnerUnitPatchDto {
@ApiProperty({ description: 'Id of the partner booking container unit being edited' })
@IsUUID()
id!: string;
@ApiPropertyOptional({ description: 'Container number' })
@IsOptional()
@IsString()
@MaxLength(64)
containerNumber?: string;
@ApiPropertyOptional({ description: 'Seal number' })
@IsOptional()
@IsString()
@MaxLength(64)
sealNumber?: string;
@ApiPropertyOptional({ description: 'VGM (tons) of the unit' })
@IsOptional()
@IsNumber()
@Min(0)
vgmTons?: number;
}
export class RebookCancelledWagonsDto {
@ApiProperty({ description: 'Shipment day the credit is rebooked onto (ISO date)' })
@IsDateString()
@@ -132,6 +157,19 @@ export class RebookCancelledWagonsDto {
@IsOptional()
@IsUUID()
partnerBookingId?: string;
@ApiPropertyOptional({
description:
'Corrections to the partner booking\'s own container units (number / seal ' +
'/ VGM). Only the units listed are touched; sizes and quantities are never ' +
'changed. Ignored unless partnerBookingId is set.',
type: [PartnerUnitPatchDto],
})
@IsOptional()
@IsArray()
@ValidateNested({ each: true })
@Type(() => PartnerUnitPatchDto)
partnerUnits?: PartnerUnitPatchDto[];
}
export class FilterWagonCancellationsDto {