@bjsdistribution/dms-client-return 0.0.33 → 0.0.34

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 (34) hide show
  1. package/dist/components/order-daily-overview/store/store.d.ts +3 -0
  2. package/dist/components/order-view/notes/order-dropdown/NewReturnDropdown.d.ts +3 -0
  3. package/dist/components/store.d.ts +12 -2
  4. package/dist/components/types.d.ts +4 -0
  5. package/dist/dms-client-return.cjs.development.js +619 -345
  6. package/dist/dms-client-return.cjs.development.js.map +1 -1
  7. package/dist/dms-client-return.cjs.production.min.js +1 -1
  8. package/dist/dms-client-return.cjs.production.min.js.map +1 -1
  9. package/dist/dms-client-return.esm.js +623 -349
  10. package/dist/dms-client-return.esm.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +118 -139
  13. package/src/components/order-daily-overview/header-filters/filterStore.ts +4 -4
  14. package/src/components/order-daily-overview/index.tsx +29 -25
  15. package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +14 -10
  16. package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +88 -32
  17. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +18 -2
  18. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +18 -7
  19. package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnFilter.tsx +2 -3
  20. package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +6 -4
  21. package/src/components/order-daily-overview/store/store.ts +15 -0
  22. package/src/components/order-daily-overview/table/ReturnTable.tsx +16 -11
  23. package/src/components/order-daily-overview/table/table-data/styles.ts +1 -1
  24. package/src/components/order-view/details-filters/left-side-filters/dropdowns/OptionsDropDown.tsx +3 -3
  25. package/src/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.tsx +1 -1
  26. package/src/components/order-view/general-information/dropdowns/Print.tsx +1 -1
  27. package/src/components/order-view/modalsPopup/ModalManager.tsx +3 -9
  28. package/src/components/order-view/notes/order-dropdown/NewReturnDropdown.tsx +88 -13
  29. package/src/components/order-view/products-info/expanded-content/index.tsx +91 -16
  30. package/src/components/order-view/products-info/index.tsx +1 -1
  31. package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +47 -42
  32. package/src/components/store.ts +51 -1
  33. package/src/components/types.ts +5 -0
  34. package/src/index.tsx +25 -16
@@ -1,6 +1,5 @@
1
- import { AntSelect } from '@bjsdistribution/dms-component-library';
2
- import { Empty } from 'antd';
3
- import React, { useEffect, useRef } from 'react';
1
+ import { Empty, notification, Select } from 'antd';
2
+ import React, { useEffect, useRef, useState } from 'react';
4
3
  import { Skeleton } from 'antd';
5
4
  // import { useSelectedOrders } from '../../../store';
6
5
  import { useOrderId, useReturnAfterOrderData } from '../../../order-view/store';
@@ -17,18 +16,28 @@ import { usePrintOptionTOggle } from '../../store/store';
17
16
  import { NavLink } from 'react-router-dom';
18
17
  import { displayValueOrNA, formatDate } from '../../shared/utlis';
19
18
  import PrintDropDown from '../../shared/elements/PrintDropDown';
19
+ import {
20
+ useAssignData,
21
+ useAssignPayload,
22
+ useCallApiAgain,
23
+ } from '../../../store';
24
+ import styled from 'styled-components';
25
+ import { useApiHook } from '@bjsdistribution/dms-component-library';
26
+ import { ApiResponse } from '../../common/interface';
27
+ import Loader from '../../header/loader/Loader';
20
28
 
