add per-container handling options for hazardous, reefer, and return services

- Introduced new boolean fields (isHazardous, isReefer, isReturn) in UnitDraft and related interfaces to allow individual container handling options.
- Updated emptyUnit function to initialize these new fields.
- Modified GlCreateBookingForm to handle and display these options for each container.
- Adjusted calculations for hazardous, reefer, and return quantities based on the new handling options.
- Updated the schema for container units and booking container lines to include handling options.
- Added migration to support the new return flag in the database.
- Enhanced various components to reflect gross weight calculations, ensuring consistency across the application.
This commit is contained in:
Marshal
2026-07-18 19:20:45 +00:00
parent a7041ee70f
commit 0dead281ce
28 changed files with 585 additions and 250 deletions

View File

@@ -729,14 +729,22 @@ export interface CreateContainerUnitDto {
containerNumber: string;
sealNumber?: string;
vgmTons: number;
/** Per-container handling opt-ins, entered alongside this container's VGM. */
isHazardous?: boolean;
isReefer?: boolean;
/** This container ships back empty (equipment return). */
isReturn?: boolean;
}
export interface CreateBookingContainerLineDto {
/** "20ft" | "40ft" — must be in the contract's cargo scope. */
containerSize: string;
quantity: number;
/**
* Line totals, derived from the per-unit switches above. The API recomputes
* them from `units` whenever any unit carries a flag, so they are only
* authoritative for callers that don't send per-unit flags.
*/
hazardousQuantity?: number;
reeferQuantity?: number;
/**