@bjsdistribution/dms-client-return 0.0.11 → 0.0.13

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 (61) hide show
  1. package/dist/components/order-daily-overview/common/css/TableStyle.d.ts +13 -30
  2. package/dist/components/order-daily-overview/common/fakedata.d.ts +4 -0
  3. package/dist/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.d.ts +1 -1
  4. package/dist/components/order-view/details-filters/left-side-filters/dropdowns/{PrintDropDown.d.ts → PrintDropDownReturn.d.ts} +2 -2
  5. package/dist/components/order-view/store.d.ts +77 -28
  6. package/dist/components/order-view/types.d.ts +61 -11
  7. package/dist/components/order-view/utils.d.ts +4 -0
  8. package/dist/components/store.d.ts +6 -1
  9. package/dist/dms-client-return.cjs.development.js +1777 -1078
  10. package/dist/dms-client-return.cjs.development.js.map +1 -1
  11. package/dist/dms-client-return.cjs.production.min.js +1 -1
  12. package/dist/dms-client-return.cjs.production.min.js.map +1 -1
  13. package/dist/dms-client-return.esm.js +1780 -1081
  14. package/dist/dms-client-return.esm.js.map +1 -1
  15. package/package.json +1 -1
  16. package/src/common/expand-collapse/index.tsx +4 -4
  17. package/src/components/order-daily-overview/common/css/TableStyle.tsx +42 -342
  18. package/src/components/order-daily-overview/common/fakedata.tsx +4 -0
  19. package/src/components/order-daily-overview/header-filters/HeaderFilter.tsx +10 -1
  20. package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +15 -7
  21. package/src/components/order-daily-overview/index.tsx +3 -3
  22. package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +2 -2
  23. package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +4 -8
  24. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +12 -14
  25. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +32 -33
  26. package/src/components/order-daily-overview/return-order-table/ReturnTable.tsx +2 -2
  27. package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +74 -30
  28. package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +5 -2
  29. package/src/components/order-daily-overview/table/table-data/styles.ts +1 -1
  30. package/src/components/order-daily-overview/table-view/Pagination.tsx +15 -14
  31. package/src/components/order-view/DynamicTable.tsx +12 -3
  32. package/src/components/order-view/details-filters/left-side-filters/dropdowns/{PrintDropDown.tsx → PrintDropDownReturn.tsx} +4 -4
  33. package/src/components/order-view/flags-action-modal/Actions.tsx +1 -2
  34. package/src/components/order-view/general-information/Status.tsx +13 -17
  35. package/src/components/order-view/generic-table/AuditLogs.tsx +81 -19
  36. package/src/components/order-view/index.tsx +192 -192
  37. package/src/components/order-view/modalsPopup/CreateReturnModal.tsx +74 -36
  38. package/src/components/order-view/modalsPopup/ModalManager.tsx +49 -14
  39. package/src/components/order-view/modalsPopup/ProductAction.tsx +1 -1
  40. package/src/components/order-view/notes/AddNote.tsx +2 -3
  41. package/src/components/order-view/notes/index.tsx +9 -22
  42. package/src/components/order-view/order-details/expanded-content/footer/index.tsx +90 -73
  43. package/src/components/order-view/order-details/expanded-content/instruction-section/DeliveryInstructions.tsx +2 -9
  44. package/src/components/order-view/order-details/expanded-content/orders-section/Droptime.tsx +2 -10
  45. package/src/components/order-view/order-details/expanded-content/orders-section/VehicleType.tsx +16 -15
  46. package/src/components/order-view/order-details/expanded-content/services-section/AssemblyType.tsx +88 -15
  47. package/src/components/order-view/order-details/expanded-content/services-section/DeliveryPoint.tsx +1 -13
  48. package/src/components/order-view/order-details/expanded-content/services-section/OrderServices.tsx +141 -16
  49. package/src/components/order-view/order-details/expanded-content/services-section/ServiceType.tsx +1 -13
  50. package/src/components/order-view/order-details/expanded-content/services-section/TimedService.tsx +19 -18
  51. package/src/components/order-view/products-info/expanded-content/products/index.tsx +2 -2
  52. package/src/components/order-view/return-client-products/ProductTable.tsx +1 -1
  53. package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +79 -70
  54. package/src/components/order-view/return-client-products/product-table-footer/ProductDetailsFooter.tsx +5 -5
  55. package/src/components/order-view/store.ts +215 -53
  56. package/src/components/order-view/system-event-logs/expanded-content/index.tsx +6 -10
  57. package/src/components/order-view/toolbox-resources/expanded-content/index.tsx +68 -6
  58. package/src/components/order-view/types.ts +89 -33
  59. package/src/components/order-view/utils.ts +20 -17
  60. package/src/components/store.ts +35 -0
  61. package/src/index.tsx +13 -9
