@bjsdistribution/dms-client-return 0.0.38 → 0.0.40

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.
@@ -8877,7 +8877,9 @@ function SelectionFilter() {
8877
8877
  var _useLocationOptions = useLocationOptions(),
8878
8878
  locationOptions = _useLocationOptions[0],
8879
8879
  setLocationOptions = _useLocationOptions[1];
8880
- var clientOptions = customers == null ? void 0 : customers.map(function (option) {
8880
+ var clientOptions = customers == null ? void 0 : customers.filter(function (option) {
8881
+ return 'customer_id' in option && option.customer_id != null;
8882
+ }).map(function (option) {
8881
8883
  var _option$customer_name, _option$customer_name2;
8882
8884
  return {
8883
8885
  label: (option == null || (_option$customer_name = option.customer_name) == null || (_option$customer_name = _option$customer_name.charAt(0)) == null ? void 0 : _option$customer_name.toUpperCase()) + (option == null || (_option$customer_name2 = option.customer_name) == null ? void 0 : _option$customer_name2.slice(1)),
@@ -9400,7 +9402,6 @@ var _templateObject$1V, _templateObject2$1p;
9400
9402
  var options = optionsForReturnPrint;
9401
9403
  var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
9402
9404
  var legacyProductId = _ref.legacyProductId;
9403
- console.log(legacyProductId, 'legacyProductId');
9404
9405
  var downloadFiles = function downloadFiles() {
9405
9406
  var url = "https://us.toolbox.bjshomedelivery.com/offload/return_label?gsit_products_id=" + legacyProductId;
9406
9407
  window.open(url, '_blank'); // Opens the URL in a new tab
@@ -9700,7 +9701,6 @@ var ReturnOrderTable = function ReturnOrderTable() {
9700
9701
  }, []);
9701
9702
  var mergedPayload = Object.values(groupedPayload);
9702
9703
  setGrouped(mergedPayload);
9703
- console.log(mergedPayload, 'mergedPayload');
9704
9704
  }, [newpayload]);
9705
9705
  return React.createElement(React.Fragment, null, postLoading && React.createElement(Loader, null), React.createElement(StyledTableWrapper, {
9706
9706
  className: "fortables"
@@ -9757,7 +9757,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
9757
9757
  }))) : (sortedData == null ? void 0 : sortedData.length) === 0 ? React.createElement("tr", null, React.createElement("td", {
9758
9758
  colSpan: 14
9759
9759
  }, React.createElement(EmptyDataContainer$1, null, React.createElement(Empty, null)))) : sortedData == null ? void 0 : sortedData.map(function (item, index) {
9760
- var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$order_data, _item$order_data2, _item$order_product_r3, _item$return_reasons, _item$order_product_r4, _item$order_product_r5, _item$collection_reas;
9760
+ var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$return_location, _item$order_data, _item$order_data2, _item$order_product_r3, _item$return_reasons, _item$order_product_r4, _item$order_product_r5, _item$collection_reas;
9761
9761
  return React.createElement("tr", {
9762
9762
  key: item.id
9763
9763
  }, React.createElement("td", null, (item == null || (_item$order_product_r2 = item.order_product_return_action) == null ? void 0 : _item$order_product_r2.type) == 'RTS' ? React.createElement(React.Fragment, null, React.createElement(Checkbox$1, {
@@ -9772,7 +9772,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
9772
9772
  }
9773
9773
  })) : null), React.createElement("td", null, (item == null || (_item$orders_products = item.orders_products_stock) == null ? void 0 : _item$orders_products.location) !== null && (item == null || (_item$orders_products2 = item.orders_products_stock) == null ? void 0 : _item$orders_products2.location) !== undefined ? item.orders_products_stock.location : React.createElement("div", {
9774
9774
  className: "awaiting"
9775
- }, "Awaiting")), React.createElement("td", null, " ", displayValueOrNA(item == null ? void 0 : item.new_location)), React.createElement("td", null, React.createElement("ul", {
9775
+ }, "Awaiting")), React.createElement("td", null, ' ', displayValueOrNA(item == null || (_item$return_location = item.return_locations) == null ? void 0 : _item$return_location.location_name)), React.createElement("td", null, React.createElement("ul", {
9776
9776
  style: {
9777
9777
  listStyleType: 'none',
9778
9778
  padding: 0
@@ -9921,6 +9921,7 @@ var CreateReturnModal = function CreateReturnModal() {
9921
9921
  padding: 0
9922
9922
  }
9923
9923
  }, uniqueLocations == null ? void 0 : uniqueLocations.map(function (returnLoc) {
9924
+ var _returnLoc$return_loc;
9924
9925
  return React.createElement("li", {
9925
9926
  key: returnLoc.id,
9926
9927
  style: {
@@ -9937,7 +9938,7 @@ var CreateReturnModal = function CreateReturnModal() {
9937
9938
  style: {
9938
9939
  marginLeft: '8px'
9939
9940
  }
9940
- }, displayValueOrNA(returnLoc == null ? void 0 : returnLoc.new_location)));
9941
+ }, displayValueOrNA(returnLoc == null || (_returnLoc$return_loc = returnLoc.return_locations) == null ? void 0 : _returnLoc$return_loc.location_name)));
9941
9942
  })))));
9942
9943
  };
9943
9944
  var StyledText$1 = /*#__PURE__*/styled.div(_templateObject$1X || (_templateObject$1X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8d8f90;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n"])));
@@ -11199,8 +11200,7 @@ var ReturnTable$1 = function ReturnTable() {
11199
11200
  updatedData = _useState[0],
11200
11201
  setUpdatedData = _useState[1];
11201
11202
  var _useStatsLoading = useStatsLoading(),
11202
- statsLoading = _useStatsLoading[0],
11203
- setLoading = _useStatsLoading[1];
11203
+ statsLoading = _useStatsLoading[0];
11204
11204
  var _useOrderStaticData = useOrderStaticData(),
11205
11205
  setOrderStaticData = _useOrderStaticData[1];
11206
11206
  var _useAtom = useAtom(filtersReducerAtom),
@@ -11256,7 +11256,7 @@ var ReturnTable$1 = function ReturnTable() {
11256
11256
  fetchedStaticData = _useApiHook.data,
11257
11257
  staticDataLoading = _useApiHook.loading;
11258
11258
  useEffect(function () {
11259
- setLoading(staticDataLoading);
11259
+ // setLoading(staticDataLoading);
11260
11260
  if (fetchedStaticData && fetchedStaticData.data) {
11261
11261
  var result = fetchedStaticData == null ? void 0 : fetchedStaticData.data;
11262
11262
  setOrderStaticData(result[0]);
@@ -11294,10 +11294,12 @@ var ReturnTable$1 = function ReturnTable() {
11294
11294
  payload: []
11295
11295
  });
11296
11296
  }
11297
- //navigate(`filter/${customerId}`);
11298
- //forlocal
11299
- navigate("/filter/" + customerId);
11297
+ //for dev
11298
+ navigate("filter/" + customerId);
11299
+ //for local
11300
+ // navigate(`/filter/${customerId}`);
11300
11301
  };
11302
+ console.log(statsLoading, 'statsLoading');
11301
11303
  return React.createElement(React.Fragment, null, statsLoading && React.createElement(Loader, null), React.createElement(StyledTableWrapper$2, {
11302
11304
  id: "tableScrolling"
11303
11305
  }, React.createElement(StyledTable$3, null, React.createElement("thead", null, React.createElement("tr", null, [{