mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 23:28:11 +00:00
Enhance wagon capacity handling and validation in booking service
- Added default capacities for container and bulk wagons. - Updated wagonsFor method to consider weight and length for wagon calculations. - Improved handling of overweight bookings with appropriate warnings. - Adjusted tests to reflect changes in wagon capacity and validation logic.
This commit is contained in:
@@ -34,3 +34,13 @@ export const DEFAULT_CONTAINER_WAGON_TARE_TONS = 22.4;
|
||||
|
||||
/** Default CW3 gondola tare for bulk bookings (T). */
|
||||
export const DEFAULT_BULK_WAGON_TARE_TONS = 23.4;
|
||||
|
||||
/**
|
||||
* Fallback rated payloads (T) matching the tare fallbacks above. A bulk booking's
|
||||
* wagon count is its cargo divided by this, so a zero here would make the count
|
||||
* infinite — callers must floor it at a positive number.
|
||||
*/
|
||||
export const DEFAULT_CONTAINER_WAGON_CAPACITY_TONS = 70;
|
||||
|
||||
/** Default CW3 gondola rated payload for bulk bookings (T). */
|
||||
export const DEFAULT_BULK_WAGON_CAPACITY_TONS = 60;
|
||||
|
||||
Reference in New Issue
Block a user