mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
add quantity cap for GENERAL contracts and implement capacity tracking
- Updated ContractClearanceService and ContractsController to remove region parameter from queue method. - Enhanced ContractsRepository to attach contract files for download and added attachContractFiles method. - Modified ContractsService to persist cargo scope with quantity cap based on contract kind. - Introduced quantityCap field in CreateContractCargoScopeDto and ContractCargoScope entity. - Implemented capacity tracking in the frontend with ContractCapacityNotice component to display remaining bookable quantities. - Updated various components and services to support new capacity features, including hooks and API calls. - Added migration to include quantity_cap column in contract_cargo_scope table.
This commit is contained in:
@@ -133,6 +133,20 @@ export interface IContractCargoScope {
|
||||
containerSize?: string | null;
|
||||
cargoTypeId?: string | null;
|
||||
cargoFreeText?: string | null;
|
||||
/**
|
||||
* GENERAL contracts: total quantity bookable across all shipments on this line
|
||||
* (containers per size, or tons/items for bulk). null = uncapped / ONE_TIME.
|
||||
*/
|
||||
quantityCap?: number | null;
|
||||
}
|
||||
|
||||
/** Remaining bookable quantity per cargo-scope line (GENERAL contracts). */
|
||||
export interface ContractCapacityLine {
|
||||
containerSize?: string | null;
|
||||
cargoTypeId?: string | null;
|
||||
cap: number | null;
|
||||
booked: number;
|
||||
remaining: number | null;
|
||||
}
|
||||
|
||||
export interface IContractRateSnapshot {
|
||||
@@ -464,6 +478,8 @@ export interface CreateContractCargoScopeDto {
|
||||
containerSize?: string | null;
|
||||
cargoTypeId?: string | null;
|
||||
cargoFreeText?: string | null;
|
||||
/** GENERAL only: total bookable quantity for this line. Omit for uncapped. */
|
||||
quantityCap?: number | null;
|
||||
}
|
||||
|
||||
export interface CreateContractRouteInputDto {
|
||||
|
||||
Reference in New Issue
Block a user