mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 06:00:55 +00:00
fix issues
This commit is contained in:
@@ -2514,6 +2514,12 @@ export class TrainSchedulingService {
|
||||
|
||||
if (dto.sequenceNo === finalSeq) {
|
||||
await this.arriveSchedule(scheduleId);
|
||||
} else {
|
||||
// Mid-corridor auto-unload: bookings destined for this yard alight the
|
||||
// moment the train is recorded here — the yard operator no longer has to
|
||||
// unload each one by hand. The final station is covered by
|
||||
// arriveSchedule's bulk fallback above.
|
||||
await this.bookingJourneyService.autoUnloadAtYard(scheduleId, station.yardId);
|
||||
}
|
||||
|
||||
return this.getScheduleCheckpoints(scheduleId);
|
||||
@@ -4518,6 +4524,11 @@ export class TrainSchedulingService {
|
||||
capacityTons: roundTons(Number(wagon.capacityTons)),
|
||||
lengthMeters: roundTons(Number(wagon.lengthMeters)),
|
||||
assignedWeightTons: roundTons(Number(wagon.assignedWeightTons)),
|
||||
// Empty-wagon weight — the pull limit hauls tare + cargo, so the
|
||||
// frontend needs it to show the gross train weight.
|
||||
tareWeightTons: wagon.wagonType
|
||||
? roundTons(Number(wagon.wagonType.tareWeightTons))
|
||||
: null,
|
||||
status: wagon.status,
|
||||
physicalWagonId: wagon.physicalWagonId ?? null,
|
||||
physicalWagonNumber: wagon.physicalWagon?.wagonNumber ?? null,
|
||||
|
||||
Reference in New Issue
Block a user