@@ -1,8 +1,4 @@
1
- import {
2
- AntSelect,
3
- Checkbox,
4
- displayValueOrNA,
5
- } from '@bjsdistribution/dms-component-library';
1
+ import { AntSelect, Checkbox } from '@bjsdistribution/dms-component-library';
6
2
  import { Empty } from 'antd';
7
3
  import React, { useEffect, useRef, useState } from 'react';
8
4
  import { Skeleton } from 'antd';
@@ -18,9 +14,9 @@ import {
18
14
  } from '../../return-order-table/return-orders-filters/returnstyles';
19
15
  import LoadIcon from '../../../../assets/icons/LoadIcon';
20
16
  import { usePrintOptionTOggle } from '../../store/store';
21
- import PrintDropDown from '../../../order-view/details-filters/left-side-filters/dropdowns/PrintDropDown';
17
+ import PrintDropDown from '../../../order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn';
22
18
  import { NavLink } from 'react-router-dom';
23
- import { formatDate } from '../../shared/utlis';
19
+ import { displayValueOrNA, formatDate } from '../../shared/utlis';
24
20
 
25
21
  const OrderTable = ({ loadingskeleton }: any) => {
26
22
  const [selectedOrders, setSelectedReturnOrder] = useSelectedOrders();
@@ -207,7 +203,7 @@ const OrderTable = ({ loadingskeleton }: any) => {
207
203
  <td>{displayValueOrNA(item?.order_number)}</td>
208
204
 
209
205
  <td>{displayValueOrNA(item?.box_count)}</td>
210
- <td>{displayValueOrNA(item?.weight)}KG</td>
206
+ <td>{displayValueOrNA(item?.weight)} KG</td>
211
207
  <td>{displayValueOrNA(item?.cube)}</td>
212
208
  <td>
213
209
  <AntSelect
@@ -67,20 +67,18 @@ const filterReducer = (state: FilterState, action: any): FilterState => {
67
67
  ],
68
68
  };
69
69
 
70
- // case 'SET_ACTIONS_FILTER':
71
- // return {
72
- // ...state,
73
- // 'x-filters': [
74
- // ...state['x-filters'].filter(
75
- // f => f.field !== 'product_return_action_id'
76
- // ),
77
- // {
78
- // field: 'product_return_action_id',
79
- // op: '=',
80
- // value: action.payload,
81
- // },
82
- // ],
83
- // };
70
+ case 'SET_STATUS_ORDER_FILTER':
71
+ return {
72
+ ...state,
73
+ 'x-filters': [
74
+ ...state['x-filters'].filter(f => f.field !== 'status_id'),
75
+ {
76
+ field: 'status_id',
77
+ op: '=',
78
+ value: action.payload,
79
+ },
80
+ ],
81
+ };
84
82
 
85
83
  // case 'SET_LOCATION_FILTER':
86
84
  // return {
@@ -10,17 +10,20 @@ import DateIcon from '../../../../assets/icons/DateIcon';
10
10
  // import StatusIcon from '../../../../assets/icons/StatusIcon';
11
11
  import ClientIcon from '../../../../assets/icons/ClientIcon';
12
12
  // import AssigneIcon from '../../../../assets/icons/AssigneIcon';
13
- import { DatePicker, Select, Tooltip } from 'antd';
13
+ import { DatePicker, Select } from 'antd';
14
14
  import { useAtom } from '../../../order-view/store';
15
15
  import styled from 'styled-components';
16
16
  import { filtersReducerAtom } from './ReturnFilterStore';
17
17
  import dayjs from 'dayjs';
18
- import { useCustomerData } from '../../../store';
18
+ import { useCustomerData, useStatusOrderData } from '../../../store';
19
+ import StatusIcon from '../../../../assets/icons/StatusIcon';
20
+ import AssigneIcon from '../../../../assets/icons/AssigneIcon';
19
21
 
20
22
  const ReturnOrderFilter = () => {
21
23
  const [, dispatch] = useAtom(filtersReducerAtom);
22
24
  const [customers] = useCustomerData();
23
25
  const [selectedDate, setSelectedDate] = useState();
26
+ const [statusOfOrder] = useStatusOrderData();
24
27
  // const zoneOptions = [
25
28
  // { label: 'Zone 1', value: 'zone1' },
26
29
  // { label: 'Zone 2', value: 'zone2' },
@@ -52,6 +55,14 @@ const ReturnOrderFilter = () => {
52
55
  value: option?.id,
53
56
  }));
