mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 02:58:11 +00:00
Merge pull request #1415 from Tria-plc/freight_feature/usermanagement
feat: implement MANUAL_ONLY status for bookings and update related logic
This commit is contained in:
@@ -2415,7 +2415,12 @@ export class TrainSchedulingService {
|
||||
);
|
||||
|
||||
const booking = await this.bookingsRepository.findById(bookingId);
|
||||
const schedulingStatus = this.resolvePostUnassignStatus(booking);
|
||||
// Removed from a train by staff → MANUAL_ONLY: the paid booking must not
|
||||
// be auto re-placed by any allocation sweep (it would retake the space it
|
||||
// was just pulled from). Staff re-assign it manually; assign resets the
|
||||
// status to SCHEDULED. Schedule *cancellation* keeps the old behaviour
|
||||
// (resolvePostUnassignStatus) — there the train died, not the booking.
|
||||
const schedulingStatus = SchedulingStatus.ManualOnly;
|
||||
// Clear the schedule pointer too: unassign fully detaches the booking from
|
||||
// this train. Leaving trainScheduleId set glued the booking to a schedule
|
||||
// that may then be dispatched/cancelled/deleted, orphaning it — the
|
||||
|
||||
Reference in New Issue
Block a user