mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 09:58:12 +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.
24 lines
731 B
TypeScript
24 lines
731 B
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { IsOptional, IsString, IsUUID, MaxLength } from 'class-validator';
|
|
|
|
/**
|
|
* Merge another train into this schedule's train. The schedule always survives:
|
|
* its train set is repointed at `targetTrainId`, that train's wagons join this
|
|
* consist, and the source train is left empty and deactivated.
|
|
*/
|
|
export class MergeScheduleTrainDto {
|
|
@ApiProperty({
|
|
description: "The train being merged IN. This schedule's train absorbs it.",
|
|
})
|
|
@IsUUID()
|
|
targetTrainId!: string;
|
|
|
|
@ApiPropertyOptional({
|
|
description: 'Why the trains were merged — kept on the audit trail.',
|
|
})
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(500)
|
|
reason?: string;
|
|
}
|