b2m-utils 0.0.116 → 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[]
|
|
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);
|
|
@@ -6133,14 +6143,14 @@ var getRouteOnTimeFromFreight = function (freight, contracts) {
|
|
|
6133
6143
|
return daysToDeliveryArray_1 === null || daysToDeliveryArray_1 === void 0 ? void 0 : daysToDeliveryArray_1.includes(dateDay);
|
|
6134
6144
|
});
|
|
6135
6145
|
if (daysToDeliveryQtd.length) {
|
|
6136
|
-
return (daysToDeliveryQtd.length - 1) <= route.transitTime
|
|
6146
|
+
return (daysToDeliveryQtd.length - 1) <= route.transitTime;
|
|
6137
6147
|
}
|
|
6138
6148
|
}
|
|
6139
6149
|
}
|
|
6140
6150
|
}
|
|
6141
6151
|
}
|
|
6142
6152
|
}
|
|
6143
|
-
return
|
|
6153
|
+
return false;
|
|
6144
6154
|
};
|
|
6145
6155
|
|
|
6146
6156
|
function getConfigurationFromDomain(domainConfigurations, configurationName) {
|
package/build/index.esm.js.gz
CHANGED
|
Binary file
|