@bjsdistribution/dms-client-return 0.0.3 → 0.0.4

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 (69) hide show
  1. package/README.md +1 -1
  2. package/dist/components/order-daily-overview/table/table-data/styles.d.ts +2 -0
  3. package/dist/components/order-view/generic-table/AuditLogs.d.ts +4 -0
  4. package/dist/components/order-view/hooks/useGetEventNotes.d.ts +2 -0
  5. package/dist/components/order-view/hooks/useGetSystemLogs.d.ts +2 -0
  6. package/dist/components/order-view/modalsPopup/CreateReturnModal.d.ts +4 -0
  7. package/dist/components/order-view/notes/logs/fakeData.d.ts +7 -7
  8. package/dist/components/order-view/store.d.ts +19 -1
  9. package/dist/components/order-view/system-event-logs/columns/Code.d.ts +3 -0
  10. package/dist/components/order-view/system-event-logs/columns/Date.d.ts +3 -0
  11. package/dist/components/order-view/system-event-logs/columns/Event.d.ts +3 -0
  12. package/dist/components/order-view/system-event-logs/columns/Note.d.ts +3 -0
  13. package/dist/components/order-view/system-event-logs/columns/index.d.ts +4 -0
  14. package/dist/components/order-view/system-event-logs/helper.d.ts +7 -0
  15. package/dist/dms-client-return.cjs.development.js +3232 -2176
  16. package/dist/dms-client-return.cjs.development.js.map +1 -1
  17. package/dist/dms-client-return.cjs.production.min.js +1 -1
  18. package/dist/dms-client-return.cjs.production.min.js.map +1 -1
  19. package/dist/dms-client-return.esm.js +3236 -2180
  20. package/dist/dms-client-return.esm.js.map +1 -1
  21. package/package.json +2 -2
  22. package/src/common/expand-collapse/index.tsx +3 -3
  23. package/src/components/fakeData.ts +14 -23
  24. package/src/components/order-daily-overview/filters/Filters.tsx +6 -6
  25. package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +15 -6
  26. package/src/components/order-daily-overview/header-filters/Styledfilters.tsx +1 -0
  27. package/src/components/order-daily-overview/header-filters/filterStore.ts +1 -1
  28. package/src/components/order-daily-overview/index.tsx +36 -32
  29. package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +8 -3
  30. package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +25 -19
  31. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +17 -15
  32. package/src/components/order-daily-overview/return-order-table/ReturnTable.tsx +10 -3
  33. package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnFilter.tsx +4 -0
  34. package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +69 -19
  35. package/src/components/order-daily-overview/return-order-table/return-orders-filters/RightFilters.tsx +35 -38
  36. package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +7 -1
  37. package/src/components/order-daily-overview/table/ReturnTable.tsx +30 -92
  38. package/src/components/order-daily-overview/table/table-data/styles.ts +15 -0
  39. package/src/components/order-view/details-filters/DetailsFilters.tsx +2 -2
  40. package/src/components/order-view/details-filters/left-side-filters/dropdowns/DropDowns.tsx +0 -2
  41. package/src/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDown.tsx +2 -5
  42. package/src/components/order-view/generic-table/AuditLogs.tsx +96 -0
  43. package/src/components/order-view/hooks/useGetEventNotes.tsx +47 -0
  44. package/src/components/order-view/hooks/useGetSystemLogs.tsx +60 -0
  45. package/src/components/order-view/index.tsx +22 -3
  46. package/src/components/order-view/modalsPopup/CreateReturnModal.tsx +83 -0
  47. package/src/components/order-view/modalsPopup/ModalManager.tsx +49 -49
  48. package/src/components/order-view/notes/AddNote.tsx +127 -13
  49. package/src/components/order-view/notes/index.tsx +100 -3
  50. package/src/components/order-view/notes/logs/fakeData.ts +8 -48
  51. package/src/components/order-view/notes/logs/index.tsx +6 -45
  52. package/src/components/order-view/order-resources/collapsed-content/index.tsx +1 -1
  53. package/src/components/order-view/products-info/expanded-content/index.tsx +2 -2
  54. package/src/components/order-view/products-info/index.tsx +3 -2
  55. package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +29 -33
  56. package/src/components/order-view/store.ts +40 -2
  57. package/src/components/order-view/system-event-logs/collapsed-content/index.tsx +1 -1
  58. package/src/components/order-view/system-event-logs/columns/Code.tsx +17 -0
  59. package/src/components/order-view/system-event-logs/columns/Date.tsx +18 -0
  60. package/src/components/order-view/system-event-logs/columns/Event.tsx +26 -0
  61. package/src/components/order-view/system-event-logs/columns/Note.tsx +24 -0
  62. package/src/components/order-view/system-event-logs/columns/index.tsx +6 -0
  63. package/src/components/order-view/system-event-logs/expanded-content/index.tsx +34 -6
  64. package/src/components/order-view/system-event-logs/helper.ts +29 -0
  65. package/src/index.tsx +32 -5
  66. package/dist/components/order-view/system-event-logs/system-logs-table/SystemLogsTables.d.ts +0 -3
  67. package/dist/components/order-view/system-event-logs/system-logs-table/SytemLogsStyles.d.ts +0 -3
  68. package/src/components/order-view/system-event-logs/system-logs-table/SystemLogsTables.tsx +0 -59
  69. package/src/components/order-view/system-event-logs/system-logs-table/SytemLogsStyles.tsx +0 -239
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.3",
2
+ "version": "0.0.4",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -59,7 +59,7 @@
59
59
  "testEnvironment": "jest-environment-jsdom-sixteen"
