mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 19:30:57 +00:00
feat(clearance): preview charge documents before and after upload
This commit is contained in:
@@ -27,6 +27,7 @@ import { SendWagonToMaintenanceDto } from './dto/send-wagon-to-maintenance.dto';
|
||||
import { UpdateTrainDetailsDto } from './dto/update-train-details.dto';
|
||||
import { UpdateTrainLocomotivesDto } from './dto/update-train-locomotives.dto';
|
||||
import { UpdateTrainYardDto } from './dto/update-train-yard.dto';
|
||||
import { SetTrainWagonsYardDto } from './dto/set-train-wagons-yard.dto';
|
||||
import { TrainBuilderService } from './train-builder.service';
|
||||
|
||||
@ApiTags('train-builder')
|
||||
@@ -128,6 +129,25 @@ export class TrainBuilderController {
|
||||
);
|
||||
}
|
||||
|
||||
@Patch(':id/wagons/yard')
|
||||
@FleetManage(FREIGHT_PERMS.trains.changeWagonYard)
|
||||
@ApiOperation({
|
||||
summary:
|
||||
'Move several coupled wagons to another yard in one transaction — refused outright if any is allocated to a live schedule',
|
||||
})
|
||||
setWagonsYard(
|
||||
@Param('id', ParseUUIDPipe) id: string,
|
||||
@Body() dto: SetTrainWagonsYardDto,
|
||||
@CurrentUser() user: AuthUserPayload,
|
||||
) {
|
||||
return this.trainBuilderService.setWagonsYard(
|
||||
id,
|
||||
dto.wagonIds,
|
||||
dto.currentYardId,
|
||||
resolveAuthUserId(user),
|
||||
);
|
||||
}
|
||||
|
||||
@Post(':id/wagons')
|
||||
@FleetManage(FREIGHT_PERMS.trains.assignWagons)
|
||||
@ApiOperation({ summary: "Append AVAILABLE wagons from the train's yard to the consist" })
|
||||
|
||||
Reference in New Issue
Block a user