@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.
@@ -9565,13 +9565,6 @@ function SelectionFilter() {
9565
9565
  });
9566
9566
  }
9567
9567
  };
9568
- useEffect(function () {
9569
- return function () {
9570
- dispatch({
9571
- type: 'CLEAR_CLIENT'
9572
- });
9573
- };
9574
- }, []);
9575
9568
  useEffect(function () {
9576
9569
  if (storedClientId) {
9577
9570
  dispatch({
@@ -9600,6 +9593,7 @@ function SelectionFilter() {
9600
9593
  });
9601
9594
  }
9602
9595
  }, [selectedFilterValue, selectedLocationValue]);
9596
+ console.log(storedName, 'storedName');
9603
9597
  return React.createElement(Wrapper$k, null, React.createElement(FilterRow, null, React.createElement(LeftColumn, null, React.createElement(FilterColumn, null, React.createElement(Label$g, null, "Clients"), React.createElement(StyledAntSelect$4, {
9604
9598
  options: clientOptions,
9605
9599
  placeholder: "Select Client Name",
@@ -9608,7 +9602,7 @@ function SelectionFilter() {
9608
9602
  minWidth: '14vw'
9609
9603
  },
9610
9604
  value: storedName
9611
- })), storedName && location.pathname.includes("/filter/") ? React.createElement(React.Fragment, null, React.createElement(FilterColumn, null, React.createElement(Label$g, null, "Action Type"), React.createElement(StyledAntSelect$4, {
9605
+ })), storedName && location.pathname.includes("filter/") ? React.createElement(React.Fragment, null, React.createElement(FilterColumn, null, React.createElement(Label$g, null, "Action Type"), React.createElement(StyledAntSelect$4, {
9612
9606
  options: actionTypeOptions,
9613
9607
  placeholder: "Select Action Type",
9614
9608
  value: selectedFilterValue,
@@ -12512,8 +12506,18 @@ function ReturnClient() {
12512
12506
  // const [, dispatch] = useAtom(filtersReducerAtom);
12513
12507
  console.log(selectedClientString, 'selectedClient');
12514
12508
  console.log("../filter/:" + selectedClientString);
12509
+ var splitPath = function splitPath(str) {
12510
+ var _str$split;
12511
+ var parts = str == null || (_str$split = str.split('/')) == null ? void 0 : _str$split.filter(function (part) {
12512
+ return part !== '';
12513
+ }); // Filter out empty parts
12514
+ return parts;
12515
+ };
12516
+ var paths = splitPath(location.pathname);
12517
+ console.log(paths, 'pathssssssssssssssssssssssssssss');
12515
12518
  useEffect(function () {
12516
- if (location.pathname.includes('/returnclient')) {
12519
+ console.log(paths[paths.length - 1], 'paths[paths.length] paths[paths.length]');
12520
+ if (paths[paths.length - 1] === 'returnclient') {
12517
12521
  localStorage.removeItem('clientName');
12518
12522
  localStorage.removeItem('clientId');
12519
12523
  localStorage.removeItem('uuid');