mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 22:18:12 +00:00
implement empty-container return service: add return quantity handling, update related DTOs, services, and UI components
This commit is contained in:
@@ -53,6 +53,11 @@ export interface BookingEvaluationInput {
|
||||
isHazardous: boolean;
|
||||
/** Booking-level reefer flag; ORed with per-container reefer. */
|
||||
isReefer?: boolean;
|
||||
/**
|
||||
* Booking ships with empty-container return (equipment_return = WITH_RETURN,
|
||||
* container freight only). Fires the WITH_RETURN surcharge like hazard/reefer.
|
||||
*/
|
||||
withReturn?: boolean;
|
||||
isGovernment?: boolean;
|
||||
allowConsolidation?: boolean;
|
||||
shippingLineId?: string | null;
|
||||
@@ -228,6 +233,7 @@ export class RuleEngineService {
|
||||
const triggered = this.matchesTrigger(rate.trigger, {
|
||||
isHazardous: input.isHazardous,
|
||||
hasReefer,
|
||||
withReturn: input.withReturn ?? false,
|
||||
hasOverweight,
|
||||
shippingLineMapped,
|
||||
allowConsolidation: input.allowConsolidation ?? false,
|
||||
@@ -456,6 +462,7 @@ export class RuleEngineService {
|
||||
state: {
|
||||
isHazardous: boolean;
|
||||
hasReefer: boolean;
|
||||
withReturn: boolean;
|
||||
hasOverweight: boolean;
|
||||
shippingLineMapped: boolean;
|
||||
allowConsolidation: boolean;
|
||||
@@ -469,6 +476,8 @@ export class RuleEngineService {
|
||||
return truthy(state.isHazardous);
|
||||
case 'REEFER':
|
||||
return truthy(state.hasReefer);
|
||||
case 'WITH_RETURN':
|
||||
return truthy(state.withReturn);
|
||||
case 'OVERWEIGHT':
|
||||
return truthy(state.hasOverweight);
|
||||
case 'SHIPPING_LINE':
|
||||
|
||||
Reference in New Issue
Block a user