b2m-utils 0.0.117 → 0.0.120
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.
- package/build/functions/getRouteOnTimeFromFreight/index.d.ts +2 -2
- package/build/index.esm.js +12 -2
- package/build/index.esm.js.gz +0 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +12 -2
- package/build/index.js.gz +0 -0
- package/build/index.js.map +1 -1
- package/build/types/SlaFreight/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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;
|
package/build/index.esm.js
CHANGED
|
@@ -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
|
-
|
|
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);
|
package/build/index.esm.js.gz
CHANGED
|
Binary file
|