@bjsdistribution/dms-client-return 0.0.21 → 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 +16 -20
- 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 +16 -20
- 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 -10
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +0 -2
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +3 -8
- package/src/index.tsx +17 -2
package/package.json
CHANGED
|
@@ -177,7 +177,6 @@ function SelectionFilter() {
|
|
|
177
177
|
type: 'SET_CLIENT_FILTER',
|
|
178
178
|
payload: storedClientId,
|
|
179
179
|
});
|
|
180
|
-
// Reset to the first page
|
|
181
180
|
dispatch({
|
|
182
181
|
type: 'SET_PAGE',
|
|
183
182
|
payload: 1,
|
|
@@ -194,7 +193,6 @@ function SelectionFilter() {
|
|
|
194
193
|
type: 'SET_ACTIONS_FILTER',
|
|
195
194
|
payload: selectedFilterValue,
|
|
196
195
|
});
|
|
197
|
-
// Reset to the first page
|
|
198
196
|
dispatch({
|
|
199
197
|
type: 'SET_PAGE',
|
|
200
198
|
payload: 1,
|
|
@@ -206,7 +204,6 @@ function SelectionFilter() {
|
|
|
206
204
|
type: 'SET_LOCATION_FILTER',
|
|
207
205
|
payload: selectedLocationValue,
|
|
208
206
|
});
|
|
209
|
-
// Reset to the first page
|
|
210
207
|
dispatch({
|
|
211
208
|
type: 'SET_PAGE',
|
|
212
209
|
payload: 1,
|
|
@@ -214,12 +211,6 @@ function SelectionFilter() {
|
|
|
214
211
|
}
|
|
215
212
|
};
|
|
216
213
|
|
|
217
|
-
useEffect(() => {
|
|
218
|
-
return () => {
|
|
219
|
-
dispatch({ type: 'CLEAR_CLIENT' });
|
|
220
|
-
};
|
|
221
|
-
}, []);
|
|
222
|
-
|
|
223
214
|
useEffect(() => {
|
|
224
215
|
if (storedClientId) {
|
|
225
216
|
dispatch({
|
|
@@ -252,6 +243,8 @@ function SelectionFilter() {
|
|
|
252
243
|
}
|
|
253
244
|
}, [selectedFilterValue, selectedLocationValue]);
|
|
254
245
|
|
|
246
|
+
console.log(storedName, 'storedName');
|
|
247
|
+
|
|
255
248
|
return (
|
|
256
249
|
<Wrapper>
|
|
257
250
|
<FilterRow>
|
|
@@ -267,7 +260,7 @@ function SelectionFilter() {
|
|
|
267
260
|
/>
|
|
268
261
|
</FilterColumn>
|
|
269
262
|
|
|
270
|
-
{storedName && location.pathname.includes(
|
|
263
|
+
{storedName && location.pathname.includes(`filter/`) ? (
|
|
271
264
|
<>
|
|
272
265
|
<FilterColumn>
|
|
273
266
|
<Label>Action Type</Label>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
// import RouterHeader from '../header/route-header/RouterHeader';
|
|
4
|
-
// import HeaderFilter from '../header-filters/HeaderFilter';
|
|
5
3
|
import OrderTable from './table/OrderTable';
|
|
6
4
|
import ReturnOrderFilter from './table-filters/ReturnOrderFilter';
|
|
7
5
|
import { useAtom, useReturnAfterOrderData } from '../../order-view/store';
|
|
@@ -43,11 +43,9 @@ const ReturnOrderTable = () => {
|
|
|
43
43
|
const [locationData] = useLocationData();
|
|
44
44
|
const [, setPaginationObject] = UsePaginationData();
|
|
45
45
|
const [callForFetch] = usefetchAgain();
|
|
46
|
-
// console.log(callForFetch, 'callForFetchcallForFetchcallForFetchcallForFetch');
|
|
47
46
|
const OpenDropDown = (index: number) => {
|
|
48
47
|
setPrintToggle(prevIndex => (prevIndex === index ? null : index));
|
|
49
48
|
};
|
|
50
|
-
console.log(newpayload, 'newpayload');
|
|
51
49
|
// Close dropdown outside click
|
|
52
50
|
useEffect(() => {
|
|
53
51
|
document.addEventListener('mousedown', handleClickOutside);
|
|
@@ -156,9 +154,6 @@ const ReturnOrderTable = () => {
|
|
|
156
154
|
}
|
|
157
155
|
};
|
|
158
156
|
|
|
159
|
-
console.log(selectedReturnOrder, 'selectedReturnOrder');
|
|
160
|
-
console.log(newpayload, 'newpayload');
|
|
161
|
-
|
|
162
157
|
const handleSelectOrderReturn = (
|
|
163
158
|
id: any,
|
|
164
159
|
return_location: any,
|
|
@@ -280,7 +275,7 @@ const ReturnOrderTable = () => {
|
|
|
280
275
|
<th>Product Location</th>
|
|
281
276
|
<th>Return Location</th>
|
|
282
277
|
<th>Recipient</th>
|
|
283
|
-
<th>Return Action Type</th>
|
|
278
|
+
{/* <th>Return Action Type</th> */}
|
|
284
279
|
<th>Code</th>
|
|
285
280
|
<th>Description</th>
|
|
286
281
|
<th>Part</th>
|
|
@@ -368,9 +363,9 @@ const ReturnOrderTable = () => {
|
|
|
368
363
|
</li>
|
|
369
364
|
</ul>
|
|
370
365
|
</td>
|
|
371
|
-
<td>
|
|
366
|
+
{/* <td>
|
|
372
367
|
{displayValueOrNA(item?.order_product_return_action?.type)}
|
|
373
|
-
</td>
|
|
368
|
+
</td> */}
|
|
374
369
|
<td>{displayValueOrNA(item?.code)}</td>
|
|
375
370
|
<td>{displayValueOrNA(item?.description)}</td>
|
|
376
371
|
<td>{displayValueOrNA(item?.parts_count)}</td>
|
package/src/index.tsx
CHANGED
|
@@ -40,12 +40,22 @@ 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');
|
|
48
|
-
localStorage.removeItem('customer_id');
|
|
49
59
|
// dispatch({ type: 'CLEAR_CLIENT', payload: [] });
|
|
50
60
|
}
|
|
51
61
|
}, [location.pathname]);
|
|
@@ -116,7 +126,12 @@ function ReturnClient() {
|
|
|
116
126
|
<RouterHeader />
|
|
117
127
|
<Suspense fallback={<LoadingMessage />}>
|
|
118
128
|
<Routes>
|
|
129
|
+
{/* for local */}
|
|
130
|
+
{/* <Route path="returnclient" element={<ReturnMainTable />} /> */}
|
|
131
|
+
|
|
132
|
+
{/* for dev */}
|
|
119
133
|
<Route path="" element={<ReturnMainTable />} />
|
|
134
|
+
|
|
120
135
|
<Route path="order-return" element={<ReturnAfterTable />} />
|
|
121
136
|
<Route path="order-return/:id" element={<OrderView />} />
|
|
122
137
|
<Route path="filter/:clientName" element={<ReturnTable />} />
|