@bjsdistribution/dms-client-return 0.0.20 → 0.0.21

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.
Files changed (27) hide show
  1. package/dist/components/order-daily-overview/store/store.d.ts +1 -1
  2. package/dist/components/order-view/utils.d.ts +2 -0
  3. package/dist/dms-client-return.cjs.development.js +464 -380
  4. package/dist/dms-client-return.cjs.development.js.map +1 -1
  5. package/dist/dms-client-return.cjs.production.min.js +1 -1
  6. package/dist/dms-client-return.cjs.production.min.js.map +1 -1
  7. package/dist/dms-client-return.esm.js +465 -381
  8. package/dist/dms-client-return.esm.js.map +1 -1
  9. package/package.json +1 -1
  10. package/src/components/order-daily-overview/header-filters/HeaderFilter.tsx +58 -58
  11. package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +85 -46
  12. package/src/components/order-daily-overview/header-filters/Styledfilters.tsx +1 -0
  13. package/src/components/order-daily-overview/header-filters/filterStore.ts +17 -1
  14. package/src/components/order-daily-overview/index.tsx +9 -8
  15. package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +9 -5
  16. package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +5 -5
  17. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +1 -0
  18. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +22 -19
  19. package/src/components/order-daily-overview/return-after-table/table-filters/TableFilters.tsx +55 -55
  20. package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +73 -38
  21. package/src/components/order-daily-overview/return-order-table/return-orders-filters/RightFilters.tsx +42 -43
  22. package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +1 -0
  23. package/src/components/order-daily-overview/store/store.ts +1 -1
  24. package/src/components/order-view/index.tsx +6 -6
  25. package/src/components/order-view/modalsPopup/ModalManager.tsx +17 -11
  26. package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +21 -2
  27. package/src/index.tsx +74 -1
@@ -13,7 +13,6 @@ import ClientIcon from '../../../../assets/icons/ClientIcon';
13
13
  import { DatePicker, Select } from 'antd';
14
14
  import { useAtom } from '../../../order-view/store';
15
15
  import styled from 'styled-components';
16
- import { filtersReducerReturnAtom } from './ReturnFilterStore';
17
16
  import dayjs from 'dayjs';
18
17
  import { useCustomerData, useStatusOrderData } from '../../../store';
19
18
  import StatusIcon from '../../../../assets/icons/StatusIcon';
@@ -23,7 +22,7 @@ import {
23
22
  StyledFilterBtnIcon,
24
23
  StyledFilterBtnLabel,
25
24
  } from '../../table/table-data/styles';
26
-
25
+ import { filtersReducerReturnAtom } from './ReturnFilterStore';
27
26
  const ReturnOrderFilter = () => {
28
27
  const [, dispatch] = useAtom(filtersReducerReturnAtom);
29
28
  const [customers] = useCustomerData();
@@ -31,7 +30,7 @@ const ReturnOrderFilter = () => {
31
30
  const [statusOfOrder] = useStatusOrderData();
32
31
  const [selectedClient, setSelectedClient] = useState<any | null>();
33
32
  const [statusOrder, setStatusOfOrder] = useState<any | null>();
34
-
33
+ console.log(selectedClient, 'fffffselectedClient');
35
34
  const zoneOptions = [
36
35
  { label: 'Zone 1', value: 'zone1' },
37
36
  { label: 'Zone 2', value: 'zone2' },
@@ -39,7 +38,6 @@ const ReturnOrderFilter = () => {
39
38
  { label: 'Zone 4', value: 'zone4' },
40
39
  { label: 'Zone 5', value: 'zone5' },
41
40
  ];
42
-
43
41
  // date change here
44
42
  const handleDateChange = (date: any | null) => {
45
43
  setSelectedDate(date ? date?.$d : null);
@@ -52,9 +50,13 @@ const ReturnOrderFilter = () => {
52
50
  type: 'SET_DATE_FILTER',
53
51
  payload: selectedDate,
54
52
  });
53
+ // Reset to the first page
54
+ dispatch({
55
+ type: 'SET_PAGE',
56
+ payload: 1,
57
+ });
55
58
  }
56
59
  }, [selectedDate]);
57
-
58
60
  //client options
