mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 00:50:56 +00:00
Replace wagon/locomotive readiness with yard tracking, assign unassigned bookings from origin-yard fleet, standardize rates on USD with CBE ETB conversion, and update fleet/scheduling UI
This commit is contained in:
@@ -16,6 +16,7 @@ import { resolveAuthUserId } from '../../common/resolve-auth-user-id';
|
||||
|
||||
import { TrainSchedulingManage, TrainSchedulingView } from '../../common/booking-guards';
|
||||
import { AssignBookingsDto } from './dto/assign-bookings.dto';
|
||||
import { AssignUnassignedBookingDto } from './dto/assign-unassigned-booking.dto';
|
||||
import { CreateContainerTrainScheduleDto } from './dto/create-container-train-schedule.dto';
|
||||
import { GetEligibleBookingsDto } from './dto/get-eligible-bookings.dto';
|
||||
import { GetEligibleBulkBookingsDto } from './dto/get-eligible-bulk-bookings.dto';
|
||||
@@ -79,7 +80,7 @@ export class TrainSchedulingController {
|
||||
@Get('available-locomotives')
|
||||
@TrainSchedulingView()
|
||||
@ApiOperation({
|
||||
summary: 'List AVAILABLE locomotives filtered by route corridor readiness',
|
||||
summary: 'List AVAILABLE locomotives at the route origin yard',
|
||||
})
|
||||
getAvailableLocomotives(@Query() query: AvailableLocomotivesQueryDto) {
|
||||
return this.trainSchedulingService.getAvailableLocomotivesForRoute(query.routeId);
|
||||
@@ -213,6 +214,18 @@ export class TrainSchedulingController {
|
||||
return this.trainSchedulingService.getUnassignedBookings(id);
|
||||
}
|
||||
|
||||
@Post('schedules/:id/assign-unassigned-booking')
|
||||
@TrainSchedulingManage()
|
||||
@ApiOperation({
|
||||
summary: 'Assign one linked unallocated booking to wagons (preserves existing assignments)',
|
||||
})
|
||||
assignUnassignedBooking(
|
||||
@Param('id', ParseUUIDPipe) id: string,
|
||||
@Body() dto: AssignUnassignedBookingDto,
|
||||
) {
|
||||
return this.trainSchedulingService.assignUnassignedBookingToWagons(id, dto.bookingId);
|
||||
}
|
||||
|
||||
@Get('schedules/:id/composition-removals')
|
||||
@TrainSchedulingView()
|
||||
@ApiOperation({ summary: 'Get removal log for a schedule' })
|
||||
@@ -315,7 +328,7 @@ export class TrainSchedulingController {
|
||||
|
||||
@Post('schedules/:id/arrive')
|
||||
@TrainSchedulingManage()
|
||||
@ApiOperation({ summary: 'Mark a dispatched train arrived (flip readiness, free assets)' })
|
||||
@ApiOperation({ summary: 'Mark a dispatched train arrived (move assets to destination yard, free assets)' })
|
||||
arriveSchedule(@Param('id', ParseUUIDPipe) id: string) {
|
||||
return this.trainSchedulingService.arriveSchedule(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user