b2m-utils 0.0.117 → 0.0.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import { DomainSlaContract, SlaFreight } from "../../types";
2
- export declare const getRouteOnTimeFromFreight: (freight: SlaFreight, contracts: DomainSlaContract[]) => boolean;
1
+ import { DomainSlaContract, DomainSlaRoute, SlaFreight } from "../../types";
2
+ export declare const getRouteOnTimeFromFreight: (freight: SlaFreight, contracts: DomainSlaContract[], routeToVerify?: DomainSlaRoute | null) => boolean;
@@ -6112,9 +6112,19 @@ var getRouteDeliveryTimeFromFreight = function (freight, contracts) {
6112
6112
  return 'ND';
6113
6113
  };
6114
6114
 
6115
- var getRouteOnTimeFromFreight = function (freight, contracts) {
6115
+ var getRouteOnTimeFromFreight = function (freight, contracts, routeToVerify) {
6116
6116
  var _a;
6117
- var route = getContractRouteFromFreight(contracts, freight);
6117
+ if (routeToVerify === void 0) { routeToVerify = null; }
6118
+ var route = null;
6119
+ if (!routeToVerify) {
6120
+ var myRoute = getContractRouteFromFreight(contracts, freight);
6121
+ if (myRoute) {
6122
+ route = myRoute;
6123
+ }
6124
+ }
6125
+ else {
6126
+ route = routeToVerify;
6127
+ }
6118
6128
  if (route) {
6119
6129
  if (freight.cteAt && freight.deliveredAt) {
6120
6130
  var contract = getContractFromFreight(contracts, freight);
Binary file