mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 18:48:11 +00:00
feat(freight): offer built-train wagons per boarding yard on multi-yard consists
This commit is contained in:
@@ -43,6 +43,16 @@ export type WagonStock = {
|
||||
remainingByTypeId: Map<string, number>;
|
||||
/** Wagon-type code per id, for human-readable shortfall messages. */
|
||||
codesByTypeId: Map<string, string>;
|
||||
/**
|
||||
* Multi-yard consist only: yardId → (wagonTypeId → count) for the wagons
|
||||
* standing at that yard. A train whose wagons are split across yards can
|
||||
* only offer, at each boarding yard, the wagons physically standing there —
|
||||
* a wagon waiting in Mojo is not bookable from Dire, and one picked up at
|
||||
* Dire is not re-offered at Mojo. Absent (undefined) when every wagon sits
|
||||
* in one yard, which keeps single-yard trains on the original whole-train
|
||||
* math.
|
||||
*/
|
||||
byYardId?: Map<string, Map<string, number>>;
|
||||
};
|
||||
|
||||
export type FlexPlanResult = {
|
||||
|
||||
Reference in New Issue
Block a user