21
29
  const OrderTable = ({ loadingskeleton }: any) => {
22
30
  // const [, setSelectedReturnOrder] = useSelectedOrders();
23
31
  // const [selectAll, setSelectAll] = useState(false);
24
- // const defaultSelectStyle = { width: '100%' };
25
- const defaultPopupClassName = 'dropDownStyle';
26
- const defaultSelectWrapperClass = 'rounded';
27
32
  const dropdownRefParent = useRef<HTMLDivElement>(null);
28
33
  const dropdownRef = useRef<HTMLDivElement>(null);
29
34
  const [printToogle, setPrintToggle] = usePrintOptionTOggle();
30
-
35
+ const [assignData] = useAssignData();
36
+ const [, setOrderId] = useOrderId();
31
37
  const [returnAfterOrder] = useReturnAfterOrderData();
38
+ const [assignPayload, setAssignPayload] = useAssignPayload();
39
+ const [, setAssign] = useState<boolean>(false);
40
+ const [, setCallAPi] = useCallApiAgain();
32
41
 
33
42
  const OpenDropDown = (index: number) => {
34
43
  setPrintToggle(prevIndex => (prevIndex === index ? null : index));
@@ -77,18 +86,6 @@ const OrderTable = ({ loadingskeleton }: any) => {
77
86
  // }
78
87
  // });
79
88
  // };
80
- // console.log('', returnAfterOrder);
81
-
82
- const assigneOptions = [
83
- {
84
- label: 'BJS Distribution',
85
- value: 'bjs-dist',
86
- },
87
- {
88
- label: 'Haulage',
89
- value: 'haulage',
90
- },
91
- ];
92
89
 
93
90
  const getStatusClass = (status: string) => {
94
91
  switch (status) {
@@ -111,10 +108,60 @@ const OrderTable = ({ loadingskeleton }: any) => {
111
108
  }
112
109
  };
113
110
 
114
- const [, setOrderId] = useOrderId();
115
- // console.log(id, 'idid');
111
+ // API for Assign
112
+ const {
113
+ data: actionResponse,
114
+ setShouldPerformAction: setAssignAction,
115
+ loading: AssignLoading,
116
+ error: apiError,
117
+ } = useApiHook<{
118
+ data: ApiResponse[];
119
+ }>({
120
+ endpoint: `return_orders/update/assign/`,
121
+ method: 'PUT',
122
+ body: [assignPayload],
123
+ performAction: false,
124
+ });
125
+
126
+ //client options
127
+ const assignOptions = assignData?.map((option: any) => ({
128
+ label: option?.type?.charAt(0)?.toUpperCase() + option?.type?.slice(1),
129
+ value: option?.bjs_delivery,
130
+ }));
131
+
132
+ const handleAssignPayload = (Id: number, value: boolean) => {
133
+ setCallAPi(false);
134
+ setAssign(value);
135
+ setAssignPayload({
136
+ ...assignPayload,
137
+ return_order_id: Id,
138
+ bjs_delivery: value,
139
+ });
140
+ setAssignAction(true);
141
+ };
142
+
143
+ useEffect(() => {
144
+ //@ts-ignore
145
+ if (actionResponse?.code === 200) {
146
+ setCallAPi(true);
147
+ notification.success({
148
+ message: 'Success',
149
+ // @ts-ignore
150
+ description: `${actionResponse?.message}`,
151
+ });
152
+ // @ts-ignore
153
+ } else if (apiError?.detail) {
154
+ notification.error({
155
+ message: 'Failure',
156
+ // @ts-ignore
157
+ description: `${apiError?.detail[0]?.msg}`,
158
+ });
159
+ }
160
+ }, [actionResponse, apiError]);
161
+
116
162
  return (
117
163
  <>
164
+ {AssignLoading && <Loader />}
118
165
  <StyledTableWrapper className="fortables">
119
166
  <StyledTable>
120
167
  <thead>
@@ -122,7 +169,7 @@ const OrderTable = ({ loadingskeleton }: any) => {
122
169
  {/* <th className="emailInvoiceCheckbox">
123
170
  <Checkbox checked={false} />
124
171
  </th> */}
125
- <th className="emailInvoiceNo">Created</th>
172
+ <th>Created</th>
126
173
  <th>Return Location</th>
127
174
  <th>Pick Up Location</th>
128
175
  <th>Recipient</th>
@@ -215,17 +262,15 @@ const OrderTable = ({ loadingskeleton }: any) => {
215
262
  {item?.weight && item?.weight !== null ? 'KG' : ''}
216
263
  </td>
217
264
  <td>{displayValueOrNA(item?.cube)}</td>
218
- <td>
219
- <AntSelect
220
- options={assigneOptions}
265
+ <td key={item.id}>
266
+ <StyledAntSelect
267
+ options={assignOptions}
221
268
  placeholder="Select"
222
- onChange={() => {}}
223
- // defaultValue={item?.assign || ''}
224
- // style={defaultSelectStyle}
225
- disabled // onSearch={handleSearch}
226
- showSearch
227
- popupClassName={defaultPopupClassName}
228
- selectWrapperClass={defaultSelectWrapperClass}
269
+ onChange={(value: any) =>
270
+ handleAssignPayload(item?.id, value)
271
+ }
272
+ style={{ width: '150px' }}
273
+ value={item?.bjs_delivery}
229
274
  />
230
275
  </td>
231
276
  <td>
@@ -287,4 +332,15 @@ const OrderTable = ({ loadingskeleton }: any) => {
287
332
  );
288
333
  };
289
334
 
335
+ const StyledAntSelect = styled(Select)`
336
+ .ant-select-selector {
337
+ /* width: 22vw; */
338
+ border-radius: 22px;
339
+ }
340
+ .ant-select-clear {
341
+ top: 40% !important;
342
+ font-size: 18px !important;
343
+ }
344
+ `;
345
+
290
346
  export default OrderTable;
@@ -1,5 +1,4 @@
1
1
  import { atom, useAtom } from 'jotai';
2
- // import { formatDate } from '../shared/utlis';
3
2
  import { format } from 'date-fns';
4
3
 
5
4
  const date = atom(new Date());
@@ -29,7 +28,6 @@ const initialState: FilterState = {
29
28
  };
30
29
 
31
30
  const filterReducer = (state: FilterState, action: any): FilterState => {
32
- console.log(action,'action')
33
31
  switch (action.type) {
34
32
  case 'SET_DATE_FILTER':
35
33
  return {
@@ -81,6 +79,24 @@ const filterReducer = (state: FilterState, action: any): FilterState => {
81
79
  ],
82
80
  };
83
81
 
82
+ // case 'CLEAR_CLIENT':
83
+ // return {
84
+ // ...state,
85
+ // 'x-filters': state['x-filters'].filter(f => f.field !== 'customer_id'),
86
+ // };
87
+
88
+ // case 'CLEAR_STATUS_ORDER':
89
+ // return {
90
+ // ...state,
91
+ // 'x-filters': state['x-filters'].filter(f => f.field !== 'status_id'),
92
+ // };
93
+
94
+ case 'CLEAR_DATE':
95
+ return {
96
+ ...state,
97
+ 'x-filters': state['x-filters'].filter(f => f.field !== 'created_at'),
98
+ };
99
+
84
100
  case 'SET_PAGE':
85
101
  return {
86
102
  ...state,
@@ -30,7 +30,7 @@ const ReturnOrderFilter = () => {
30
30
  const [statusOfOrder] = useStatusOrderData();
31
31
  const [selectedClient, setSelectedClient] = useState<any | null>();
32
32
  const [statusOrder, setStatusOfOrder] = useState<any | null>();
33
- console.log(selectedClient, 'fffffselectedClient');
33
+
34
34
  const zoneOptions = [
35
35
  { label: 'Zone 1', value: 'zone1' },
36
36
  { label: 'Zone 2', value: 'zone2' },
@@ -41,11 +41,9 @@ const ReturnOrderFilter = () => {
41
41
  // date change here
42
42
  const handleDateChange = (date: any | null) => {
43
43
  setSelectedDate(date ? date?.$d : null);
44
- console.log(selectedDate, 'selected');
45
44
  };
46
45
  useEffect(() => {
47
46
  if (selectedDate) {
48
- console.log(selectedDate, 'selected');
49
47
  dispatch({
50
48
  type: 'SET_DATE_FILTER',
51
49
  payload: selectedDate,
@@ -62,9 +60,8 @@ const ReturnOrderFilter = () => {
62
60
  label:
63
61
  option?.customer_name?.charAt(0)?.toUpperCase() +
64
62
  option?.customer_name?.slice(1),
65
- value: option?.id,
63
+ value: option?.customer_id,
66
64
  }));
67
- console.log(clientOptions, 'clientOptions');
68
65
  //status of order
69
66
  const orderOptions = statusOfOrder?.map((option: any) => ({
70
67
  label:
@@ -74,7 +71,6 @@ const ReturnOrderFilter = () => {
74
71
  }));
75
72
  const handleClientChange = (value: any) => {
76
73
  if (value === selectedClient) return;
77
- console.log(value, 'value');
78
74
  setSelectedClient(value);
79
75
  dispatch({
80
76
  type: 'SET_CLIENT_FILTER',
@@ -88,7 +84,6 @@ const ReturnOrderFilter = () => {
88
84
  };
89
85
  const handleStatusOfOrder = (value: any) => {
90
86
  if (value === statusOfOrder) return;
91
- console.log(value, 'value');
92
87
  setStatusOfOrder(value);
93
88
  dispatch({
94
89
  type: 'SET_STATUS_ORDER_FILTER',
@@ -106,6 +101,14 @@ const ReturnOrderFilter = () => {
106
101
  setStatusOfOrder(null);
107
102
  dispatch({ type: 'CLEAR_ALL_FILTER' });
108
103
  };
104
+
105
+ //clearing filters
106
+ useEffect(() => {
107
+ if (selectedDate === null) {
108
+ dispatch({ type: 'CLEAR_DATE' });
109
+ }
110
+ }, [selectedDate]);
111
+
109
112
  return (
110
113
  <>
111
114
  <StyledFiter>
@@ -130,6 +133,7 @@ const ReturnOrderFilter = () => {
130
133
  format="DD/MM/YY"
131
134
  placeholder="Date"
132
135
  needConfirm
136
+ allowClear
133
137
  />
134
138
  </StyledDatePicker>
135
139
  </div>
@@ -145,6 +149,8 @@ const ReturnOrderFilter = () => {
145
149
  onChange={handleStatusOfOrder}
146
150
  style={{ minWidth: '130px' }}
147
151
  value={statusOrder}
152
+ // allowClear
153
+ // onClear={handleClearStatus}
148
154
  />
149
155
  </StyledAntSelect>
150
156
  </div>
@@ -160,6 +166,7 @@ const ReturnOrderFilter = () => {
160
166
  onChange={handleClientChange}
161
167
  value={selectedClient}
162
168
  style={{ width: '125px', border: 'none' }}
169
+ // allowClear
163
170
  />
164
171
  </StyledAntSelect>
165
172
  </div>
@@ -237,5 +244,9 @@ export const StyledAntSelect = styled.div`
237
244
  box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
238
245
  top: 16px;
239
246
  }
247
+ .ant-select-clear {
248
+ top: 40% !important;
249
+ font-size: 18px !important;
250
+ }
240
251
  `;
241
252
  export default ReturnOrderFilter;
@@ -6,15 +6,14 @@ import {
6
6
  Text,
7
7
  } from '../../filters/FilterStyle';
8
8
  import RightFilters from './RightFilters';
9
- import { useParams } from 'react-router-dom';
10
9
 
11
10
  const ReturnFilter = () => {
12
- const { clientName } = useParams();
11
+ const storedName = localStorage.getItem('clientName');
13
12
 
14
13
  return (
15
14
  <>
16
15
  <StyledFiter>
17
- <Text> {clientName}</Text>
16
+ <Text>{storedName}</Text>
18
17
  <StyledFIlterELements>
19
18
  <StyledTableFilter />
20
19
  </StyledFIlterELements>
@@ -194,7 +194,9 @@ const ReturnOrderTable = () => {
194
194
  account_number: createReturn?.account_number,
195
195
  customer_id: +createReturn?.customer_id,
196
196
  products: [legacy_product_id],
197
- return_action: [order_product_return_action?.type] || null,
197
+ return_action: order_product_return_action?.type
198
+ ? [order_product_return_action.type]
199
+ : null,
198
200
  return_location_token: return_location || null,
199
201
  };
200
202
 
@@ -279,7 +281,7 @@ const ReturnOrderTable = () => {
279
281
  <th>Product Location</th>
280
282
  <th>Return Location</th>
281
283
  <th>Recipient</th>
282
- {/* <th>Return Action Type</th> */}
284
+ <th>Return Action</th>
283
285
  <th>Code</th>
284
286
  <th>Description</th>
285
287
  <th>Part</th>
@@ -366,9 +368,9 @@ const ReturnOrderTable = () => {
366
368
  </li>
367
369
  </ul>
368
370
  </td>
369
- {/* <td>
371
+ <td>
370
372
  {displayValueOrNA(item?.order_product_return_action?.type)}
371
- </td> */}
373
+ </td>
372
374
  <td>{displayValueOrNA(item?.code)}</td>
373
375
  <td>{displayValueOrNA(item?.description)}</td>
374
376
  <td>{displayValueOrNA(item?.parts_count)}</td>
@@ -56,6 +56,11 @@ export function useSelectedClient() {
56
56
  return useAtom(selectedClient);
57
57
  }
58
58
 
59
+ const clientTableId = atom<number | null>(null);
60
+ export function useIdForTableName() {
61
+ return useAtom(clientTableId);
62
+ }
63
+
59
64
  const clientTableName = atom<string | null>(null);
60
65
  export function useTableName() {
61
66
  return useAtom(clientTableName);
@@ -92,6 +97,16 @@ export const useItemsPerReturnPage = () => {
92
97
  return useAtom(atomItemsPerReturnPage);
93
98
  };
94
99
 
100
+ //stats data overview
101
+ export const UsePaginationOverviewData = () => {
102
+ return useAtom(atomPaginationData);
103
+ };
104
+
105
+ const atomItemsPerOverviewPage = atom<number>(50);
106
+ export const useItemsPerOverviewPage = () => {
107
+ return useAtom(atomItemsPerOverviewPage);
108
+ };
109
+
95
110
  const countStatus = atom<any>([]);
96
111
  export const useCountData = () => {
97
112
  return useAtom(countStatus);
@@ -26,10 +26,10 @@ interface ApiResponse {
26
26
  data: [];
27
27
  }
28
28
 
29
- const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
29
+ const ReturnTable: React.FC = () => {
30
30
  const [clientData] = useClientData();
31
31
  const [updatedData, setUpdatedData] = useState<any>([]);
32
- const [, setLoading] = useLoading();
32
+ const [statsLoading, setLoading] = useLoading();
33
33
  const [, setOrderStaticData] = useOrderStaticData();
34
34
  const [, dispatch] = useAtom(filtersReducerAtom);
35
35
  const navigate = useNavigate();
@@ -54,11 +54,13 @@ const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
54
54
  useEffect(() => {
55
55
  const updatedClientData = clientData?.map(client => {
56
56
  const matchingCustomer = customers?.find(
57
- (customer: any) => customer?.id === client?.customer_id
57
+ (customer: any) => customer?.customer_id === client?.customer_id
58
58
  );
59
59
  return {
60
60
  ...client,
61
- uuid: matchingCustomer ? matchingCustomer?.uuid : null,
61
+ account_number: matchingCustomer
62
+ ? matchingCustomer?.account_number
63
+ : null,
62
64
  };
63
65
  });
64
66
  setUpdatedData(updatedClientData);
@@ -68,11 +70,11 @@ const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
68
70
  const handleRedirect = (
69
71
  customerName: string,
70
72
  customerId: number,
71
- customerUuid: string
73
+ account_number: string
72
74
  ) => {
73
75
  localStorage.setItem('clientName', customerName);
74
76
  localStorage.setItem('clientId', customerId?.toString());
75
- localStorage.setItem('uuid', customerUuid);
77
+ localStorage.setItem('account_number', account_number);
76
78
 
77
79
  if (customerId) {
78
80
  dispatch({
@@ -89,8 +91,10 @@ const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
89
91
  payload: [],
90
92
  });
91
93
  }
92
- const selectedClientString = customerName?.replace(/\s+/g, '-');
93
- navigate(`filter/${selectedClientString}`);
94
+ navigate(`filter/${customerId}`);
95
+
96
+ //forlocal
97
+ // navigate(`/filter/${customerId}`);
94
98
  };
95
99
 
96
100
  return (
@@ -113,7 +117,7 @@ const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
113
117
  </tr>
114
118
  </thead>
115
119
  <tbody>
116
- {loadingskeleton ? (
120
+ {statsLoading ? (
117
121
  <tr>
118
122
  <td colSpan={11}>
119
123
  <Skeleton active />
@@ -138,7 +142,7 @@ const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
138
142
  handleRedirect(
139
143
  key?.customer_name,
140
144
  key?.customer_id,
141
- key?.uuid
145
+ key?.account_number
142
146
  )
143
147
  }
144
148
  style={{
@@ -153,7 +157,7 @@ const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
153
157
  <td>
154
158
  <ColumStyle>
155
159
  <GreyBox>
156
- {key?.return_orders}
160
+ {key?.orders}
157
161
  {/* </div> */}
158
162
  </GreyBox>
159
163
  </ColumStyle>
@@ -169,6 +173,7 @@ const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
169
173
  <GreyBox>{key?.RTS}</GreyBox>
170
174
  </ColumStyle>
171
175
  </td>
176
+
172
177
  <td>
173
178
  <ColumStyle>
174
179
  <GreyBox>{key?.PENDING}</GreyBox>
@@ -604,7 +604,7 @@ export const StyledFilterBtnIcon = styled.div`
604
604
  align-items: center;
605
605
  border-radius: 20px;
606
606
  border: 1px solid #e2e0db;
607
- background: #f1f5f6;
607
+ background: #b2b3b3;
608
608
  .cross {
609
609
  position: relative;
610
610
  &:after {
@@ -21,9 +21,10 @@ const Options = [
21
21
  const OptionsDropDown: React.FC = () => {
22
22
  const [isOpen, setIsOpen] = useState(false);
23
23
  const dropdownRef = useRef<HTMLDivElement>(null);
24
- const [action, setCurrentAction] = useCurrentAction();
24
+ const [, setCurrentAction] = useCurrentAction();
25
25
  const [hold] = useIsOnHoldOrder();
26
- console.log(action, 'action');
26
+
27
+ // console.log(action, 'action');
27
28
  const handleClick = () => {
28
29
  setIsOpen(prev => !prev);
29
30
  };
@@ -36,7 +37,6 @@ const OptionsDropDown: React.FC = () => {
36
37
  }
37
38
  });
38
39
  const handleSelect = (selectedOption: any) => {
39
- console.log(selectedOption);
40
40
  setCurrentAction(selectedOption);
41
41
  setIsOpen(false);
42
42
  };
@@ -14,7 +14,7 @@ const PrintDropDownReturn = ({
14
14
  console.log(legacyProductId, 'legacyProductId');
15
15
 
16
16
  const downloadFiles = () => {
17
- const url = `https://toolbox.bjshomedelivery.com/offload/return_label?gsit_products_id=${legacyProductId}`;
17
+ const url = `https://us.toolbox.bjshomedelivery.com/offload/return_label?gsit_products_id=${legacyProductId}`;
18
18
  window.open(url, '_blank'); // Opens the URL in a new tab
19
19
  };
20
20
 
@@ -10,7 +10,7 @@ function Print() {
10
10
  const [orderDetails] = useOrderDetails();
11
11
  const gsitId = orderDetails?.gsit_order_id;
12
12
  const dropdownRef = useRef<HTMLDivElement>(null);
13
- console.log(gsitId, 'gsitId');
13
+ // console.log(gsitId, 'gsitId');
14
14
  const [isOpen, setIsOpen] = useState(false);
15
15
 
16
16
  const handleClick = () => {
@@ -3,7 +3,6 @@ import { AntModal, useApiHook } from '@bjsdistribution/dms-component-library';
3
3
  import { useAtom } from 'jotai';
4
4
  import {
5
5
  countReducerAtom,
6
- useCreateOrderProducts,
7
6
  useDeleteProdsID,
8
7
  usefetchAgain,
9
8
  useProductDetails,
@@ -27,7 +26,6 @@ import { useNavigate } from 'react-router-dom';
27
26
  const ModalManager = () => {
28
27
  const [popupName, dispatch] = useAtom(countReducerAtom);
29
28
  const [,] = useProductDetails();
30
- const [orderProduct] = useCreateOrderProducts();
31
29
  const [selectedRows] = useDeleteProdsID();
32
30
  const [, setIsFormValid] = useState(false);
33
31
  const [newGrouped] = useFinalPayload();
@@ -40,14 +38,11 @@ const ModalManager = () => {
40
38
  const [, setCallForFetch] = usefetchAgain();
41
39
  const navigate = useNavigate();
42
40
 
43
- console.log(orderProduct, 'abcabcabcabcabcabcabcabcabcabcabc');
44
-
45
41
  const closeModal = () => {
46
42
  dispatch({ type: 'close' });
47
43
  };
48
44
 
49
45
  const validateForm = () => {
50
- console.log(selectedRows, 'selectedRowsselectedRowsselectedRows');
51
46
  return selectedRows?.length > 0;
52
47
  };
53
48
 
@@ -70,10 +65,9 @@ const ModalManager = () => {
70
65
  body: newGrouped,
71
66
  performAction: false,
72
67
  });
73
- console.log(response, 'data'),
74
- useEffect(() => {
75
- SetPostLoading(confirmLoading);
76
- }, [confirmLoading]);
68
+ useEffect(() => {
69
+ SetPostLoading(confirmLoading);
70
+ }, [confirmLoading]);
77
71
 
78
72
  const handleConfirmReturn = () => {
79
73
  if (newGrouped?.length > 0) {