60
60
  },
61
61
  "devDependencies": {
62
- "@bjsdistribution/dms-component-library": "^0.0.94",
62
+ "@bjsdistribution/dms-component-library": "^0.1.3",
63
63
  "@size-limit/preset-small-lib": "^11.0.1",
64
64
  "@tippyjs/react": "^4.2.6",
65
65
  "@types/react": "^18.2.47",
@@ -84,9 +84,9 @@ const IconContainer = styled.div<{ isExpanded: boolean }>`
84
84
  align-items: center;
85
85
  justify-content: center;
86
86
  cursor: pointer;
87
- width: 25px;
88
- height: 25px;
89
- padding: 2px;
87
+ width: 20px;
88
+ height: 20px;
89
+ padding: 0px;
90
90
  border-radius: 3px;
91
91
  background: #ffffff;
92
92
  box-shadow: 0px 1px 2px 0px #1018280d;
@@ -32,7 +32,6 @@ export const obtainProductMethodData = [
32
32
  value: 'full_stock_control',
33
33
  },
34
34
  ];
35
-
36
35
  export const options = [
37
36
  {
38
37
  label: 'Task',
@@ -47,7 +46,7 @@ export const options = [
47
46
  selectedFontColor: '#3a3630',
48
47
  },
49
48
  ];
50
- export const ReturnData =[
49
+ export const ReturnData = [
51
50
  {
52
51
  label: 'Return1',
53
52
  value: 'return1',
@@ -60,8 +59,8 @@ export const ReturnData =[
60
59
  label: 'Return3',
61
60
  value: 'return3',
62
61
  },
63
- ]
64
- export const CollectionData =[
62
+ ];
63
+ export const CollectionData = [
65
64
  {
66
65
  label: 'Test1',
67
66
  value: 'test1',
@@ -74,9 +73,8 @@ export const CollectionData =[
74
73
  label: 'Test3',
75
74
  value: 'test3',
76
75
  },
77
- ]
78
-
79
- export const UnReceivedata =[
76
+ ];
77
+ export const UnReceivedata = [
80
78
  {
81
79
  label: 'Test1',
82
80
  value: 'test1',
@@ -89,7 +87,7 @@ export const UnReceivedata =[
89
87
  label: 'Test3',
90
88
  value: 'test3',
91
89
  },
92
- ]
90
+ ];
93
91
  export const ProductType = [
94
92
  {
95
93
  label: 'Delivery',
@@ -102,8 +100,8 @@ export const ProductType = [
102
100
  {
103
101
  label: 'Collection',
104
102
  value: 'collection',
105
- },]
106
-
103
+ },
104
+ ];
107
105
  export const TaskType = [
108
106
  {
109
107
  label: 'Client',
@@ -150,7 +148,6 @@ export const TaskType = [
150
148
  value: 'driver-compliance',
151
149
  },
152
150
  ];
153
-
154
151
  export const CustomOptions = [
155
152
  {
156
153
  label: 'Private',
@@ -161,7 +158,6 @@ export const CustomOptions = [
161
158
  value: 'public',
162
159
  },
163
160
  ];
164
-
165
161
  export const DefectConfirm = [
166
162
  {
167
163
  label: 'Yes',
@@ -172,7 +168,6 @@ export const DefectConfirm = [
172
168
  value: 'no',
173
169
  },
174
170
  ];
175
-
176
171
  export const TomTomColumns = [
177
172
  {
178
173
  header: 'Event Date',
@@ -191,34 +186,34 @@ export const TomTomColumns = [
191
186
  accessorKey: 'type',
192
187
  },
193
188
  ];
194
-
195
189
  export const orderResources = [
196
190
  {
197
191
  types: 'Workflow',
198
192
  category: 'ePOD',
199
193
  datetimes: '2024-06-01 10:30:30',
200
194
  action: 'action',
201
- reference: 'Success Note'
195
+ reference: 'Success Note',
202
196
  },
203
197
  {
204
198
  types: 'Workflow',
205
199
  category: 'ePOD',
206
200
  datetimes: '2024-06-01 10:30:30',
207
201
  action: 'action',
208
- reference: 'Success Note'
202
+ reference: 'Success Note',
209
203
  },
210
204
  {
211
205
  types: 'Workflow',
212
206
  category: 'ePOD',
213
207
  datetimes: '2024-06-01 10:30:30',
214
208
  action: 'action',
215
- reference: 'Success Note'
216
- },{
209
+ reference: 'Success Note',
210
+ },
211
+ {
217
212
  types: 'Workflow',
218
213
  category: 'ePOD',
219
214
  datetimes: '2024-06-01 10:30:30',
220
215
  action: 'action',
221
- reference: 'Success Note'
216
+ reference: 'Success Note',
222
217
  },
223
218
  ];
224
219
  export const orderResourcesColumns = [
@@ -243,7 +238,6 @@ export const orderResourcesColumns = [
243
238
  accessorKey: 'action',
244
239
  },
245
240
  ];
246
-
247
241
  export const tomtomResources = [
248
242
  {
249
243
  route: 'Hammer',
@@ -264,7 +258,6 @@ export const tomtomResources = [
264
258
  type: 'workFlow',
265
259
  },
266
260
  ];
267
-
268
261
  export const toolboxResources = [
269
262
  {
270
263
  resources: 'Hammer',
@@ -303,7 +296,6 @@ export const toolboxColumns = [
303
296
  accessorKey: 'action',
304
297
  },
305
298
  ];
306
-
307
299
  export const SystemEventColumns = [
308
300
  {
309
301
  header: 'Date',
@@ -322,7 +314,6 @@ export const SystemEventColumns = [
322
314
  accessorKey: 'code',
323
315
  },
324
316
  ];
325
-
326
317
  export const systemLgsEvents = [
327
318
  {
328
319
  event: 'Order cretaed via Api',
@@ -6,7 +6,7 @@ import {
6
6
  } from './FilterStyle';
7
7
  import BulkFilter from './BulkFilter';
8
8
  import { TableRowType } from '../shared/interface';
9
- import { filtersReducerAtom } from '../header-filters/filterStore';
9
+ // import { filtersReducerAtom } from '../header-filters/filterStore';
10
10
  import { useApiHook } from '@bjsdistribution/dms-component-library';
11
11
 
12
12
  import {
@@ -14,16 +14,16 @@ import {
14
14
  useCountData,
15
15
  useRoutesTable,
16
16
  } from '../store/store';
17
- import { useAtom } from 'jotai';
17
+ // import { useAtom } from 'jotai';
18
18
 
19
19
  const Filters = () => {
20
20
  const [, setData] = useRoutesTable();
21
- const [state] = useAtom(filtersReducerAtom);
21
+ // const [state] = useAtom(filtersReducerAtom);
22
22
  const [, setPaginationObject] = UsePaginationData();
23
23
  const [, setCount] = useCountData();
24
24
 
25
25
  // Hooks
26
- const { 'x-filters': filters, 'x-pagination': pagination } = state;
26
+ // const { 'x-filters': filters, 'x-pagination': pagination } = state;
27
27
  const {
28
28
  data: fetchedData,
29
29
  loading: apiLoading,
@@ -33,8 +33,8 @@ const Filters = () => {
33
33
  }>({
34
34
  endpoint: 'orders/',
35
35
  method: 'GET',
36
- pagination: pagination,
37
- filters: filters,
36
+ // pagination: pagination,
37
+ // filters: filters,
38
38
  });
39
39
 
40
40
  useEffect(() => {
@@ -37,7 +37,7 @@ function SelectionFilter() {
37
37
  ] = useSelectedLocation();
38
38
  const [selectedClientId, setSelectedClient] = useSelectedClient();
39
39
  const [, setClientLabel] = useTableName();
40
- const [name, setName] = useState<string>();
40
+ const [, setName] = useState<any>();
41
41
  const [isButtonEnabled, setIsButtonEnabled] = useState(false);
42
42
 
43
43
  //client options
@@ -69,7 +69,7 @@ function SelectionFilter() {
69
69
  setSelectedClient(selectedValue);
70
70
  setName(selectedLabel);
71
71
  localStorage.setItem('clientName', selectedLabel);
72
-
72
+ localStorage.setItem('clientId', selectedValue.toString());
73
73
  const filteredSubLocations = locationData
74
74
  ?.filter((subCat: any) => subCat?.customer_id === selectedUuids)
75
75
  .map((subCat: any) => ({
@@ -135,8 +135,18 @@ function SelectionFilter() {
135
135
  };
136
136
 
137
137
  const storedName = localStorage.getItem('clientName');
138
+ const storedClientId = localStorage.getItem('clientId');
139
+
138
140
  useEffect(() => {
139
- if (selectedClientId || selectedFilterValue || selectedLocationValue) {
141
+ if (storedClientId) {
142
+ dispatch({
143
+ type: 'SET_CLIENT_FILTER',
144
+ payload: storedClientId,
145
+ });
146
+ }
147
+ }, [storedClientId]);
148
+ useEffect(() => {
149
+ if (storedName || selectedFilterValue || selectedLocationValue) {
140
150
  setIsButtonEnabled(true);
141
151
  } else {
142
152
  setIsButtonEnabled(false);
@@ -144,7 +154,6 @@ function SelectionFilter() {
144
154
  }, [storedName, selectedFilterValue, selectedLocationValue]);
145
155
 
146
156
  console.log('check', storedName, selectedFilterValue, selectedLocationValue);
147
-
148
157
  return (
149
158
  <Wrapper>
150
159
  <FilterRow>
@@ -156,8 +165,7 @@ function SelectionFilter() {
156
165
  placeholder="Select Client Name"
157
166
  onChange={handleSelectChange}
158
167
  style={{ minWidth: '14vw' }}
159
- allowClear
160
- value={name}
168
+ value={storedName}
161
169
  />
162
170
  </FilterColumn>
163
171
 
@@ -186,6 +194,7 @@ function SelectionFilter() {
186
194
  onChange={handleLocationChange}
187
195
  style={{ minWidth: '14vw' }}
188
196
  allowClear
197
+ mode="multiple"
189
198
  />
190
199
  </FilterColumn>
191
200
  </LeftColumn>
@@ -201,6 +201,7 @@ export const ApplyButton = styled.button`
201
201
  background: transparent;
202
202
  color: #3a3620;
203
203
  border: 1px solid #3a3630;
204
+ cursor: pointer;
204
205
 
205
206
  &:not(:disabled):hover {
206
207
  background: #feba30;
@@ -104,7 +104,7 @@ const filterReducer = (state: FilterState, action: any): FilterState => {
104
104
  ...state['x-filters'].filter(f => f.field !== 'return_location'),
105
105
  {
106
106
  field: 'return_location',
107
- op: '=',
107
+ op: 'in',
108
108
  value: action.payload,
109
109
  },
110
110
  ],
@@ -1,26 +1,29 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import React, { useEffect } from 'react';
2
2
  import {
3
- UsePaginationData,
4
- useItemsPerPage,
3
+ // UsePaginationData,
4
+ // useItemsPerPage,
5
5
  useLoading,
6
+ // useSelectedAction,
7
+ // useSelectedLocation,
6
8
  useTableName,
7
9
  } from './store/store';
8
10
  import Filters from './filters/Filters';
9
11
  // import TableComponent from '../../components/order-daily-overview/table-view/table/Table';
10
12
  // import TableComponent from '../../components/order-daily-overview/Cards/CardsTable'
11
- import Pagination from './table-view/Pagination';
13
+ // import Pagination from './table-view/Pagination';
12
14
  import styled from 'styled-components';
13
15
  import RouterHeader from './header/route-header/RouterHeader';
14
16
  // import Loader from './header/loader/Loader';
15
17
  import { useStickyStatus } from '../store';
16
18
  import HeaderFilter from './header-filters/HeaderFilter';
17
- import ReturnTable from './table/ReturnTable';
19
+ // import ReturnTable from './table/ReturnTable';
18
20
  import { useApiHook } from '@bjsdistribution/dms-component-library';
19
21
  import { useClientData } from '../order-view/store';
20
22
  import { ClientData } from './common/interface';
21
- import ReturnOrderTable from './return-order-table/return-orders-filters/ReturnOrderTable';
23
+ // import ReturnOrderTable from './return-order-table/return-orders-filters/ReturnOrderTable';
22
24
  import ReturnFilter from './return-order-table/return-orders-filters/ReturnFilter';
23
25
  import { Text } from './filters/FilterStyle';
26
+ import ReturnTable from './table/ReturnTable';
24
27
  // import Loader from '../loader/Loader';
25
28
 
26
29
  // interface ApiResponse {
@@ -32,22 +35,24 @@ import { Text } from './filters/FilterStyle';
32
35
  // }
33
36
 
34
37
  function ReturnMainTable() {
35
- const [paginationObj] = UsePaginationData();
36
- const [, setCurrentPage] = useState(1);
37
- const [itemsPerPage, setItemsPerPage] = useItemsPerPage();
38
- const [selectedClient] = useTableName();
38
+ // const [paginationObj] = UsePaginationData();
39
+ // const [, setCurrentPage] = useState(1);
40
+ // const [itemsPerPage, setItemsPerPage] = useItemsPerPage();
39
41
 
40
- const { page, total } = paginationObj;
42
+ // const { page, total } = paginationObj;
41
43
 
42
- const [isScrolled] = useStickyStatus();
43
- const handlePageChange = (page: number) => {
44
- setCurrentPage(page);
45
- };
46
- const handleItemsPerPageChange = (itemsPerPage: number) => {
47
- setItemsPerPage(itemsPerPage);
48
- };
44
+ // const handlePageChange = (page: number) => {
45
+ // setCurrentPage(page);
46
+ // };
47
+ // const handleItemsPerPageChange = (itemsPerPage: number) => {
48
+ // setItemsPerPage(itemsPerPage);
49
+ // };
49
50
 
50
51
  ////
52
+ const [selectedClient] = useTableName();
53
+
54
+ const [isScrolled] = useStickyStatus();
55
+
51
56
  const [, setLoading] = useLoading();
52
57
  const [, setClientData] = useClientData();
53
58
 
@@ -64,12 +69,6 @@ function ReturnMainTable() {
64
69
  if (fetchedClientData && fetchedClientData.data) {
65
70
  const result = fetchedClientData?.data;
66
71
  setClientData(result);
67
-
68
- // Flatten the nested objects into an array
69
-
70
- // const data = Object.values(fetchedClientData.data);
71
- // console.log('data', data);
72
- // setClientData(data);
73
72
  }
74
73
  }, [staticDataLoading]);
75
74
 
@@ -79,12 +78,14 @@ function ReturnMainTable() {
79
78
  <RouterHeader />
80
79
  <div className="Tableconatiner">
81
80
  <HeaderFilter />
82
- <Row>
83
- <Text> {selectedClient ? selectedClient : 'Client Return'}</Text>
84
- {selectedClient ? <ReturnFilter /> : <Filters />}
85
- </Row>
86
- {selectedClient ? <ReturnOrderTable /> : <ReturnTable />}
87
- {total > 0 && (
81
+ <Container>
82
+ <Row>
83
+ <Text>Client Return</Text>
84
+ {selectedClient ? <ReturnFilter /> : <Filters />}
85
+ </Row>
86
+ <ReturnTable />
87
+ </Container>
88
+ {/* {total > 0 && (
88
89
  <Pagination
89
90
  currentPage={page}
90
91
  totalItems={total}
@@ -92,7 +93,7 @@ function ReturnMainTable() {
92
93
  onPageChange={handlePageChange}
93
94
  onItemsPerPageChange={handleItemsPerPageChange}
94
95
  ></Pagination>
95
- )}
96
+ )} */}
96
97
  </div>
97
98
  </DashBoardWrapper>
98
99
  </>
@@ -106,7 +107,10 @@ const Row = styled.div`
106
107
  justify-content: space-between;
107
108
  align-items: center;
108
109
  `;
109
-
110
+ const Container = styled.div`
111
+ position: relative;
112
+ top: -46px;
113
+ `;
110
114
  const DashBoardWrapper = styled.section`
111
115
  .Tableconatiner {
112
116
  border-radius: 12px;
@@ -35,14 +35,19 @@ const ReturnAfterTable = () => {
35
35
  <RouterHeader />
36
36
  <div className="Tableconatiner">
37
37
  <HeaderFilter />
38
- <ReturnOrderFilter />
39
- <OrderTable />
38
+ <Container>
39
+ <ReturnOrderFilter />
40
+ <OrderTable />
41
+ </Container>
40
42
  </div>
41
43
  </DashBoardWrapper>
42
44
  </div>
43
45
  );
44
46
  };
45
-
47
+ const Container = styled.div`
48
+ position: relative;
49
+ top: -30px;
50
+ `;
46
51
  const DashBoardWrapper = styled.section`
47
52
  .Tableconatiner {
48
53
  border-radius: 12px;
@@ -7,7 +7,7 @@ import { Empty } from 'antd';
7
7
  import React, { useEffect, useRef, useState } from 'react';
8
8
  import { Skeleton } from 'antd';
9
9
  import { useSelectedOrders } from '../../../store';
10
- import { useReturnAfterOrderData } from '../../../order-view/store';
10
+ import { useOrderId, useReturnAfterOrderData } from '../../../order-view/store';
11
11
  import { EmptyDataContainer } from '../../table/table-data/styles';
12
12
  import PrinterIcon from '../../../../assets/icons/PrinterIcon';
13
13
  import DownIcon from '../../../../assets/icons/DownIcon';
@@ -19,6 +19,8 @@ import {
19
19
  import LoadIcon from '../../../../assets/icons/LoadIcon';
20
20
  import { usePrintOptionTOggle } from '../../store/store';
21
21
  import PrintDropDown from '../../../order-view/details-filters/left-side-filters/dropdowns/PrintDropDown';
22
+ import { NavLink } from 'react-router-dom';
23
+ import { formatDate } from '../../shared/utlis';
22
24
 
23
25
  const OrderTable = ({ loadingskeleton }: any) => {
24
26
  const [selectedOrders, setSelectedReturnOrder] = useSelectedOrders();
@@ -107,6 +109,8 @@ const OrderTable = ({ loadingskeleton }: any) => {
107
109
  }
108
110
  };
109
111
 
112
+ const [id, setOrderId] = useOrderId();
113
+ console.log(id, 'idid');
110
114
  return (
111
115
  <>
112
116
  <StyledTableWrapper id="tableScrolling">
@@ -134,14 +138,14 @@ const OrderTable = ({ loadingskeleton }: any) => {
134
138
  <tbody>
135
139
  {loadingskeleton ? (
136
140
  <tr>
137
- <td colSpan={6}>
141
+ <td colSpan={16}>
138
142
  <Skeleton active />
139
143
  </td>
140
- <td colSpan={6}></td>
144
+ <td colSpan={16}></td>
141
145
  </tr>
142
146
  ) : returnAfterOrder?.length === 0 ? (
143
147
  <tr>
144
- <td colSpan={7}>
148
+ <td colSpan={16}>
145
149
  <EmptyDataContainer>
146
150
  <Empty />
147
151
  </EmptyDataContainer>
@@ -170,10 +174,11 @@ const OrderTable = ({ loadingskeleton }: any) => {
170
174
  onChange={() => handleSelectInvoice(item.id)}
171
175
  />
172
176
  </td>
173
- <td>{displayValueOrNA(item?.created_at)}</td>
177
+ <td>{formatDate(new Date(item?.created_at))}</td>
174
178
  <td>{displayValueOrNA(item?.return_locations)}</td>
175
179
  <td>{displayValueOrNA(item?.pick_up_location)}</td>
176
- <td>
180
+
181
+ <td onClick={() => setOrderId(item.id)}>
177
182
  <ul style={{ listStyleType: 'none', padding: 0 }}>
178
183
  <li
179
184
  style={{
@@ -182,24 +187,24 @@ const OrderTable = ({ loadingskeleton }: any) => {
182
187
  paddingLeft: 0,
183
188
  }}
184
189
  >
185
- {displayValueOrNA(
186
- item?.order_recipient?.recipient_name
187
- )}
190
+ <NavLink to={`${item.id}`}>
191
+ {displayValueOrNA(
192
+ item?.order_recipient?.recipient_name
193
+ )}
194
+ </NavLink>
188
195
  </li>
189
196
  <li style={{ color: '#888075' }}>
190
197
  {displayValueOrNA(item?.order_recipient?.postcode)}
191
198
  </li>
192
199
  </ul>
193
200
  </td>
201
+
194
202
  <td>
195
203
  {displayValueOrNA(item?.customer_data?.customer_name)}
196
204
  </td>
197
205
 
198
206
  <td>{displayValueOrNA(item?.consignment)}</td>
199
- <td>
200
- {/* {displayValueOrNA(item?.created_at)} */}
201
- N/A
202
- </td>
207
+ <td>{displayValueOrNA(item?.order_number)}</td>
203
208
 
204
209
  <td>{displayValueOrNA(item?.box_count)}</td>
205
210
  <td>{displayValueOrNA(item?.weight)}KG</td>
@@ -209,7 +214,7 @@ const OrderTable = ({ loadingskeleton }: any) => {
209
214
  options={assigneOptions}
210
215
  placeholder="Select"
211
216
  onChange={() => {}}
212
- // defaultValue={item?.customer_name || ''}
217
+ // defaultValue={item?.assign || ''}
213
218
  style={defaultSelectStyle}
214
219
  disabled={false}
215
220
  // onSearch={handleSearch}
@@ -240,12 +245,13 @@ const OrderTable = ({ loadingskeleton }: any) => {
240
245
  >
241
246
  <PrinterIcon />
242
247
  <DownIcon />
248
+
249
+ {printToogle == index && (
250
+ <div ref={dropdownRef}>
251
+ <PrintDropDown />
252
+ </div>
253
+ )}
243
254
  </li>
244
- {printToogle == index && (
245
- <div ref={dropdownRef}>
246
- <PrintDropDown />
247
- </div>
248
- )}
249
255
  </CustomDrop>
250
256
  <li className="downloadcontainer">
251
257
  <LoadIcon />
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import React from 'react';
2
2
  import {
3
3
  LeftSideConatiner,
4
4
  StyledFIlterELements,
@@ -17,13 +17,9 @@ import {
17
17
  usePrevOrderDetails,
18
18
  } from '../../../order-view/store';
19
19
  import dayjs from 'dayjs';
20
+ import styled from 'styled-components';
20
21
 
21
22
  const ReturnOrderFilter = () => {
22
- const [isDatePickerVisible, setDatePickerVisible] = useState(false);
23
-
24
- const handleDateIconClick = () => {
25
- setDatePickerVisible(prevState => !prevState);
26
- };
27
23
  const [orderDetails, setOrderDetails] = useOrderDetails();
28
24
  const [prevOrderDetails] = usePrevOrderDetails();
29
25
 
@@ -79,29 +75,28 @@ const ReturnOrderFilter = () => {
79
75
  <div className="textcont">Filters</div>
80
76
  </div>
81
77
  <div className="datefilter">
82
- <div className="dateiconcontainer" onClick={handleDateIconClick}>
78
+ <div className="dateiconcontainer">
83
79
  <DateIcon />
84
80
  </div>
85
- <div className="datetext">Date</div>
86
- {isDatePickerVisible && (
81
+ <StyledDatePicker>
87
82
  <DatePicker
83
+ className="custom-datepicker"
88
84
  onChange={onChange}
89
85
  value={actionDate === null ? actionDate : dayjs(actionDate)}
90
86
  format="DD/MM/YY"
87
+ placeholder="Date"
91
88
  />
92
- )}
93
- <div className="roundbox">
94
- <DownArrowIcon />
95
- </div>
89
+ </StyledDatePicker>
96
90
  </div>
97
91
 
98
92
  <div className="datefilter">
99
93
  <div className="dateiconcontainer">
100
- <StatusIcon />
94
+ {' '}
95
+ <StatusIcon />{' '}
101
96
  </div>
102
97
  <div className="datetext">Status of Order</div>
103
98
  <div className="roundbox">
104
- <DownArrowIcon />
99
+ <DownArrowIcon />{' '}
105
100
  </div>
106
101
  </div>
107
102
  <div className="datefilter">
@@ -130,4 +125,11 @@ const ReturnOrderFilter = () => {
130
125
  );
131
126
  };
132
127
 
128
+ const StyledDatePicker = styled.div`
129
+ .custom-datepicker {
130
+ border: none;
131
+ width: 80px;
132
+ }
133
+ `;
134
+
133
135
  export default ReturnOrderFilter;
@@ -5,6 +5,7 @@ import HeaderFilter from '../header-filters/HeaderFilter';
5
5
 
6
6
  import ReturnFilter from './return-orders-filters/ReturnFilter';
7
7
  import ReturnOrderTable from './return-orders-filters/ReturnOrderTable';
8
+ import ModalManager from '../../order-view/modalsPopup/ModalManager';
8
9
 
9
10
  const ReturnTable = () => {
10
11
  return (
@@ -13,14 +14,20 @@ const ReturnTable = () => {
13
14
  <RouterHeader />
14
15
  <div className="Tableconatiner">
15
16
  <HeaderFilter />
16
- <ReturnFilter />
17
- <ReturnOrderTable />
17
+ <Container>
18
+ <ReturnFilter />
19
+ <ReturnOrderTable />
20
+ </Container>
18
21
  </div>
19
22
  </DashBoardWrapper>
23
+ <ModalManager />
20
24
  </div>
21
25
  );
22
26
  };
23
-
27
+ const Container = styled.div`
28
+ position: relative;
29
+ top: -46px;
30
+ `;
24
31
  const DashBoardWrapper = styled.section`
25
32
  .Tableconatiner {
26
33
  border-radius: 12px;