59
61
  const clientOptions = customers?.map((option: any) => ({
60
62
  label:
@@ -62,7 +64,7 @@ const ReturnOrderFilter = () => {
62
64
  option?.customer_name?.slice(1),
63
65
  value: option?.id,
64
66
  }));
65
-
67
+ console.log(clientOptions, 'clientOptions');
66
68
  //status of order
67
69
  const orderOptions = statusOfOrder?.map((option: any) => ({
68
70
  label:
@@ -70,32 +72,40 @@ const ReturnOrderFilter = () => {
70
72
  option?.status_type?.slice(1),
71
73
  value: option?.id,
72
74
  }));
73
-
74
75
  const handleClientChange = (value: any) => {
76
+ if (value === selectedClient) return;
75
77
  console.log(value, 'value');
76
78
  setSelectedClient(value);
77
79
  dispatch({
78
80
  type: 'SET_CLIENT_FILTER',
79
- payload: selectedClient,
81
+ payload: value,
82
+ });
83
+ // Reset to the first page
84
+ dispatch({
85
+ type: 'SET_PAGE',
86
+ payload: 1,
80
87
  });
81
88
  };
82
-
83
89
  const handleStatusOfOrder = (value: any) => {
90
+ if (value === statusOfOrder) return;
84
91
  console.log(value, 'value');
85
92
  setStatusOfOrder(value);
86
93
  dispatch({
87
94
  type: 'SET_STATUS_ORDER_FILTER',
88
95
  payload: value,
89
96
  });
97
+ // Reset to the first page
98
+ dispatch({
99
+ type: 'SET_PAGE',
100
+ payload: 1,
101
+ });
90
102
  };
91
-
92
103
  const handleClearAll = () => {
93
104
  setSelectedDate(null);
94
105
  setSelectedClient(null);
95
106
  setStatusOfOrder(null);
96
107
  dispatch({ type: 'CLEAR_ALL_FILTER' });
97
108
  };
98
-
99
109
  return (
100
110
  <>
101
111
  <StyledFiter>
@@ -135,7 +145,6 @@ const ReturnOrderFilter = () => {
135
145
  onChange={handleStatusOfOrder}
136
146
  style={{ minWidth: '130px' }}
137
147
  value={statusOrder}
138
- allowClear
139
148
  />
140
149
  </StyledAntSelect>
141
150
  </div>
@@ -151,7 +160,6 @@ const ReturnOrderFilter = () => {
151
160
  onChange={handleClientChange}
152
161
  value={selectedClient}
153
162
  style={{ width: '125px', border: 'none' }}
154
- allowClear
155
163
  />
156
164
  </StyledAntSelect>
157
165
  </div>
@@ -173,7 +181,7 @@ const ReturnOrderFilter = () => {
173
181
  />
174
182
  </StyledAntSelect>
175
183
  </div>
176
- {selectedDate ? (
184
+ {selectedDate || statusOrder || selectedClient ? (
177
185
  <>
178
186
  <ClearAll onClick={handleClearAll}>
179
187
  <StyledFilterBtnIcon>
@@ -190,15 +198,12 @@ const ReturnOrderFilter = () => {
190
198
  </>
191
199
  );
192
200
  };
193
-
194
201
  const StyledDatePicker = styled.div`
195
202
  .custom-datepicker {
196
203
  border: none;
197
204
  }
198
205
  `;
199
-
200
206
  // const DropdownContainer = styled.div``;
201
-
202
207
  export const StyledAntSelect = styled.div`
203
208
  .custom-select {
204
209
  border: none;
@@ -211,7 +216,6 @@ export const StyledAntSelect = styled.div`
211
216
  .ant-select-selector {
212
217
  padding: 0 5px;
213
218
  }
214
-
215
219
  :where(.css-dev-only-do-not-override-m4timi).ant-select-outlined:not(.ant-select-customize-input)
216
220
  .ant-select-selector {
217
221
  border: none;
@@ -234,5 +238,4 @@ export const StyledAntSelect = styled.div`
234
238
  top: 16px;
235
239
  }
236
240
  `;
237
-
238
241
  export default ReturnOrderFilter;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
 
3
- import { StyledBulkItem } from '../../filters/BulkFilterStyle';
4
- import SearchType from '../../header/route-header/search/SearchType';
3
+ // import { StyledBulkItem } from '../../filters/BulkFilterStyle';
4
+ // import SearchType from '../../header/route-header/search/SearchType';
5
5
  import styled from 'styled-components';
6
- import DownloadIcon from '../../../../assets/icons/DownloadIcon';
6
+ // import DownloadIcon from '../../../../assets/icons/DownloadIcon';
7
7
 
8
8
  const TableFilters = () => {
9
9
  return (
@@ -12,15 +12,15 @@ const TableFilters = () => {
12
12
  <Text>Create Return</Text>
13
13
  </TextConatiner> */}
14
14
 
15
- <StyledBulkItem>
15
+ {/* <StyledBulkItem>
16
16
  <SearchType />
17
- </StyledBulkItem>
18
- <IconConatiner>
19
- <Mid>
17
+ </StyledBulkItem> */}
18
+ {/* <IconConatiner>
19
+ <Mid>
20
20
  <IconText>Export</IconText>
21
21
  <DownloadIcon />
22
- </Mid>
23
- </IconConatiner>
22
+ </Mid>
23
+ </IconConatiner> */}
24
24
  </Container>
25
25
  );
26
26
 
@@ -44,14 +44,14 @@ const Container = styled.div`
44
44
  gap: 16px;
45
45
  align-items: center;
46
46
  `;
47
- const Mid = styled.div`
48
- display: flex;
49
- padding: 10px 10px 10px 10px;
50
- align-items: center;
51
- gap: 8px;
52
- align-self: stretch;
53
- /* border-radius: 15px 15px 15px 15px; */
54
- `;
47
+ // const Mid = styled.div`
48
+ // display: flex;
49
+ // padding: 10px 10px 10px 10px;
50
+ // align-items: center;
51
+ // gap: 8px;
52
+ // align-self: stretch;
53
+ // /* border-radius: 15px 15px 15px 15px; */
54
+ // `;
55
55
 
56
56
  // const TextConatiner = styled.div`
57
57
  // display: flex;
@@ -71,47 +71,47 @@ const Mid = styled.div`
71
71
  // line-height: 20px;
72
72
  // `;
73
73
 
74
- const IconConatiner = styled.div`
75
- /* display: flex;
76
- height: 34px;
77
- padding: 4px 10px;
78
- align-items: flex-start;
79
- border-radius: 8px 8px 8px 8px; */
74
+ // const IconConatiner = styled.div`
75
+ // /* display: flex;
76
+ // height: 34px;
77
+ // padding: 4px 10px;
78
+ // align-items: flex-start;
79
+ // border-radius: 8px 8px 8px 8px; */
80
80
 
81
- ///working
82
- /* box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
83
- background: #f0f2f2;
84
- border: 1px solid #e2e0db;
85
- display: flex;
86
- padding: 7px 12px;
87
- justify-content: center;
88
- align-items: center;
89
- gap: 2px;
90
- border-radius: 15px;
91
- height: 34px; */
92
- ///////
81
+ // ///working
82
+ // /* box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
83
+ // background: #f0f2f2;
84
+ // border: 1px solid #e2e0db;
85
+ // display: flex;
86
+ // padding: 7px 12px;
87
+ // justify-content: center;
88
+ // align-items: center;
89
+ // gap: 2px;
90
+ // border-radius: 15px;
91
+ // height: 34px; */
92
+ // ///////
93
93
 
94
- display: flex;
95
- height: 34px;
96
- padding: 1px;
97
- align-items: flex-start;
98
- background: #f0f2f2;
99
- border: 1px solid #e2e0db;
100
- border-radius: 20px 20px 20px 20px;
94
+ // display: flex;
95
+ // height: 34px;
96
+ // padding: 1px;
97
+ // align-items: flex-start;
98
+ // background: #f0f2f2;
99
+ // border: 1px solid #e2e0db;
100
+ // border-radius: 20px 20px 20px 20px;
101
101
 
102
- /* shadow/shadow-xs */
103
- box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
104
- `;
102
+ // /* shadow/shadow-xs */
103
+ // box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
104
+ // `;
105
105
 
106
- const IconText = styled.div`
107
- color: #3a3630;
108
- text-align: center;
106
+ // const IconText = styled.div`
107
+ // color: #3a3630;
108
+ // text-align: center;
109
109
 
110
- /* body/captions */
111
- font-family: 'Lato';
112
- font-size: 13px;
113
- font-style: normal;
114
- font-weight: 400;
115
- line-height: 16px;
116
- `;
110
+ // /* body/captions */
111
+ // font-family: 'Lato';
112
+ // font-size: 13px;
113
+ // font-style: normal;
114
+ // font-weight: 400;
115
+ // line-height: 16px;
116
+ // `;
117
117
  export default TableFilters;
@@ -47,7 +47,7 @@ const ReturnOrderTable = () => {
47
47
  const OpenDropDown = (index: number) => {
48
48
  setPrintToggle(prevIndex => (prevIndex === index ? null : index));
49
49
  };
50
-
50
+ console.log(newpayload, 'newpayload');
51
51
  // Close dropdown outside click
52
52
  useEffect(() => {
53
53
  document.addEventListener('mousedown', handleClickOutside);
@@ -116,28 +116,38 @@ const ReturnOrderTable = () => {
116
116
 
117
117
  const handleSelectAll = (e: any) => {
118
118
  setSelectAll(e.target.checked);
119
+
119
120
  if (e.target.checked) {
120
121
  setSelectedReturnOrder(
121
- returnData?.map((loc: any) => ({
122
- id: loc.id,
123
- return_locations: loc?.return_locations,
124
- return_location: loc?.return_location,
125
- products: loc?.legacy_product_id,
126
- order_product_return_action: loc?.order_product_return_action,
127
- return_location_token: loc?.return_location,
128
- new_location: loc?.new_location,
129
- }))
122
+ returnData
123
+ ?.filter(
124
+ (loc: any) => loc?.order_product_return_action?.type === 'RTS'
125
+ )
126
+ .map((loc: any) => ({
127
+ id: loc.id,
128
+ return_locations: loc?.return_locations,
129
+ return_location: loc?.return_location,
130
+ products: loc?.legacy_product_id,
131
+ order_product_return_action: loc?.order_product_return_action,
132
+ return_location_token: loc?.return_location,
133
+ new_location: loc?.new_location,
134
+ }))
130
135
  );
136
+
131
137
  setNewPayload(
132
- returnData?.map((loc: any) => ({
133
- id: loc.id,
134
- account_number: createReturn?.account_number,
135
- customer_id: +createReturn?.customer_id,
136
- products: [loc?.legacy_product_id],
137
- return_action: [loc?.order_product_return_action?.type] || null,
138
- return_location_token: loc?.return_location || null,
139
- new_location: loc?.new_location,
140
- }))
138
+ returnData
139
+ ?.filter(
140
+ (loc: any) => loc?.order_product_return_action?.type === 'RTS'
141
+ )
142
+ .map((loc: any) => ({
143
+ id: loc.id,
144
+ account_number: createReturn?.account_number,
145
+ customer_id: +createReturn?.customer_id,
146
+ products: [loc?.legacy_product_id],
147
+ return_action: loc?.order_product_return_action?.type,
148
+ return_location_token: loc?.return_location || null,
149
+ new_location: loc?.new_location,
150
+ }))
141
151
  );
142
152
  } else {
143
153
  setSelectedReturnOrder([]);
@@ -146,6 +156,9 @@ const ReturnOrderTable = () => {
146
156
  }
147
157
  };
148
158
 
159
+ console.log(selectedReturnOrder, 'selectedReturnOrder');
160
+ console.log(newpayload, 'newpayload');
161
+
149
162
  const handleSelectOrderReturn = (
150
163
  id: any,
151
164
  return_location: any,
@@ -252,12 +265,22 @@ const ReturnOrderTable = () => {
252
265
  <StyledTable>
253
266
  <thead>
254
267
  <tr>
255
- <th className="emailInvoiceCheckbox">
268
+ {/* <th className="emailInvoiceCheckbox">
256
269
  <Checkbox checked={selectAll} onChange={handleSelectAll} />
257
- </th>
270
+ </th> */}
271
+ {returnData?.some(
272
+ (item: any) => item?.order_product_return_action?.type === 'RTS'
273
+ ) ? (
274
+ <th className="emailInvoiceCheckbox">
275
+ <Checkbox checked={selectAll} onChange={handleSelectAll} />
276
+ </th>
277
+ ) : (
278
+ <th></th>
279
+ )}
258
280
  <th>Product Location</th>
259
281
  <th>Return Location</th>
260
282
  <th>Recipient</th>
283
+ <th>Return Action Type</th>
261
284
  <th>Code</th>
262
285
  <th>Description</th>
263
286
  <th>Part</th>
@@ -289,24 +312,33 @@ const ReturnOrderTable = () => {
289
312
  returnData?.map((item: any, index: any) => (
290
313
  <tr key={item.id}>
291
314
  <td>
292
- <Checkbox
293
- className="custom-check"
294
- checked={selectedReturnOrder?.some(
295
- (selectedInvoice: any) =>
296
- selectedInvoice?.id === item.id
297
- )}
298
- onChange={() =>
299
- handleSelectOrderReturn(
300
- item.id,
301
- item.return_location,
302
- item.return_locations,
303
- item.order_product_return_action,
304
- item.new_location,
305
- item.legacy_product_id
306
- )
307
- }
308
- />
315
+ {item?.order_product_return_action?.type == 'RTS' ? (
316
+ <>
317
+ <Checkbox
318
+ className="custom-check"
319
+ checked={selectedReturnOrder?.some(
320
+ (selectedInvoice: any) =>
321
+ selectedInvoice?.id === item.id
322
+ )}
323
+ onChange={() =>
324
+ handleSelectOrderReturn(
325
+ item.id,
326
+ item.return_location,
327
+ item.return_locations,
328
+ item.order_product_return_action,
329
+ item.new_location,
330
+ item.legacy_product_id
331
+ )
332
+ }
333
+ />
334
+ </>
335
+ ) : null}
309
336
  </td>
337
+
338
+ {/* <>
339
+ <Checkbox disabled onChange={() => {}} checked={false} />
340
+ </> */}
341
+
310
342
  <td>
311
343
  {item?.orders_products_stock?.location !== null &&
312
344
  item?.orders_products_stock?.location !== undefined ? (
@@ -336,6 +368,9 @@ const ReturnOrderTable = () => {
336
368
  </li>
337
369
  </ul>
338
370
  </td>
371
+ <td>
372
+ {displayValueOrNA(item?.order_product_return_action?.type)}
373
+ </td>
339
374
  <td>{displayValueOrNA(item?.code)}</td>
340
375
  <td>{displayValueOrNA(item?.description)}</td>
341
376
  <td>{displayValueOrNA(item?.parts_count)}</td>
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
-
3
- import { StyledBulkItem } from '../../filters/BulkFilterStyle';
4
- import SearchType from '../../header/route-header/search/SearchType';
5
2
  import styled from 'styled-components';
6
- import DownloadIcon from '../../../../assets/icons/DownloadIcon';
7
3
  import { countReducerAtom, useAtom } from '../../../order-view/store';
8
4
  import { useSelectedOrders } from '../../../store';
5
+ // import { StyledBulkItem } from '../../filters/BulkFilterStyle';
6
+ // import SearchType from '../../header/route-header/search/SearchType';
7
+ // import DownloadIcon from '../../../../assets/icons/DownloadIcon';
9
8
 
10
9
  const RightFilters = () => {
11
10
  const [, dispatch] = useAtom(countReducerAtom);
@@ -19,15 +18,15 @@ const RightFilters = () => {
19
18
  >
20
19
  Create Return
21
20
  </ButtonText>
22
- <StyledBulkItem>
21
+ {/* <StyledBulkItem>
23
22
  <SearchType />
24
- </StyledBulkItem>
25
- <IconConatiner>
23
+ </StyledBulkItem> */}
24
+ {/* <IconConatiner>
26
25
  <Mid>
27
26
  <IconText>Export</IconText>
28
27
  <DownloadIcon />
29
28
  </Mid>
30
- </IconConatiner>
29
+ </IconConatiner> */}
31
30
  </Container>
32
31
  );
33
32
  };
@@ -37,14 +36,14 @@ const Container = styled.div`
37
36
  gap: 16px;
38
37
  align-items: center;
39
38
  `;
40
- const Mid = styled.div`
41
- display: flex;
42
- padding: 4px 10px;
43
- align-items: center;
44
- gap: 8px;
45
- align-self: stretch;
46
- border-radius: 15px 0px 0px 15px;
47
- `;
39
+ // const Mid = styled.div`
40
+ // display: flex;
41
+ // padding: 4px 10px;
42
+ // align-items: center;
43
+ // gap: 8px;
44
+ // align-self: stretch;
45
+ // border-radius: 15px 0px 0px 15px;
46
+ // `;
48
47
 
49
48
  const ButtonText = styled.button`
50
49
  color: white;
@@ -71,33 +70,33 @@ const ButtonText = styled.button`
71
70
  }
72
71
  `;
73
72
 
74
- const IconConatiner = styled.div`
75
- /* display: flex;
76
- height: 34px;
77
- padding: 4px 10px;
78
- align-items: flex-start;
79
- border-radius: 8px 8px 8px 8px; */
80
- box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
81
- background: #f0f2f2;
82
- border: 1px solid #e2e0db;
83
- display: flex;
84
- padding: 7px 12px;
85
- justify-content: center;
86
- align-items: center;
87
- gap: 2px;
88
- border-radius: 15px;
89
- height: 34px;
90
- `;
73
+ // const IconConatiner = styled.div`
74
+ // /* display: flex;
75
+ // height: 34px;
76
+ // padding: 4px 10px;
77
+ // align-items: flex-start;
78
+ // border-radius: 8px 8px 8px 8px; */
79
+ // box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
80
+ // background: #f0f2f2;
81
+ // border: 1px solid #e2e0db;
82
+ // display: flex;
83
+ // padding: 7px 12px;
84
+ // justify-content: center;
85
+ // align-items: center;
86
+ // gap: 2px;
87
+ // border-radius: 15px;
88
+ // height: 34px;
89
+ // `;
91
90
 
92
- const IconText = styled.div`
93
- color: #3a3630;
94
- text-align: center;
91
+ // const IconText = styled.div`
92
+ // color: #3a3630;
93
+ // text-align: center;
95
94
 
96
- /* body/captions */
97
- font-family: 'Lato';
98
- font-size: 13px;
99
- font-style: normal;
100
- font-weight: 400;
101
- line-height: 16px;
102
- `;
95
+ // /* body/captions */
96
+ // font-family: 'Lato';
97
+ // font-size: 13px;
98
+ // font-style: normal;
99
+ // font-weight: 400;
100
+ // line-height: 16px;
101
+ // `;
103
102
  export default RightFilters;
@@ -517,6 +517,7 @@ export const StyledTableWrapper = styled.div`
517
517
  overflow-x: auto;
518
518
  max-height: 60vh;
519
519
  scrollbar-width: none;
520
+ min-height: 60vh;
520
521
  /* height: 600px; */
521
522
  /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */
522
523
  &::-webkit-scrollbar {
@@ -46,7 +46,7 @@ export function useSelectedAction() {
46
46
  return useAtom(selectedAction);
47
47
  }
48
48
 
49
- const selectedLocation = atom<string | null>(null);
49
+ const selectedLocation = atom<any[] | null>(null);
50
50
  export function useSelectedLocation() {
51
51
  return useAtom(selectedLocation);
52
52
  }
@@ -136,13 +136,13 @@ function OrderView() {
136
136
  }, [apiCalling]);
137
137
 
138
138
  useEffect(() => {
139
- if (paths.length > 1) {
140
- setOrderId(paths[2]);
141
- }
142
- // for local
143
- // if (paths.length >= 0) {
144
- // setOrderId(paths[1]);
139
+ // if (paths.length > 1) {
140
+ // setOrderId(paths[2]);
145
141
  // }
142
+ // for local
143
+ if (paths.length >= 0) {
144
+ setOrderId(paths[1]);
145
+ }
146
146
  }, [paths]);
147
147
 
148
148
  useEffect(() => {