mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 13:05:44 +00:00
Implement client-side validation for container and bul
This commit is contained in:
@@ -22,7 +22,9 @@ export class TrainSchedulesRepository extends BaseRepository<TrainSchedule> {
|
|||||||
return this.repo(manager).findOne({
|
return this.repo(manager).findOne({
|
||||||
where: { id },
|
where: { id },
|
||||||
relations: {
|
relations: {
|
||||||
route: true,
|
// Yards carry the route's display name; without them formatRouteLabel
|
||||||
|
// degrades to the literal "Origin → Destination".
|
||||||
|
route: { originYard: true, destinationYard: true },
|
||||||
trainSet: {
|
trainSet: {
|
||||||
locomotive: true,
|
locomotive: true,
|
||||||
locomotives: { locomotive: true },
|
locomotives: { locomotive: true },
|
||||||
|
|||||||
@@ -635,7 +635,8 @@ export class BookingBatchService implements OnModuleInit {
|
|||||||
trainSet: { locomotive: true },
|
trainSet: { locomotive: true },
|
||||||
originStation: true,
|
originStation: true,
|
||||||
destinationStation: true,
|
destinationStation: true,
|
||||||
route: true,
|
// Yards supply the route's display name for `routeName` below.
|
||||||
|
route: { originYard: true, destinationYard: true },
|
||||||
},
|
},
|
||||||
order: { scheduledDepartureDate: "ASC" },
|
order: { scheduledDepartureDate: "ASC" },
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2634,7 +2634,8 @@ export class TrainSchedulingService {
|
|||||||
const schedules = await this.trainSchedulesRepository.findAll({
|
const schedules = await this.trainSchedulesRepository.findAll({
|
||||||
relations: {
|
relations: {
|
||||||
trainSet: { locomotive: true, locomotives: { locomotive: true } },
|
trainSet: { locomotive: true, locomotives: { locomotive: true } },
|
||||||
route: true,
|
// Yards carry the route's display name used by mapScheduleListItem.
|
||||||
|
route: { originYard: true, destinationYard: true },
|
||||||
originStation: true,
|
originStation: true,
|
||||||
destinationStation: true,
|
destinationStation: true,
|
||||||
scheduleBookings: { booking: true },
|
scheduleBookings: { booking: true },
|
||||||
|
|||||||
Reference in New Issue
Block a user