@bjsdistribution/dms-client-return 0.0.44 → 0.0.46

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.
@@ -3435,7 +3435,7 @@ var renderIcon = function renderIcon(value, orderStatus) {
3435
3435
  }
3436
3436
  };
3437
3437
  var BoxContainer = /*#__PURE__*/styled.div(_templateObject$S || (_templateObject$S = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border: 1px solid #e3e3e3;\n display: flex;\n justify-content: space-evenly;\n border-radius: 8px;\n background: #f8fafc;\n align-items: center;\n height: 5%;\n"])));
3438
- var Heading = /*#__PURE__*/styled.div(_templateObject2$F || (_templateObject2$F = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-family: 'lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 18px;\n"])));
3438
+ var Heading = /*#__PURE__*/styled.div(_templateObject2$F || (_templateObject2$F = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-family: 'lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 18px;\n text-transform: uppercase;\n"])));
3439
3439
  var Container$A = /*#__PURE__*/styled.div(_templateObject3$l || (_templateObject3$l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 15px;\n margin-top: 25px;\n"])));
3440
3440
  var TextContainer$1 = /*#__PURE__*/styled.div(_templateObject4$9 || (_templateObject4$9 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n gap: 10px;\n display: flex;\n align-items: center;\n"])));
3441
3441
 
@@ -8930,7 +8930,7 @@ function SelectionFilter() {
8930
8930
  }
8931
8931
  }, [accountNumber, urlCustomerId]);
8932
8932
  useEffect(function () {
8933
- if (urlCustomerId && (clientOptions == null ? void 0 : clientOptions.length) > 0) {
8933
+ if (urlCustomerId) {
8934
8934
  var filteredClient = clientOptions == null ? void 0 : clientOptions.find(function (client) {
8935
8935
  return (client == null ? void 0 : client.value) == urlCustomerId;
8936
8936
  });
@@ -8967,10 +8967,13 @@ function SelectionFilter() {
8967
8967
  var queryParams = new URLSearchParams({
8968
8968
  customerId: selectedClient == null ? void 0 : selectedClient.toString()
8969
8969
  });
8970
- //for dev
8971
- navigate("filter?" + queryParams.toString());
8972
- //for local
8973
- //navigate(`/filter?${queryParams.toString()}`);
8970
+ var currentSearch = window.location.search;
8971
+ if (!currentSearch.includes('filter')) {
8972
+ // for dev
8973
+ navigate("filter?" + queryParams.toString());
8974
+ // for local
8975
+ // navigate(`/filter?${queryParams.toString()}`);
8976
+ }
8974
8977
  }
8975
8978
  var selectedClientValue = clientOptions == null ? void 0 : clientOptions.find(function (client) {
8976
8979
  return (client == null ? void 0 : client.value) === selectedClient;
@@ -8985,8 +8988,8 @@ function SelectionFilter() {
8985
8988
  }) : []);
8986
8989
  setLocationOptions(Array.isArray(clientLocations) ? clientLocations == null ? void 0 : clientLocations.map(function (location) {
8987
8990
  return {
8988
- label: location,
8989
- value: location
8991
+ label: location == null ? void 0 : location.location_name,
8992
+ value: location == null ? void 0 : location.token
8990
8993
  };
8991
8994
  }) : []);
8992
8995
  //client value
@@ -11598,9 +11601,9 @@ var ReturnTable$1 = function ReturnTable() {
11598
11601
  fontWeight: (key == null ? void 0 : key.RTS) > 0 ? 600 : 'normal',
11599
11602
  cursor: (key == null ? void 0 : key.RTS) > 0 ? 'pointer' : 'default'
11600
11603
  },
11601
- onClick: function onClick() {
11604
+ onClick: (key == null ? void 0 : key.RTS) > 0 ? function () {
11602
11605
  return handleRedirectRTS(key == null ? void 0 : key.customer_id, 'RTS');
11603
- }
11606
+ } : undefined
11604
11607
  }, React.createElement(ColumStyle, null, React.createElement(GreyBox, {
11605
11608
  style: {
11606
11609
  backgroundColor: (key == null ? void 0 : key.RTS) > 0 ? 'rgba(99, 150, 229, 0.1)' : 'rgba(153, 153, 153, 0.1)'