Refactor wagon specifications to rely on wagon type; remove tare weight and max payload from wagon entity and related components

This commit is contained in:
Marshal
2026-07-09 07:42:02 +00:00
parent cd8fb2b321
commit 61ec67cc2e
13 changed files with 99 additions and 50 deletions

View File

@@ -15,14 +15,16 @@ export interface Wagon {
label: string;
country?: string;
} | null;
/** Owns this wagon's spec — tare, capacity, length are read from here, never off the wagon. */
wagonType?: {
id: string;
code: string;
name: string;
supportedLoadTypes?: string[];
tareWeightTons?: number;
capacityTons?: number;
lengthMeters?: number;
} | null;
tareWeight: number;
maxPayloadWeight: number;
status: Freight.WagonStatus;
currentYardId: string | null;
currentYard?: { id: string; label?: string; code?: string } | null;