@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.
- package/README.md +1 -1
- package/dist/components/order-daily-overview/table/table-data/styles.d.ts +2 -0
- package/dist/components/order-view/generic-table/AuditLogs.d.ts +4 -0
- package/dist/components/order-view/hooks/useGetEventNotes.d.ts +2 -0
- package/dist/components/order-view/hooks/useGetSystemLogs.d.ts +2 -0
- package/dist/components/order-view/modalsPopup/CreateReturnModal.d.ts +4 -0
- package/dist/components/order-view/notes/logs/fakeData.d.ts +7 -7
- package/dist/components/order-view/store.d.ts +19 -1
- package/dist/components/order-view/system-event-logs/columns/Code.d.ts +3 -0
- package/dist/components/order-view/system-event-logs/columns/Date.d.ts +3 -0
- package/dist/components/order-view/system-event-logs/columns/Event.d.ts +3 -0
- package/dist/components/order-view/system-event-logs/columns/Note.d.ts +3 -0
- package/dist/components/order-view/system-event-logs/columns/index.d.ts +4 -0
- package/dist/components/order-view/system-event-logs/helper.d.ts +7 -0
- package/dist/dms-client-return.cjs.development.js +3232 -2176
- package/dist/dms-client-return.cjs.development.js.map +1 -1
- package/dist/dms-client-return.cjs.production.min.js +1 -1
- package/dist/dms-client-return.cjs.production.min.js.map +1 -1
- package/dist/dms-client-return.esm.js +3236 -2180
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/common/expand-collapse/index.tsx +3 -3
- package/src/components/fakeData.ts +14 -23
- package/src/components/order-daily-overview/filters/Filters.tsx +6 -6
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +15 -6
- package/src/components/order-daily-overview/header-filters/Styledfilters.tsx +1 -0
- package/src/components/order-daily-overview/header-filters/filterStore.ts +1 -1
- package/src/components/order-daily-overview/index.tsx +36 -32
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +8 -3
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +25 -19
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +17 -15
- package/src/components/order-daily-overview/return-order-table/ReturnTable.tsx +10 -3
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnFilter.tsx +4 -0
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +69 -19
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/RightFilters.tsx +35 -38
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +7 -1
- package/src/components/order-daily-overview/table/ReturnTable.tsx +30 -92
- package/src/components/order-daily-overview/table/table-data/styles.ts +15 -0
- package/src/components/order-view/details-filters/DetailsFilters.tsx +2 -2
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/DropDowns.tsx +0 -2
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDown.tsx +2 -5
- package/src/components/order-view/generic-table/AuditLogs.tsx +96 -0
- package/src/components/order-view/hooks/useGetEventNotes.tsx +47 -0
- package/src/components/order-view/hooks/useGetSystemLogs.tsx +60 -0
- package/src/components/order-view/index.tsx +22 -3
- package/src/components/order-view/modalsPopup/CreateReturnModal.tsx +83 -0
- package/src/components/order-view/modalsPopup/ModalManager.tsx +49 -49
- package/src/components/order-view/notes/AddNote.tsx +127 -13
- package/src/components/order-view/notes/index.tsx +100 -3
- package/src/components/order-view/notes/logs/fakeData.ts +8 -48
- package/src/components/order-view/notes/logs/index.tsx +6 -45
- package/src/components/order-view/order-resources/collapsed-content/index.tsx +1 -1
- package/src/components/order-view/products-info/expanded-content/index.tsx +2 -2
- package/src/components/order-view/products-info/index.tsx +3 -2
- package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +29 -33
- package/src/components/order-view/store.ts +40 -2
- package/src/components/order-view/system-event-logs/collapsed-content/index.tsx +1 -1
- package/src/components/order-view/system-event-logs/columns/Code.tsx +17 -0
- package/src/components/order-view/system-event-logs/columns/Date.tsx +18 -0
- package/src/components/order-view/system-event-logs/columns/Event.tsx +26 -0
- package/src/components/order-view/system-event-logs/columns/Note.tsx +24 -0
- package/src/components/order-view/system-event-logs/columns/index.tsx +6 -0
- package/src/components/order-view/system-event-logs/expanded-content/index.tsx +34 -6
- package/src/components/order-view/system-event-logs/helper.ts +29 -0
- package/src/index.tsx +32 -5
- package/dist/components/order-view/system-event-logs/system-logs-table/SystemLogsTables.d.ts +0 -3
- package/dist/components/order-view/system-event-logs/system-logs-table/SytemLogsStyles.d.ts +0 -3
- package/src/components/order-view/system-event-logs/system-logs-table/SystemLogsTables.tsx +0 -59
- package/src/components/order-view/system-event-logs/system-logs-table/SytemLogsStyles.tsx +0 -239
|
@@ -3,13 +3,17 @@ import {
|
|
|
3
3
|
StyledFIlterELements,
|
|
4
4
|
StyledFiter,
|
|
5
5
|
StyledTableFilter,
|
|
6
|
+
Text,
|
|
6
7
|
} from '../../filters/FilterStyle';
|
|
7
8
|
import RightFilters from './RightFilters';
|
|
9
|
+
import { useParams } from 'react-router-dom';
|
|
8
10
|
|
|
9
11
|
const ReturnFilter = () => {
|
|
12
|
+
const { selectedClient } = useParams();
|
|
10
13
|
return (
|
|
11
14
|
<>
|
|
12
15
|
<StyledFiter>
|
|
16
|
+
<Text> {selectedClient}</Text>
|
|
13
17
|
<StyledFIlterELements>
|
|
14
18
|
<StyledTableFilter />
|
|
15
19
|
</StyledFIlterELements>
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Checkbox,
|
|
3
|
+
displayValueOrNA,
|
|
4
|
+
useApiHook,
|
|
5
|
+
} from '@bjsdistribution/dms-component-library';
|
|
2
6
|
import { Empty } from 'antd';
|
|
3
7
|
import { useAtom } from 'jotai';
|
|
4
|
-
import React, { useEffect, useState } from 'react';
|
|
8
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
5
9
|
import { Skeleton } from 'antd';
|
|
6
10
|
import { useSelectedOrders } from '../../../store';
|
|
7
11
|
import { useReturnData } from '../../../order-view/store';
|
|
8
12
|
import { EmptyDataContainer } from '../../table/table-data/styles';
|
|
9
|
-
import { StyledTable, StyledTableWrapper } from './returnstyles';
|
|
13
|
+
import { CustomDrop, StyledTable, StyledTableWrapper } from './returnstyles';
|
|
10
14
|
import PrinterIcon from '../../../../assets/icons/PrinterIcon';
|
|
11
15
|
import DownIcon from '../../../../assets/icons/DownIcon';
|
|
12
|
-
import { useLoading } from '../../store/store';
|
|
16
|
+
import { useLoading, usePrintOptionTOggle } from '../../store/store';
|
|
13
17
|
import { ApiResponse } from '../../../types';
|
|
14
18
|
import { filtersReducerAtom } from '../../header-filters/filterStore';
|
|
19
|
+
import PrintDropDown from '../../../order-view/details-filters/left-side-filters/dropdowns/PrintDropDown';
|
|
15
20
|
|
|
16
21
|
const ReturnOrderTable = ({ loadingskeleton }: any) => {
|
|
17
22
|
const [state] = useAtom(filtersReducerAtom);
|
|
@@ -21,6 +26,30 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
|
|
|
21
26
|
const { 'x-filters': filters, 'x-pagination': pagination } = state;
|
|
22
27
|
const [returnData, setReturnData] = useReturnData();
|
|
23
28
|
const [, setLoading] = useLoading();
|
|
29
|
+
const dropdownRefParent = useRef<HTMLDivElement>(null);
|
|
30
|
+
const dropdownRef = useRef<HTMLDivElement>(null);
|
|
31
|
+
const [printToogle, setPrintToggle] = usePrintOptionTOggle();
|
|
32
|
+
|
|
33
|
+
const OpenDropDown = (index: number) => {
|
|
34
|
+
setPrintToggle(prevIndex => (prevIndex === index ? null : index));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// Close dropdown outside click
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
40
|
+
return () => {
|
|
41
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
42
|
+
};
|
|
43
|
+
}, []);
|
|
44
|
+
const handleClickOutside = (event: MouseEvent) => {
|
|
45
|
+
if (
|
|
46
|
+
dropdownRef.current &&
|
|
47
|
+
!dropdownRef.current.contains(event.target as Node)
|
|
48
|
+
) {
|
|
49
|
+
setPrintToggle(null);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
24
53
|
const { data: fetchedOrderData, loading: staticDataLoading } = useApiHook<
|
|
25
54
|
ApiResponse
|
|
26
55
|
>({
|
|
@@ -105,7 +134,7 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
|
|
|
105
134
|
</td>
|
|
106
135
|
</tr>
|
|
107
136
|
) : (
|
|
108
|
-
returnData?.map((item: any) => (
|
|
137
|
+
returnData?.map((item: any, index: any) => (
|
|
109
138
|
<tr key={item.id}>
|
|
110
139
|
<td>
|
|
111
140
|
<Checkbox
|
|
@@ -117,9 +146,11 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
|
|
|
117
146
|
/>
|
|
118
147
|
</td>
|
|
119
148
|
|
|
120
|
-
<td>
|
|
149
|
+
<td>
|
|
150
|
+
{displayValueOrNA(item?.orders_products_stock?.location)}
|
|
151
|
+
</td>
|
|
121
152
|
|
|
122
|
-
<td>{item?.return_location}</td>
|
|
153
|
+
<td> {displayValueOrNA(item?.return_location)}</td>
|
|
123
154
|
|
|
124
155
|
<td>
|
|
125
156
|
<ul style={{ listStyleType: 'none', padding: 0 }}>
|
|
@@ -130,26 +161,45 @@ const ReturnOrderTable = ({ loadingskeleton }: any) => {
|
|
|
130
161
|
paddingLeft: 0,
|
|
131
162
|
}}
|
|
132
163
|
>
|
|
133
|
-
{
|
|
164
|
+
{displayValueOrNA(
|
|
165
|
+
item?.order_data?.order_recipient?.recipient_name
|
|
166
|
+
)}
|
|
134
167
|
</li>
|
|
135
168
|
<li style={{ color: '#888075' }}>
|
|
136
|
-
{
|
|
169
|
+
{displayValueOrNA(
|
|
170
|
+
item?.order_data?.order_recipient?.postcode
|
|
171
|
+
)}
|
|
137
172
|
</li>
|
|
138
173
|
</ul>
|
|
139
174
|
</td>
|
|
140
|
-
<td>{item?.code}</td>
|
|
141
|
-
<td>{item?.description}</td>
|
|
175
|
+
<td>{displayValueOrNA(item?.code)}</td>
|
|
176
|
+
<td>{displayValueOrNA(item?.description)}</td>
|
|
142
177
|
<td>N/A</td>
|
|
143
|
-
<td>{item?.weight}</td>
|
|
144
|
-
<td>{item?.cube}</td>
|
|
145
|
-
<td>{item?.return_reasons?.reason}</td>
|
|
178
|
+
<td>{displayValueOrNA(item?.weight)}KG</td>
|
|
179
|
+
<td>{displayValueOrNA(item?.cube)}</td>
|
|
180
|
+
<td>{displayValueOrNA(item?.return_reasons?.reason)}</td>
|
|
146
181
|
<td>N/A</td>
|
|
147
|
-
<td>{item?.collection_reasons?.reason}</td>
|
|
182
|
+
<td>{displayValueOrNA(item?.collection_reasons?.reason)}</td>
|
|
148
183
|
<td>
|
|
149
|
-
<
|
|
150
|
-
<
|
|
151
|
-
|
|
152
|
-
|
|
184
|
+
<ul className="actionbox">
|
|
185
|
+
<CustomDrop
|
|
186
|
+
ref={dropdownRefParent}
|
|
187
|
+
className={printToogle === index ? 'active' : ''}
|
|
188
|
+
>
|
|
189
|
+
<li
|
|
190
|
+
className="shareIconContainer"
|
|
191
|
+
onClick={() => OpenDropDown(index)}
|
|
192
|
+
>
|
|
193
|
+
<PrinterIcon />
|
|
194
|
+
<DownIcon />
|
|
195
|
+
{printToogle == index && (
|
|
196
|
+
<div ref={dropdownRef}>
|
|
197
|
+
<PrintDropDown />
|
|
198
|
+
</div>
|
|
199
|
+
)}
|
|
200
|
+
</li>
|
|
201
|
+
</CustomDrop>
|
|
202
|
+
</ul>
|
|
153
203
|
</td>
|
|
154
204
|
</tr>
|
|
155
205
|
))
|
|
@@ -4,49 +4,39 @@ import { StyledBulkItem } from '../../filters/BulkFilterStyle';
|
|
|
4
4
|
import SearchType from '../../header/route-header/search/SearchType';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import DownloadIcon from '../../../../assets/icons/DownloadIcon';
|
|
7
|
+
import { countReducerAtom, useAtom } from '../../../order-view/store';
|
|
8
|
+
import { useSelectedOrders } from '../../../store';
|
|
7
9
|
|
|
8
10
|
const RightFilters = () => {
|
|
11
|
+
const [, dispatch] = useAtom(countReducerAtom);
|
|
12
|
+
const [selectedReturnOrder] = useSelectedOrders();
|
|
13
|
+
|
|
9
14
|
return (
|
|
10
15
|
<Container>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
<ButtonText
|
|
17
|
+
onClick={() => dispatch({ type: 'create-return' })}
|
|
18
|
+
disabled={selectedReturnOrder?.length === 0}
|
|
19
|
+
>
|
|
20
|
+
Create Return
|
|
21
|
+
</ButtonText>
|
|
15
22
|
<StyledBulkItem>
|
|
16
23
|
<SearchType />
|
|
17
24
|
</StyledBulkItem>
|
|
18
25
|
<IconConatiner>
|
|
19
26
|
<Mid>
|
|
20
27
|
<IconText>Export</IconText>
|
|
21
|
-
<DownloadIcon/>
|
|
28
|
+
<DownloadIcon />
|
|
22
29
|
</Mid>
|
|
23
30
|
</IconConatiner>
|
|
24
|
-
|
|
25
31
|
</Container>
|
|
26
32
|
);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// return (
|
|
30
|
-
// // <StyledBulkFilterCover>
|
|
31
|
-
|
|
32
|
-
// <StyledBulkItem>
|
|
33
|
-
// <SearchType />
|
|
34
|
-
// </StyledBulkItem>
|
|
35
|
-
// /* {showTableFilter && (
|
|
36
|
-
// <StyledBulkItem>
|
|
37
|
-
// <TableFilter tableData={TableData[0].tableHead} />
|
|
38
|
-
// </StyledBulkItem>
|
|
39
|
-
// )} */
|
|
40
|
-
// // </StyledBulkFilterCover>
|
|
41
|
-
// );
|
|
42
33
|
};
|
|
43
34
|
const Container = styled.div`
|
|
44
35
|
display: flex;
|
|
45
|
-
/* align-items: flex-start; */
|
|
46
|
-
gap: 16px;
|
|
47
|
-
align-items: center;
|
|
48
|
-
|
|
49
|
-
`
|
|
36
|
+
/* align-items: flex-start; */
|
|
37
|
+
gap: 16px;
|
|
38
|
+
align-items: center;
|
|
39
|
+
`;
|
|
50
40
|
const Mid = styled.div`
|
|
51
41
|
display: flex;
|
|
52
42
|
padding: 4px 10px;
|
|
@@ -55,24 +45,31 @@ const Mid = styled.div`
|
|
|
55
45
|
align-self: stretch;
|
|
56
46
|
border-radius: 15px 0px 0px 15px;
|
|
57
47
|
`;
|
|
58
|
-
|
|
48
|
+
|
|
49
|
+
const ButtonText = styled.button`
|
|
50
|
+
color: white;
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
font-style: normal;
|
|
53
|
+
font-weight: 600;
|
|
54
|
+
|
|
59
55
|
display: flex;
|
|
60
56
|
padding: 7px 12px;
|
|
61
57
|
justify-content: center;
|
|
62
58
|
align-items: center;
|
|
63
59
|
gap: 2px;
|
|
64
60
|
border-radius: 15px;
|
|
65
|
-
background:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
font-family: "'Lato";
|
|
70
|
-
font-size: 14px;
|
|
71
|
-
font-style: normal;
|
|
72
|
-
font-weight: 600;
|
|
73
|
-
line-height: 20px;
|
|
74
|
-
`;
|
|
61
|
+
background: #3a3630;
|
|
62
|
+
font-family: 'Lato';
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
border: none;
|
|
75
65
|
|
|
66
|
+
&:disabled {
|
|
67
|
+
border-radius: 15px;
|
|
68
|
+
background: rgba(136, 128, 117, 0.35);
|
|
69
|
+
color: #888075;
|
|
70
|
+
cursor: not-allowed;
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
76
73
|
|
|
77
74
|
const IconConatiner = styled.div`
|
|
78
75
|
/* display: flex;
|
|
@@ -82,7 +79,7 @@ const IconConatiner = styled.div`
|
|
|
82
79
|
border-radius: 8px 8px 8px 8px; */
|
|
83
80
|
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
84
81
|
background: #f0f2f2;
|
|
85
|
-
border: 1px solid
|
|
82
|
+
border: 1px solid #e2e0db;
|
|
86
83
|
display: flex;
|
|
87
84
|
padding: 7px 12px;
|
|
88
85
|
justify-content: center;
|
package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts
CHANGED
|
@@ -232,7 +232,7 @@ export const EmptyDataContainer = styled.div`
|
|
|
232
232
|
export const StyledTable = styled.table`
|
|
233
233
|
border-spacing: 0 10px;
|
|
234
234
|
width: 100%;
|
|
235
|
-
min-width: 1600px;
|
|
235
|
+
/* min-width: 1600px; */
|
|
236
236
|
thead {
|
|
237
237
|
white-space: nowrap;
|
|
238
238
|
tr {
|
|
@@ -305,6 +305,7 @@ export const StyledTable = styled.table`
|
|
|
305
305
|
/* fontWeight: 600,
|
|
306
306
|
paddingLeft: 0, */
|
|
307
307
|
cursor: pointer;
|
|
308
|
+
position: relative;
|
|
308
309
|
}
|
|
309
310
|
.statusCancelled {
|
|
310
311
|
color: #e95252;
|
|
@@ -385,6 +386,10 @@ export const StyledTable = styled.table`
|
|
|
385
386
|
border-radius: 22px;
|
|
386
387
|
background: rgba(41, 204, 106, 0.15);
|
|
387
388
|
}
|
|
389
|
+
ul > li > a {
|
|
390
|
+
text-decoration: none !important;
|
|
391
|
+
color: #0099ff;
|
|
392
|
+
}
|
|
388
393
|
}
|
|
389
394
|
&:nth-child(even) td {
|
|
390
395
|
background: #f6fbff;
|
|
@@ -493,6 +498,7 @@ export const StyledTableWrapper = styled.div`
|
|
|
493
498
|
overflow-x: auto;
|
|
494
499
|
max-height: calc(100vh - 396px);
|
|
495
500
|
scrollbar-width: none;
|
|
501
|
+
height: 400px;
|
|
496
502
|
/* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */
|
|
497
503
|
&::-webkit-scrollbar {
|
|
498
504
|
width: 5px;
|
|
@@ -3,7 +3,9 @@ import { useClientData, useOrderStaticData } from '../../order-view/store';
|
|
|
3
3
|
import { useLoading } from '../store/store';
|
|
4
4
|
import { useApiHook } from '@bjsdistribution/dms-component-library';
|
|
5
5
|
import {
|
|
6
|
+
ColumStyle,
|
|
6
7
|
EmptyDataContainer,
|
|
8
|
+
GreyBox,
|
|
7
9
|
StyledTable,
|
|
8
10
|
StyledTableWrapper,
|
|
9
11
|
} from './table-data/styles';
|
|
@@ -19,9 +21,7 @@ interface ApiResponse {
|
|
|
19
21
|
|
|
20
22
|
const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
|
|
21
23
|
const [clientData] = useClientData();
|
|
22
|
-
|
|
23
24
|
const [, setLoading] = useLoading();
|
|
24
|
-
|
|
25
25
|
const [, setOrderStaticData] = useOrderStaticData();
|
|
26
26
|
|
|
27
27
|
const { data: fetchedStaticData, loading: staticDataLoading } = useApiHook<{
|
|
@@ -30,7 +30,6 @@ const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
|
|
|
30
30
|
endpoint: `/orders/getStaticData/all/`,
|
|
31
31
|
method: 'GET',
|
|
32
32
|
});
|
|
33
|
-
console.log('fetchedStaticData', fetchedStaticData);
|
|
34
33
|
|
|
35
34
|
useEffect(() => {
|
|
36
35
|
setLoading(staticDataLoading);
|
|
@@ -73,11 +72,10 @@ const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
|
|
|
73
72
|
</td>
|
|
74
73
|
</tr>
|
|
75
74
|
) : (
|
|
76
|
-
|
|
77
|
-
const clientReturn = clientData[0][key];
|
|
75
|
+
clientData?.map((key: any, index: any) => {
|
|
78
76
|
return (
|
|
79
|
-
<tr key={
|
|
80
|
-
<td>{
|
|
77
|
+
<tr key={index}>
|
|
78
|
+
<td>{key?.trading_as}</td>
|
|
81
79
|
|
|
82
80
|
<td>
|
|
83
81
|
{' '}
|
|
@@ -89,108 +87,48 @@ const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
|
|
|
89
87
|
paddingLeft: 0,
|
|
90
88
|
}}
|
|
91
89
|
>
|
|
92
|
-
{
|
|
90
|
+
{key?.customer_name}
|
|
93
91
|
</li>
|
|
94
92
|
</ul>{' '}
|
|
95
93
|
</td>
|
|
96
94
|
<td>
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
display: 'flex',
|
|
104
|
-
justifyContent: 'center',
|
|
105
|
-
}}
|
|
106
|
-
>
|
|
107
|
-
{clientReturn?.return_orders}
|
|
108
|
-
</div>
|
|
95
|
+
<ColumStyle>
|
|
96
|
+
<GreyBox>
|
|
97
|
+
{key?.return_orders}
|
|
98
|
+
{/* </div> */}
|
|
99
|
+
</GreyBox>
|
|
100
|
+
</ColumStyle>
|
|
109
101
|
</td>
|
|
110
102
|
|
|
111
103
|
<td>
|
|
112
|
-
<
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
padding: '3px 12px',
|
|
116
|
-
borderRadius: '4px',
|
|
117
|
-
color: '#6A7378',
|
|
118
|
-
display: 'flex',
|
|
119
|
-
justifyContent: 'center',
|
|
120
|
-
}}
|
|
121
|
-
>
|
|
122
|
-
{clientReturn?.return_order_products}
|
|
123
|
-
</div>
|
|
104
|
+
<ColumStyle>
|
|
105
|
+
<GreyBox>{key?.return_order_products}</GreyBox>
|
|
106
|
+
</ColumStyle>
|
|
124
107
|
</td>
|
|
125
108
|
<td>
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
padding: '3px 12px',
|
|
130
|
-
borderRadius: '4px',
|
|
131
|
-
color: '#6A7378',
|
|
132
|
-
display: 'flex',
|
|
133
|
-
justifyContent: 'center',
|
|
134
|
-
}}
|
|
135
|
-
>
|
|
136
|
-
{clientReturn?.DISPOSE}
|
|
137
|
-
</div>
|
|
109
|
+
<ColumStyle>
|
|
110
|
+
<GreyBox>{key?.DISPOSE}</GreyBox>
|
|
111
|
+
</ColumStyle>
|
|
138
112
|
</td>
|
|
139
113
|
<td>
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
padding: '3px 12px',
|
|
144
|
-
borderRadius: '4px',
|
|
145
|
-
color: '#6A7378',
|
|
146
|
-
display: 'flex',
|
|
147
|
-
justifyContent: 'center',
|
|
148
|
-
}}
|
|
149
|
-
>
|
|
150
|
-
{clientReturn?.['RE-ALLOCATE']}
|
|
151
|
-
</div>
|
|
114
|
+
<ColumStyle>
|
|
115
|
+
<GreyBox>{key?.['RE-ALLOCATE']}</GreyBox>{' '}
|
|
116
|
+
</ColumStyle>
|
|
152
117
|
</td>
|
|
153
118
|
<td>
|
|
154
|
-
<
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
padding: '3px 12px',
|
|
158
|
-
borderRadius: '4px',
|
|
159
|
-
color: '#6A7378',
|
|
160
|
-
display: 'flex',
|
|
161
|
-
justifyContent: 'center',
|
|
162
|
-
}}
|
|
163
|
-
>
|
|
164
|
-
{clientReturn?.['RE-DEL']}
|
|
165
|
-
</div>
|
|
119
|
+
<ColumStyle>
|
|
120
|
+
<GreyBox>{key?.['RE-DEL']}</GreyBox>
|
|
121
|
+
</ColumStyle>
|
|
166
122
|
</td>
|
|
167
123
|
<td>
|
|
168
|
-
<
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
padding: '3px 12px',
|
|
172
|
-
borderRadius: '4px',
|
|
173
|
-
color: '#6A7378',
|
|
174
|
-
display: 'flex',
|
|
175
|
-
justifyContent: 'center',
|
|
176
|
-
}}
|
|
177
|
-
>
|
|
178
|
-
{clientReturn?.RECYCLE}
|
|
179
|
-
</div>
|
|
124
|
+
<ColumStyle>
|
|
125
|
+
<GreyBox>{key?.RECYCLE}</GreyBox>
|
|
126
|
+
</ColumStyle>
|
|
180
127
|
</td>
|
|
181
128
|
<td>
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
padding: '3px 12px',
|
|
186
|
-
borderRadius: '4px',
|
|
187
|
-
color: '#6A7378',
|
|
188
|
-
display: 'flex',
|
|
189
|
-
justifyContent: 'center',
|
|
190
|
-
}}
|
|
191
|
-
>
|
|
192
|
-
{clientReturn?.UNKNOWN}
|
|
193
|
-
</div>
|
|
129
|
+
<ColumStyle>
|
|
130
|
+
<GreyBox>{key?.UNKNOWN}</GreyBox>
|
|
131
|
+
</ColumStyle>
|
|
194
132
|
</td>
|
|
195
133
|
</tr>
|
|
196
134
|
);
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
+
export const ColumStyle = styled.div`
|
|
4
|
+
display: flex;
|
|
5
|
+
width: 67px;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: 7px;
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
export const GreyBox = styled.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
padding: 3px 12px;
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
gap: 24px;
|
|
15
|
+
border-radius: 6px;
|
|
16
|
+
background: rgba(153, 153, 153, 0.1);
|
|
17
|
+
`;
|
|
3
18
|
// Styled components
|
|
4
19
|
export const StyledTableWrapper = styled.div`
|
|
5
20
|
overflow-x: auto;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import Details from './right-side-filters/Details';
|
|
4
|
-
import ActionsMenu from './left-side-filters/ActionsMenu';
|
|
4
|
+
// import ActionsMenu from './left-side-filters/ActionsMenu';
|
|
5
5
|
|
|
6
6
|
const DetailsFilters = () => {
|
|
7
7
|
return (
|
|
8
8
|
<Flex>
|
|
9
9
|
<Details />
|
|
10
|
-
<ActionsMenu />
|
|
10
|
+
{/* <ActionsMenu /> */}
|
|
11
11
|
</Flex>
|
|
12
12
|
);
|
|
13
13
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import PrintDropDown from './PrintDropDown';
|
|
4
3
|
import OptionsDropDown from './OptionsDropDown';
|
|
5
4
|
import MenuDropDown from './MenuDropDown';
|
|
6
5
|
// components
|
|
@@ -11,7 +10,6 @@ function DropDowns() {
|
|
|
11
10
|
<DashBoardWrapper>
|
|
12
11
|
<MenuDropDown />
|
|
13
12
|
<OptionsDropDown />
|
|
14
|
-
<PrintDropDown />
|
|
15
13
|
</DashBoardWrapper>
|
|
16
14
|
</>
|
|
17
15
|
);
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Skeleton } from 'antd';
|
|
4
|
+
import { formatDateTime } from '@bjsdistribution/dms-component-library';
|
|
5
|
+
import { usegetNotes, UseNotesLoading } from '../store';
|
|
6
|
+
import { NotesTableData } from '../notes/logs/fakeData';
|
|
7
|
+
|
|
8
|
+
const GenericAuditLogsTable = () => {
|
|
9
|
+
const tableHeadData = NotesTableData[0].tableHead; // Assuming NotesTableData contains table header information
|
|
10
|
+
const [getNotes] = usegetNotes();
|
|
11
|
+
const [isLoading] = UseNotesLoading();
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<ScrollableTableWrapper>
|
|
15
|
+
<AuditTableWrapper>
|
|
16
|
+
<table>
|
|
17
|
+
<thead>
|
|
18
|
+
<tr>
|
|
19
|
+
{tableHeadData.map(column => (
|
|
20
|
+
<th key={column.key}>{column.label}</th>
|
|
21
|
+
))}
|
|
22
|
+
</tr>
|
|
23
|
+
</thead>
|
|
24
|
+
<tbody>
|
|
25
|
+
{isLoading ? (
|
|
26
|
+
<tr>
|
|
27
|
+
<td className="noBoder" colSpan={tableHeadData?.length}>
|
|
28
|
+
<Skeleton />
|
|
29
|
+
</td>
|
|
30
|
+
</tr>
|
|
31
|
+
) : getNotes && getNotes?.length > 0 ? (
|
|
32
|
+
getNotes?.map((note: any) => (
|
|
33
|
+
<tr key={note?.id}>
|
|
34
|
+
<td>
|
|
35
|
+
<div className="bold" title={note?.created_by}>
|
|
36
|
+
{note?.created_by}
|
|
37
|
+
</div>
|
|
38
|
+
<div>{formatDateTime(note?.created_at)}</div>
|
|
39
|
+
</td>
|
|
40
|
+
<td>{note?.description}</td>
|
|
41
|
+
</tr>
|
|
42
|
+
))
|
|
43
|
+
) : (
|
|
44
|
+
<tr>
|
|
45
|
+
<td colSpan={tableHeadData?.length}>No data found</td>
|
|
46
|
+
</tr>
|
|
47
|
+
)}
|
|
48
|
+
</tbody>
|
|
49
|
+
</table>
|
|
50
|
+
</AuditTableWrapper>
|
|
51
|
+
</ScrollableTableWrapper>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const ScrollableTableWrapper = styled.div``;
|
|
56
|
+
|
|
57
|
+
export const AuditTableWrapper = styled.div`
|
|
58
|
+
height: 250px;
|
|
59
|
+
min-height: 200px;
|
|
60
|
+
/* overflow: auto; */
|
|
61
|
+
|
|
62
|
+
table {
|
|
63
|
+
border-spacing: 0;
|
|
64
|
+
width: 100%;
|
|
65
|
+
text-align: left;
|
|
66
|
+
|
|
67
|
+
thead {
|
|
68
|
+
th {
|
|
69
|
+
border-bottom: 1px solid rgba(58, 54, 48, 0.25);
|
|
70
|
+
background: #faf9f9;
|
|
71
|
+
padding: 14px 12px;
|
|
72
|
+
color: #3a3630;
|
|
73
|
+
font-size: 14px;
|
|
74
|
+
font-weight: 600;
|
|
75
|
+
line-height: 24px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
tbody {
|
|
79
|
+
td {
|
|
80
|
+
color: #667085;
|
|
81
|
+
font-family: Lato;
|
|
82
|
+
font-size: 13px;
|
|
83
|
+
font-style: normal;
|
|
84
|
+
font-weight: 400;
|
|
85
|
+
line-height: 16px;
|
|
86
|
+
padding: 10px;
|
|
87
|
+
.bold {
|
|
88
|
+
font-weight: 500;
|
|
89
|
+
font-size: 14px;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
|
|
96
|
+
export default GenericAuditLogsTable;
|