54
57
 
58
+ //status of order
59
+ const orderOptions = statusOfOrder?.map((option: any) => ({
60
+ label:
61
+ option?.status_type?.charAt(0)?.toUpperCase() +
62
+ option?.status_type?.slice(1),
63
+ value: option?.id,
64
+ }));
65
+
55
66
  const handleClientChange = (value: any) => {
56
67
  console.log(value, 'value');
57
68
  dispatch({
@@ -60,6 +71,14 @@ const ReturnOrderFilter = () => {
60
71
  });
61
72
  };
62
73
 
74
+ const handleStatusOfOrder = (value: any) => {
75
+ console.log(value, 'value');
76
+ dispatch({
77
+ type: 'SET_STATUS_ORDER_FILTER',
78
+ payload: value,
79
+ });
80
+ };
81
+
63
82
  return (
64
83
  <>
65
84
  <StyledFiter>
@@ -88,31 +107,21 @@ const ReturnOrderFilter = () => {
88
107
  </StyledDatePicker>
89
108
  </div>
90
109
 
91
- {/* <div className="datefilter">
110
+ <div className="datefilter">
92
111
  <div className="dateiconcontainer">
93
112
  <StatusIcon />
94
113
  </div>
95
114
  <StyledAntSelect>
96
115
  <Select
97
- options={zoneOptions}
116
+ options={orderOptions}
98
117
  className="custom-select"
99
118
  placeholder="Status of Order"
100
- onChange={() => {}}
101
- style={{ minWidth: '115px' }}
102
- maxTagCount={0}
103
- maxTagPlaceholder={(omittedValues: any) => (
104
- <Tooltip
105
- overlayStyle={{ pointerEvents: 'none' }}
106
- title={omittedValues
107
- .map(({ label }: any) => label)
108
- .join(', ')}
109
- >
110
- <span>{`${omittedValues.length} selected`}</span>
111
- </Tooltip>
112
- )}
119
+ onChange={handleStatusOfOrder}
120
+ style={{ minWidth: '130px' }}
121
+ allowClear
113
122
  />
114
123
  </StyledAntSelect>
115
- </div> */}
124
+ </div>
116
125
  <div className="datefilter">
117
126
  <div className="dateiconcontainer">
118
127
  <ClientIcon />
@@ -124,25 +133,15 @@ const ReturnOrderFilter = () => {
124
133
  placeholder="Client"
125
134
  onChange={handleClientChange}
126
135
  style={{ width: '125px', border: 'none' }}
127
- maxTagCount={0}
128
- maxTagPlaceholder={(omittedValues: any) => (
129
- <Tooltip
130
- overlayStyle={{ pointerEvents: 'none' }}
131
- title={omittedValues
132
- .map(({ label }: any) => label)
133
- .join(', ')}
134
- >
135
- <span>{`${omittedValues.length} selected`}</span>
136
- </Tooltip>
137
- )}
136
+ allowClear
138
137
  />
139
138
  </StyledAntSelect>
140
139
  </div>
141
- {/* <div className="datefilter">
140
+ <div className="datefilter">
142
141
  <div className="dateiconcontainer">
143
142
  <AssigneIcon />
144
143
  </div>
145
- <StyledAntSelect>
144
+ {/* <StyledAntSelect>
146
145
  <Select
147
146
  options={zoneOptions}
148
147
  className="custom-select"
@@ -161,8 +160,8 @@ const ReturnOrderFilter = () => {
161
160
  </Tooltip>
162
161
  )}
163
162
  />
164
- </StyledAntSelect>
165
- </div> */}
163
+ </StyledAntSelect> */}
164
+ </div>
166
165
  </LeftSideConatiner>
167
166
  </StyledFIlterELements>
168
167
  <TableFilters />
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
- import RouterHeader from '../header/route-header/RouterHeader';
3
+ // import RouterHeader from '../header/route-header/RouterHeader';
4
4
  import HeaderFilter from '../header-filters/HeaderFilter';
5
5
 
6
6
  import ReturnFilter from './return-orders-filters/ReturnFilter';
@@ -11,7 +11,7 @@ const ReturnTable = () => {
11
11
  return (
12
12
  <div>
13
13
  <DashBoardWrapper>
14
- <RouterHeader />
14
+ {/* <RouterHeader /> */}
15
15
  <div className="Tableconatiner">
16
16
  <HeaderFilter />
17
17
  <Container>
@@ -1,12 +1,14 @@
1
1
  import { Checkbox, useApiHook } from '@bjsdistribution/dms-component-library';
2
2
  import { Empty } from 'antd';
3
3
  import { useAtom } from 'jotai';
4
- import React, { useEffect, useRef, useState } from 'react';
4
+ import React, { useEffect, useRef } from 'react';
5
5
  import { Skeleton } from 'antd';
6
6
  import {
7
7
  useGroupedPayload,
8
+ useLocationData,
8
9
  useNewReturnPayload,
9
10
  useReturnPayload,
11
+ useSelectAll,
10
12
  useSelectedOrders,
11
13
  } from '../../../store';
12
14
  import { useReturnData } from '../../../order-view/store';
@@ -17,22 +19,23 @@ import DownIcon from '../../../../assets/icons/DownIcon';
17
19
  import { useLoading, usePrintOptionTOggle } from '../../store/store';
18
20
  import { ApiResponse } from '../../../types';
19
21
  import { filtersReducerAtom } from '../../header-filters/filterStore';
20
- import PrintDropDown from '../../../order-view/details-filters/left-side-filters/dropdowns/PrintDropDown';
21
22
  import { displayValueOrNA } from '../../shared/utlis';
22
- const ReturnOrderTable = ({ loadingskeleton }: any) => {
23
+ import PrintDropDownReturn from '../../../order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn';
24
+ const ReturnOrderTable = () => {
23
25
  const [state] = useAtom(filtersReducerAtom);
24
26
 
25
27
  const [selectedReturnOrder, setSelectedReturnOrder] = useSelectedOrders();
26
- const [selectAll, setSelectAll] = useState(false);
28
+ const [selectAll, setSelectAll] = useSelectAll();
27
29
  const { 'x-filters': filters, 'x-pagination': pagination } = state;
28
30
  const [returnData, setReturnData] = useReturnData();
29
- const [, setLoading] = useLoading();
31
+ const [load, setLoading] = useLoading();
30
32
  const dropdownRefParent = useRef<HTMLDivElement>(null);
31
33
  const dropdownRef = useRef<HTMLDivElement>(null);
32
34
  const [printToogle, setPrintToggle] = usePrintOptionTOggle();
33
35
  const [createReturn, setReturnPayload] = useReturnPayload();
34
36
  const [newpayload, setNewPayload] = useNewReturnPayload();
35
37
  const [, setGrouped] = useGroupedPayload();
38
+ const [locationData] = useLocationData();
36
39
 
37
40
  const OpenDropDown = (index: number) => {
38
41
  setPrintToggle(prevIndex => (prevIndex === index ? null : index));
@@ -54,7 +57,7 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
54
57
  }
55
58
  };
56
59
 
57
- const { data: fetchedOrderData, loading: staticDataLoading } = useApiHook<
60
+ const { data: fetchedOrderData, loading: returnDataLoad } = useApiHook<
58
61
  ApiResponse
59
62
  >({
60
63
  endpoint: '/return_order_products/',
@@ -64,11 +67,31 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
64
67
  });
65
68
 
66
69
  useEffect(() => {
67
- setLoading(staticDataLoading);
70
+ setLoading(returnDataLoad);
68
71
  if (fetchedOrderData && fetchedOrderData?.data) {
69
72
  setReturnData(fetchedOrderData?.data);
70
73
  }
71
- }, [fetchedOrderData, staticDataLoading]);
74
+ }, [fetchedOrderData, returnDataLoad]);
75
+
76
+ useEffect(() => {
77
+ setLoading(returnDataLoad);
78
+
79
+ if (fetchedOrderData && fetchedOrderData?.data && locationData) {
80
+ const updatedReturnData = fetchedOrderData.data.map(returnItem => {
81
+ const matchingLocation = locationData.find(
82
+ (location: any) => location?.token === returnItem?.return_location
83
+ );
84
+ return {
85
+ ...returnItem,
86
+ new_location: matchingLocation
87
+ ? matchingLocation.location_name
88
+ : null,
89
+ };
90
+ });
91
+
92
+ setReturnData(updatedReturnData);
93
+ }
94
+ }, [fetchedOrderData, returnDataLoad, locationData]);
72
95
 
73
96
  const handleSelectAll = (e: any) => {
74
97
  setSelectAll(e.target.checked);
@@ -78,23 +101,27 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
78
101
  id: loc.id,
79
102
  return_locations: loc?.return_locations,
80
103
  return_location: loc?.return_location,
81
- products: loc.id,
104
+ products: loc?.legacy_product_id,
82
105
  order_product_return_action: loc?.order_product_return_action,
83
- return_location_token: loc?.return_locations?.token,
106
+ return_location_token: loc?.return_location,
107
+ new_location: loc?.new_location,
84
108
  }))
85
109
  );
86
110
  setNewPayload(
87
111
  returnData?.map((loc: any) => ({
88
112
  id: loc.id,
89
113
  account_number: createReturn?.account_number,
90
- customer_id: createReturn?.customer_id,
91
- products: loc.id,
92
- return_action: loc?.order_product_return_action?.type || null,
93
- return_location_token: loc?.return_locations?.token,
114
+ customer_id: +createReturn?.customer_id,
115
+ products: [loc?.legacy_product_id],
116
+ return_action: [loc?.order_product_return_action?.type] || null,
117
+ return_location_token: loc?.return_location || null,
118
+ new_location: loc?.new_location,
94
119
  }))
95
120
  );
96
121
  } else {
97
122
  setSelectedReturnOrder([]);
123
+ setNewPayload([]);
124
+ setGrouped([]);
98
125
  }
