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.
package/build/index.js CHANGED
@@ -6116,9 +6116,19 @@ var getRouteDeliveryTimeFromFreight = function (freight, contracts) {
6116
6116
  return 'ND';
6117
6117
  };
6118
6118
 
6119
- var getRouteOnTimeFromFreight = function (freight, contracts) {
6119
+ var getRouteOnTimeFromFreight = function (freight, contracts, routeToVerify) {
6120
6120
  var _a;
6121
- var route = getContractRouteFromFreight(contracts, freight);
6121
+ if (routeToVerify === void 0) { routeToVerify = null; }
6122
+ var route = null;
6123
+ if (!routeToVerify) {
6124
+ var myRoute = getContractRouteFromFreight(contracts, freight);
6125
+ if (myRoute) {
6126
+ route = myRoute;
6127
+ }
6128
+ }
6129
+ else {
6130
+ route = routeToVerify;
6131
+ }
6122
6132
  if (route) {
6123
6133
  if (freight.cteAt && freight.deliveredAt) {
6124
6134
  var contract = getContractFromFreight(contracts, freight);
@@ -6137,14 +6147,14 @@ var getRouteOnTimeFromFreight = function (freight, contracts) {
6137
6147
  return daysToDeliveryArray_1 === null || daysToDeliveryArray_1 === void 0 ? void 0 : daysToDeliveryArray_1.includes(dateDay);
6138
6148
  });
6139
6149
  if (daysToDeliveryQtd.length) {
6140
- return (daysToDeliveryQtd.length - 1) <= route.transitTime ? 'Sim' : 'Não';
6150
+ return (daysToDeliveryQtd.length - 1) <= route.transitTime;
6141
6151
  }
6142
6152
  }
6143
6153
  }
6144
6154
  }
6145
6155
  }
6146
6156
  }
6147
- return 'ND';
6157
+ return false;
6148
6158
  };
6149
6159
 
6150
6160
  function getConfigurationFromDomain(domainConfigurations, configurationName) {
package/build/index.js.gz CHANGED
Binary file