@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.
- package/dist/dms-client-return.cjs.development.js +13 -9
- package/dist/dms-client-return.cjs.development.js.map +1 -1
- package/dist/dms-client-return.cjs.production.min.js +1 -1
- package/dist/dms-client-return.cjs.production.min.js.map +1 -1
- package/dist/dms-client-return.esm.js +13 -9
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +3 -7
- package/src/index.tsx +12 -1
package/package.json
CHANGED
|
@@ -211,12 +211,6 @@ function SelectionFilter() {
|
|
|
211
211
|
}
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
useEffect(() => {
|
|
215
|
-
return () => {
|
|
216
|
-
dispatch({ type: 'CLEAR_CLIENT' });
|
|
217
|
-
};
|
|
218
|
-
}, []);
|
|
219
|
-
|
|
220
214
|
useEffect(() => {
|
|
221
215
|
if (storedClientId) {
|
|
222
216
|
dispatch({
|
|
@@ -249,6 +243,8 @@ function SelectionFilter() {
|
|
|
249
243
|
}
|
|
250
244
|
}, [selectedFilterValue, selectedLocationValue]);
|
|
251
245
|
|
|
246
|
+
console.log(storedName, 'storedName');
|
|
247
|
+
|
|
252
248
|
return (
|
|
253
249
|
<Wrapper>
|
|
254
250
|
<FilterRow>
|
|
@@ -264,7 +260,7 @@ function SelectionFilter() {
|
|
|
264
260
|
/>
|
|
265
261
|
</FilterColumn>
|
|
266
262
|
|
|
267
|
-
{storedName && location.pathname.includes(
|
|
263
|
+
{storedName && location.pathname.includes(`filter/`) ? (
|
|
268
264
|
<>
|
|
269
265
|
<FilterColumn>
|
|
270
266
|
<Label>Action Type</Label>
|
package/src/index.tsx
CHANGED
|
@@ -40,8 +40,19 @@ function ReturnClient() {
|
|
|
40
40
|
console.log(selectedClientString, 'selectedClient');
|
|
41
41
|
console.log(`../filter/:${selectedClientString}`);
|
|
42
42
|
|
|
43
|
+
const splitPath = (str: any) => {
|
|
44
|
+
const parts = str?.split('/')?.filter((part: any) => part !== ''); // Filter out empty parts
|
|
45
|
+
return parts;
|
|
46
|
+
};
|
|
47
|
+
const paths = splitPath(location.pathname);
|
|
48
|
+
console.log(paths, 'pathssssssssssssssssssssssssssss');
|
|
49
|
+
|
|
43
50
|
useEffect(() => {
|
|
44
|
-
|
|
51
|
+
console.log(
|
|
52
|
+
paths[paths.length - 1],
|
|
53
|
+
'paths[paths.length] paths[paths.length]'
|
|
54
|
+
);
|
|
55
|
+
if (paths[paths.length - 1] === 'returnclient') {
|
|
45
56
|
localStorage.removeItem('clientName');
|
|
46
57
|
localStorage.removeItem('clientId');
|
|
47
58
|
localStorage.removeItem('uuid');
|