99
126
  };
100
127
 
@@ -102,13 +129,17 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
102
129
  id: any,
103
130
  return_location: any,
104
131
  return_locations: any,
105
- order_product_return_action: any
132
+ order_product_return_action: any,
133
+ new_location: any,
134
+ legacy_product_id: any
106
135
  ) => {
107
136
  setSelectedReturnOrder((prevSelectedLocations: any) => {
108
137
  const isSelected = prevSelectedLocations?.some(
109
138
  (loc: any) => loc.id === id
110
139
  );
111
140
 
141
+ console.log(new_location, 'new_location');
142
+
112
143
  if (isSelected) {
113
144
  const updatedSelectedLocations = prevSelectedLocations.filter(
114
145
  (loc: any) => loc.id !== id
@@ -116,9 +147,10 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
116
147
 
117
148
  setReturnPayload(prevState => ({
118
149
  ...prevState,
119
- products: id,
150
+ products: legacy_product_id,
120
151
  return_action: order_product_return_action?.type || null,
121
- return_location_token: return_locations?.token || null,
152
+ return_location_token: return_location || null,
153
+ new_location: new_location,
122
154
  }));
123
155
 
124
156
  setNewPayload((prevPayload: any) =>
@@ -130,19 +162,20 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
130
162
  const newReturnPayload = {
131
163
  id,
132
164
  account_number: createReturn?.account_number,
133
- customer_id: createReturn?.customer_id,
134
- products: id,
135
- return_action: order_product_return_action?.type || null,
136
- return_location_token: return_locations?.token || null,
165
+ customer_id: +createReturn?.customer_id,
166
+ products: [legacy_product_id],
167
+ return_action: [order_product_return_action?.type] || null,
168
+ return_location_token: return_location || null,
137
169
  };
138
170
 
139
171
  setNewPayload((prevPayload: any) => [...prevPayload, newReturnPayload]);
140
172
 
141
173
  setReturnPayload(prevState => ({
142
174
  ...prevState,
143
- products: id,
175
+ products: legacy_product_id,
144
176
  return_action: order_product_return_action?.type || null,
145
- return_location_token: return_locations?.token || null,
177
+ return_location_token: return_location || null,
178
+ new_location: new_location,
146
179
  }));
147
180
 
148
181
  return [
@@ -152,6 +185,7 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
152
185
  return_location,
153
186
  return_locations,
154
187
  order_product_return_action,
188
+ new_location,
155
189
  },
156
190
  ];
157
191
  }
@@ -217,7 +251,7 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
217
251
  </tr>
218
252
  </thead>
219
253
  <tbody>
220
- {loadingskeleton ? (
254
+ {load ? (
221
255
  <tr>
222
256
  <td colSpan={6}>
223
257
  <Skeleton active />
@@ -237,6 +271,7 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
237
271
  <tr key={item.id}>
238
272
  <td>
239
273
  <Checkbox
274
+ className="custom-check"
240
275
  checked={selectedReturnOrder?.some(
241
276
  (selectedInvoice: any) =>
242
277
  selectedInvoice?.id === item.id
@@ -246,19 +281,24 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
246
281
  item.id,
247
282
  item.return_location,
248
283
  item.return_locations,
249
- item.order_product_return_action
284
+ item.order_product_return_action,
285
+ item.new_location,
286
+ item.legacy_product_id
250
287
  )
251
288
  }
252
289
  />
253
290
  </td>
254
291
 
255
292
  <td>
256
- {item?.orders_products_stock?.location ? null : (
257
- <div className="awaiting">Awating</div>
293
+ {item?.orders_products_stock?.location !== null &&
294
+ item?.orders_products_stock?.location !== undefined ? (
295
+ item.orders_products_stock.location
296
+ ) : (
297
+ <div className="awaiting">Awaiting</div>
258
298
  )}
259
299
  </td>
260
300
 
261
- <td> {displayValueOrNA(item?.return_location)}</td>
301
+ <td> {displayValueOrNA(item?.new_location)}</td>
262
302
 
263
303
  <td>
264
304
  <ul style={{ listStyleType: 'none', padding: 0 }}>
@@ -286,7 +326,11 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
286
326
  <td>{displayValueOrNA(item?.weight)}KG</td>
287
327
  <td>{displayValueOrNA(item?.cube)}</td>
288
328
  <td>{displayValueOrNA(item?.return_reasons?.reason)}</td>
289
- <td>N/A</td>
329
+ <td>
330
+ {displayValueOrNA(
331
+ item?.order_product_returns?.collected_at
332
+ )}
333
+ </td>
290
334
  <td>{displayValueOrNA(item?.collection_reasons?.reason)}</td>
291
335
  <td>
292
336
  <ul className="actionbox">
@@ -302,7 +346,7 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
302
346
  <DownIcon />
303
347
  {printToogle == index && (
304
348
  <div ref={dropdownRef}>
305
- <PrintDropDown />
349
+ <PrintDropDownReturn />
306
350
  </div>
307
351
  )}
308
352
  </li>
@@ -245,6 +245,9 @@ export const StyledTable = styled.table`
245
245
  width: fit-content;
246
246
  }
247
247
  }
248
+ .custom-check {
249
+ position: relative;
250
+ }
248
251
  .emailInvoiceNo {
249
252
  padding-left: 0px;
250
253
  }
@@ -510,9 +513,9 @@ export const StyledTable = styled.table`
510
513
  // Styled components
511
514
  export const StyledTableWrapper = styled.div`
512
515
  overflow-x: auto;
513
- max-height: calc(100vh - 396px);
516
+ max-height: 300px;
514
517
  scrollbar-width: none;
515
- height: 600px;
518
+ /* height: 600px; */
516
519
  /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */
517
520
  &::-webkit-scrollbar {
518
521
  width: 5px;
@@ -45,7 +45,7 @@ export const StyledTableWrapper = styled.div`
45
45
  export const StyledTable = styled.table`
46
46
  border-spacing: 0 10px;
47
47
  width: 100%;
48
- min-width: 1600px;
48
+ /* min-width: 1600px; */
49
49
  thead {
50
50
  tr {
51
51
  border-radius: 40px;
@@ -2,16 +2,18 @@ import React from 'react';
2
2
  import {
3
3
  StyledContainer,
4
4
  StyledContentWrapper,
5
+ // StyledDropdown,
5
6
  StyledInfoBox,
6
7
  StyledLabel,
7
8
  StyledPaginationItem,
8
9
  StyledPaginationWrapper,
10
+ // StyledDropdownData,
9
11
  } from './PaginationStyle';
10
12
  import PrevIcon from '../../../assets/icons/PrevIcon';
11
13
  import NextIcon from '../../../assets/icons/NextIcon';
12
14
  import { useAtom } from 'jotai';
13
- import { filtersReducerAtom } from '../store/filterStore';
14
15
  import { Select } from 'antd';
16
+ import { filtersReducerAtom } from '../return-after-table/table-filters/ReturnFilterStore';
15
17
 
16
18
  const PAGE_SIZE_OPTIONS = [50, 100, 150];
17
19
  const MAX_PAGES_TO_SHOW = 5;
@@ -46,18 +48,17 @@ const Pagination: React.FC<any> = ({
46
48
  type: 'SET_PERPAGE',
47
49
  payload: newItemsPerPage,
48
50
  });
49
-
51
+
50
52
  // Reset to the first page
51
53
  dispatch({
52
54
  type: 'SET_PAGE',
53
55
  payload: 1,
54
56
  });
55
-
57
+
56
58
  onPageChange(1);
57
59
  onItemsPerPageChange(newItemsPerPage);
58
60
  };
59
61
 
60
-
61
62
  const getPageNumbers = (
62
63
  currentPage: number,
63
64
  totalPages: number
@@ -96,16 +97,16 @@ const Pagination: React.FC<any> = ({
96
97
  </StyledInfoBox>
97
98
  <StyledLabel>Row on Page</StyledLabel>
98
99
  <Select
99
- value={itemsPerPage}
100
- onChange={handleItemsPerPageChange}
101
- style={{ width: 75 }}
102
- >
103
- {PAGE_SIZE_OPTIONS.map(option => (
104
- <Select.Option key={option} value={option}>
105
- {option}
106
- </Select.Option>
107
- ))}
108
- </Select>
100
+ value={itemsPerPage}
101
+ onChange={handleItemsPerPageChange}
102
+ style={{ width: 75 }}
103
+ >
104
+ {PAGE_SIZE_OPTIONS.map(option => (
105
+ <Select.Option key={option} value={option}>
106
+ {option}
107
+ </Select.Option>
108
+ ))}
109
+ </Select>
109
110
  <StyledPaginationWrapper>
110
111
  <StyledPaginationItem
111
112
  onClick={() => handlePageChange(currentPage - 1)}
@@ -26,9 +26,18 @@ function DynamicTable({ columns, data }: DynamicTableProps) {
26
26
 
27
27
  const rows = table.getRowModel().rows;
28
28
  const headerGroups = table.getHeaderGroups();
29
- const smallColumns = ['types','sources', 'event', 'code', 'type', 'route', 'category','action'];
29
+ const smallColumns = [
30
+ 'types',
31
+ 'sources',
32
+ 'event',
33
+ 'code',
34
+ 'type',
35
+ 'route',
36
+ 'category',
37
+ 'action',
38
+ ];
30
39
  const mediumColumns = ['date'];
31
- const largeColumns = [ 'reference','notes','details','datetime'];
40
+ const largeColumns = ['reference', 'notes', 'details', 'datetime'];
32
41
 
33
42
  return (
34
43
  <MainContainer>
@@ -152,7 +161,7 @@ const TableHeadData = styled.th`
152
161
 
153
162
  const TableData = styled.td`
154
163
  border-spacing: 0px;
155
- padding: 20px;
164
+ padding: 13px;
156
165
  font-family: 'Lato', sans-serif;
157
166
  font-size: 13px;
158
167
  font-weight: 400;
@@ -2,14 +2,14 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import { PrintIconMap } from '../../../../order-daily-overview/shared/utlis';
4
4
  import { PrintData } from '../../../../order-daily-overview/shared/interface';
5
- import { optionsPrint } from '../../../../order-daily-overview/common/fakedata';
5
+ import { optionsForReturnPrint } from '../../../../order-daily-overview/common/fakedata';
6
6
  // import { PrintIconMap } from '../utils';
7
7
  // import { optionsPrint } from '../fakeData';
8
8
  // import { PrintData } from '../interface';
9
9
 
10
- const options: PrintData[] = optionsPrint;
10
+ const options: PrintData[] = optionsForReturnPrint;
11
11
 
12
- const PrintDropDown = () => {
12
+ const PrintDropDownReturn = () => {
13
13
  const downloadFiles = () => {};
14
14
  return (
15
15
  <OptionsList>
@@ -26,7 +26,7 @@ const PrintDropDown = () => {
26
26
  );
27
27
  };
28
28
 
29
- export default PrintDropDown;
29
+ export default PrintDropDownReturn;
30
30
 
31
31
  export const OptionsList = styled.ul`
32
32
  margin: 0;
@@ -27,10 +27,9 @@ function ActionSection() {
27
27
  const onSubmit = async () => {
28
28
  setLoading(true);
29
29
  await updateFlag([payload]);
30
- await fetchData();
31
- //modal close
32
30
  setCurrentAction(undefined);
33
31
  setLoading(false);
32
+ await fetchData();
34
33
  };
35
34
 
36
35
  const onCancel = () => {