@bjsdistribution/dms-client-return 0.0.22 → 0.0.23

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.
@@ -9573,13 +9573,6 @@ function SelectionFilter() {
9573
9573
  });
9574
9574
  }
9575
9575
  };
9576
- React.useEffect(function () {
9577
- return function () {
9578
- dispatch({
9579
- type: 'CLEAR_CLIENT'
9580
- });
9581
- };
9582
- }, []);
9583
9576
  React.useEffect(function () {
9584
9577
  if (storedClientId) {
9585
9578
  dispatch({
@@ -9608,6 +9601,7 @@ function SelectionFilter() {
9608
9601
  });
9609
9602
  }
9610
9603
  }, [selectedFilterValue, selectedLocationValue]);
9604
+ console.log(storedName, 'storedName');
9611
9605
  return React__default.createElement(Wrapper$k, null, React__default.createElement(FilterRow, null, React__default.createElement(LeftColumn, null, React__default.createElement(FilterColumn, null, React__default.createElement(Label$g, null, "Clients"), React__default.createElement(StyledAntSelect$4, {
9612
9606
  options: clientOptions,
9613
9607
  placeholder: "Select Client Name",
@@ -9616,7 +9610,7 @@ function SelectionFilter() {
9616
9610
  minWidth: '14vw'
9617
9611
  },
9618
9612
  value: storedName
9619
- })), storedName && location.pathname.includes("/filter/") ? React__default.createElement(React__default.Fragment, null, React__default.createElement(FilterColumn, null, React__default.createElement(Label$g, null, "Action Type"), React__default.createElement(StyledAntSelect$4, {
9613
+ })), storedName && location.pathname.includes("filter/") ? React__default.createElement(React__default.Fragment, null, React__default.createElement(FilterColumn, null, React__default.createElement(Label$g, null, "Action Type"), React__default.createElement(StyledAntSelect$4, {
9620
9614
  options: actionTypeOptions,
9621
9615
  placeholder: "Select Action Type",
9622
9616
  value: selectedFilterValue,
@@ -12520,8 +12514,18 @@ function ReturnClient() {
12520
12514
  // const [, dispatch] = useAtom(filtersReducerAtom);
12521
12515
  console.log(selectedClientString, 'selectedClient');
12522
12516
  console.log("../filter/:" + selectedClientString);
12517
+ var splitPath = function splitPath(str) {
12518
+ var _str$split;
12519
+ var parts = str == null || (_str$split = str.split('/')) == null ? void 0 : _str$split.filter(function (part) {
12520
+ return part !== '';
12521
+ }); // Filter out empty parts
12522
+ return parts;
12523
+ };
12524
+ var paths = splitPath(location.pathname);
12525
+ console.log(paths, 'pathssssssssssssssssssssssssssss');
12523
12526
  React.useEffect(function () {
12524
- if (location.pathname.includes('/returnclient')) {
12527
+ console.log(paths[paths.length - 1], 'paths[paths.length] paths[paths.length]');
12528
+ if (paths[paths.length - 1] === 'returnclient') {
12525
12529
  localStorage.removeItem('clientName');
12526
12530
  localStorage.removeItem('clientId');
12527
12531
  localStorage.removeItem('uuid');