mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 14:08:11 +00:00
- Implemented utility to calculate wagon usage metrics for train schedules. - Created for sending wagons to maintenance with optional notes. - Added unit tests for train builder maintenance functionalities, including formatting train run labels and building maintenance notes. - Developed component for merging train schedules with detailed previews and reasons for merging. - Introduced component for selecting wagons with search functionality and selection limits. - Created for displaying and filtering audit logs, including detailed views of individual log entries. - Added for handling API interactions related to audit logs, including fetching logs and entity types.
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { IsOptional, IsString, MaxLength } from 'class-validator';
|
|
|
|
/**
|
|
* Edit a departure's operational run identifiers. Both fields are optional so
|
|
* either can be corrected alone; the service rejects a body carrying neither,
|
|
* so an empty request cannot write an audit row for a no-op.
|
|
*
|
|
* Sending an empty string clears the field; omitting it leaves it unchanged.
|
|
*/
|
|
export class UpdateScheduleTrainNumberDto {
|
|
@ApiPropertyOptional({
|
|
example: '9201',
|
|
description: "Run number for this departure. Empty string clears it.",
|
|
maxLength: 20,
|
|
})
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(20)
|
|
trainNumber?: string;
|
|
|
|
@ApiPropertyOptional({
|
|
example: 'V-2026-014',
|
|
description: 'Voyage (sailing) number for this departure. Empty string clears it.',
|
|
maxLength: 20,
|
|
})
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(20)
|
|
voyageNumber?: string;
|
|
|
|
@ApiPropertyOptional({
|
|
description: 'Why the numbers changed — kept on the audit trail.',
|
|
maxLength: 500,
|
|
})
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(500)
|
|
reason?: string;
|
|
}
|