mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 20:38:17 +00:00
feat(bookings): per-row stations + totals footer on carriage acceptance sheet
The sheet printed Departure/Arrival Station as booking-level constants and squeezed the footer figures into unrelated table columns (gross weight under Cargo Name, full/empty under Wagon No.). Stations now resolve per row from the slot's own board/alight yard, falling back to the schedule's origin/destination and then the booking yards — mirroring buildExportLoadListHtml's leg-slot handling. The paper form's footer becomes its own tile block: In Total Wagon No., Tare Weight, Load Capacity, Gross Weight, Equated Length, Full Wagon, Empty Wagon, Total Amount. Rendered as .tile so buildTabularFallbackPdf still prints every figure where Chromium is absent.
This commit is contained in:
@@ -319,6 +319,14 @@ export interface LoadableTrainRow {
|
||||
destination: string | null;
|
||||
status: string;
|
||||
departureTime: string | Date | null;
|
||||
/** freight.yards.id the train departs from — the default boarding yard. */
|
||||
originStationId: string | null;
|
||||
/**
|
||||
* The schedule's per-yard loading/unloading time windows, exactly as the train
|
||||
* schedule page stores them. The warehouse loading queues render the same
|
||||
* Start/End controls off this, so both surfaces show one truth.
|
||||
*/
|
||||
stationWorkLogs: Record<string, StationWorkLogJson> | null;
|
||||
/** Received/ready inventory not yet loaded onto this train. */
|
||||
readyCount: number;
|
||||
/** Inventory already loaded onto this train. */
|
||||
@@ -340,7 +348,12 @@ export interface TrainLoadableItemRow {
|
||||
wagonId: string | null;
|
||||
wagonNumber: string | null;
|
||||
sequenceNo: number | null;
|
||||
/** True only when the item is READY_FOR_LOADING and has an allocated wagon. */
|
||||
/** The booking's boarding yard — the yard whose loading window gates this item. */
|
||||
originYardId: string | null;
|
||||
originYardLabel: string | null;
|
||||
/** True once "Start loading" was clicked for this item's boarding yard on this train. */
|
||||
loadingWindowStarted: boolean;
|
||||
/** True only when the item is READY_FOR_LOADING, has an allocated wagon and GRN, and its yard's loading window is open. */
|
||||
loadable: boolean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user