@bjsdistribution/dms-client-return 0.0.2 → 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/common/interface.d.ts +22 -0
- package/dist/components/order-daily-overview/header-filters/Styledfilters.d.ts +1 -2
- package/dist/components/order-daily-overview/header-filters/filterStore.d.ts +16 -0
- package/dist/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.d.ts +1 -0
- package/dist/components/order-daily-overview/shared/utlis.d.ts +2 -2
- package/dist/components/order-daily-overview/store/store.d.ts +4 -0
- package/dist/components/order-daily-overview/table/table-data/styles.d.ts +2 -0
- package/dist/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDown.d.ts +3 -1
- 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 +23 -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/components/store.d.ts +5 -2
- package/dist/components/types.d.ts +1 -1
- package/dist/dms-client-return.cjs.development.js +3553 -2396
- 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 +3557 -2400
- 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/common/fakedata.tsx +5 -6
- package/src/components/order-daily-overview/common/interface.ts +120 -97
- package/src/components/order-daily-overview/filters/Filters.tsx +6 -13
- package/src/components/order-daily-overview/header-filters/HeaderFilter.tsx +56 -67
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +170 -224
- package/src/components/order-daily-overview/header-filters/Styledfilters.tsx +20 -7
- package/src/components/order-daily-overview/header-filters/filterStore.ts +145 -0
- package/src/components/order-daily-overview/index.tsx +77 -20
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +32 -4
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +184 -235
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +69 -10
- 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 +9 -47
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +106 -190
- 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 +69 -1
- package/src/components/order-daily-overview/store/store.ts +23 -12
- package/src/components/order-daily-overview/table/ReturnTable.tsx +133 -207
- package/src/components/order-daily-overview/table/table-data/styles.ts +15 -0
- package/src/components/order-view/details-filters/DetailsFilters.tsx +5 -4
- 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 +54 -46
- package/src/components/order-view/general-information/Status.tsx +1 -1
- 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 +25 -4
- 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/modalsPopup/UnReceiveProduct.tsx +1 -1
- 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-actions/actions/escalation/EscalationModal.tsx +1 -1
- package/src/components/order-view/order-details/expanded-content/customer-section/RecipientName.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactEmail.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactHome.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactMobile.tsx +1 -1
- package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactWork.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/location-info/Address.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/location-info/Latitude.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/location-info/Longitude.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/location-info/Postcode.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/customer-section/location-info/What3words.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/footer/index.tsx +3 -2
- package/src/components/order-view/order-details/expanded-content/index.tsx +1 -1
- package/src/components/order-view/order-details/expanded-content/instruction-section/index.tsx +2 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/Carrier.tsx +7 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/DeliveryDate.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/orders-section/Depot.tsx +14 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/Droptime.tsx +2 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/OrderNumber.tsx +2 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/RecipientReference.tsx +2 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/ScheduleAfter.tsx +1 -0
- package/src/components/order-view/order-details/expanded-content/orders-section/VehicleType.tsx +13 -1
- package/src/components/order-view/order-details/expanded-content/services-section/DeliveryPoint.tsx +13 -1
- package/src/components/order-view/order-details/expanded-content/services-section/ServiceType.tsx +13 -1
- package/src/components/order-view/order-details/expanded-content/services-section/TimedService.tsx +14 -1
- 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 +30 -34
- package/src/components/order-view/store.ts +80 -14
- 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/components/store.ts +26 -4
- package/src/components/types.ts +2 -6
- package/src/index.tsx +32 -5
- package/dist/components/order-daily-overview/table/InfiniteScrolling.d.ts +0 -5
- package/dist/components/order-daily-overview/table/Return.d.ts +0 -3
- package/dist/components/order-daily-overview/table/table-data/MyTable.d.ts +0 -18
- package/dist/components/order-daily-overview/table/table-data/Table.d.ts +0 -18
- 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-daily-overview/table/InfiniteScrolling.tsx +0 -54
- package/src/components/order-daily-overview/table/Return.tsx +0 -156
- package/src/components/order-daily-overview/table/table-data/MyTable.tsx +0 -433
- package/src/components/order-daily-overview/table/table-data/Table.tsx +0 -445
- 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
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
// Base
|
|
2
1
|
import { atom, useAtom } from 'jotai';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
// import { routeInfoInitialValue } from './initialValues';
|
|
6
|
-
import {
|
|
7
|
-
// RouteInfoType,
|
|
8
|
-
PaginationData,
|
|
9
|
-
TableColumn,
|
|
10
|
-
TableRowType,
|
|
11
|
-
// OrderRecipientData,
|
|
12
|
-
} from '../shared/interface';
|
|
3
|
+
import { PaginationData, TableColumn, TableRowType } from '../shared/interface';
|
|
13
4
|
|
|
14
5
|
import { ModalType } from '../shared/types';
|
|
15
|
-
// import { routeInfoInitialValue } from './initialValues';
|
|
16
|
-
// Table column filter
|
|
17
6
|
export const visibleColumnsAtom = atom<string[]>([]);
|
|
18
7
|
const toggleColumnMenuAtom = atom<boolean>(false);
|
|
19
8
|
export const useToggleColumn = () => {
|
|
@@ -52,6 +41,26 @@ export const useLoading = () => {
|
|
|
52
41
|
return useAtom(loading);
|
|
53
42
|
};
|
|
54
43
|
|
|
44
|
+
const selectedAction = atom<number | null>(null);
|
|
45
|
+
export function useSelectedAction() {
|
|
46
|
+
return useAtom(selectedAction);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const selectedLocation = atom<string | null>(null);
|
|
50
|
+
export function useSelectedLocation() {
|
|
51
|
+
return useAtom(selectedLocation);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const selectedClient = atom<number | null>(null);
|
|
55
|
+
export function useSelectedClient() {
|
|
56
|
+
return useAtom(selectedClient);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const clientTableName = atom<string | null>(null);
|
|
60
|
+
export function useTableName() {
|
|
61
|
+
return useAtom(clientTableName);
|
|
62
|
+
}
|
|
63
|
+
|
|
55
64
|
// Paginations
|
|
56
65
|
|
|
57
66
|
const atomPaginationData = atom<PaginationData>({
|
|
@@ -77,6 +86,8 @@ const countStatus = atom<any>([]);
|
|
|
77
86
|
export const useCountData = () => {
|
|
78
87
|
return useAtom(countStatus);
|
|
79
88
|
};
|
|
89
|
+
|
|
90
|
+
//
|
|
80
91
|
// ROUTE DETAILS PAGE STATES ->
|
|
81
92
|
|
|
82
93
|
// const orderId = atom<number | undefined>(undefined);
|
|
@@ -1,217 +1,143 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// import {
|
|
14
|
-
// usePrevSelectedClients,
|
|
15
|
-
// useSelectedClients,
|
|
16
|
-
// } from '../header-for-invoice/store';
|
|
17
|
-
// import ClientView from './client-view';
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { useClientData, useOrderStaticData } from '../../order-view/store';
|
|
3
|
+
import { useLoading } from '../store/store';
|
|
4
|
+
import { useApiHook } from '@bjsdistribution/dms-component-library';
|
|
5
|
+
import {
|
|
6
|
+
ColumStyle,
|
|
7
|
+
EmptyDataContainer,
|
|
8
|
+
GreyBox,
|
|
9
|
+
StyledTable,
|
|
10
|
+
StyledTableWrapper,
|
|
11
|
+
} from './table-data/styles';
|
|
12
|
+
import { Empty, Skeleton } from 'antd';
|
|
18
13
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
// overviewFiltersReducerAtom
|
|
27
|
-
// );
|
|
28
|
-
// const [, setPrevSelectedClients] = usePrevSelectedClients();
|
|
29
|
-
// const [, dispatchFilters] = useAtom(overviewFiltersReducerAtom);
|
|
14
|
+
interface ApiResponse {
|
|
15
|
+
message: string;
|
|
16
|
+
code: number;
|
|
17
|
+
error: string | null;
|
|
18
|
+
error_traceback: string | null;
|
|
19
|
+
data: [];
|
|
20
|
+
}
|
|
30
21
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
// dispatchOverviewFilter({
|
|
36
|
-
// type: 'SET_CUSTOMER_FILTER',
|
|
37
|
-
// payload: [data.value],
|
|
38
|
-
// });
|
|
39
|
-
// };
|
|
22
|
+
const ReturnTable: React.FC = ({ loadingskeleton }: any) => {
|
|
23
|
+
const [clientData] = useClientData();
|
|
24
|
+
const [, setLoading] = useLoading();
|
|
25
|
+
const [, setOrderStaticData] = useOrderStaticData();
|
|
40
26
|
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
Header: 'Client',
|
|
50
|
-
accessor: 'customer_name',
|
|
51
|
-
// callback: getId,
|
|
52
|
-
sortable: true,
|
|
53
|
-
showIcon: false,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
Header: 'Orders',
|
|
57
|
-
accessor: 'total_amount',
|
|
58
|
-
sortable: true,
|
|
59
|
-
showIcon: true,
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
Header: 'Products',
|
|
63
|
-
accessor: 'total_orders',
|
|
64
|
-
sortable: true,
|
|
65
|
-
showIcon: false,
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
Header: 'RTS',
|
|
69
|
-
accessor: 'total_amount',
|
|
70
|
-
sortable: true,
|
|
71
|
-
showIcon: true,
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
Header: 'Pending',
|
|
75
|
-
accessor: 'total_amount',
|
|
76
|
-
sortable: true,
|
|
77
|
-
showIcon: true,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
Header: 'Dispose',
|
|
81
|
-
accessor: 'total_orders',
|
|
82
|
-
sortable: true,
|
|
83
|
-
showIcon: false,
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
Header: 'Re-allocate',
|
|
87
|
-
accessor: 'total_amount',
|
|
88
|
-
sortable: true,
|
|
89
|
-
showIcon: true,
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
Header: 'Re-Del',
|
|
93
|
-
accessor: 'total_amount',
|
|
94
|
-
sortable: true,
|
|
95
|
-
showIcon: true,
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
Header: 'Recycle',
|
|
99
|
-
accessor: 'total_orders',
|
|
100
|
-
sortable: true,
|
|
101
|
-
showIcon: false,
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
Header: 'unknown',
|
|
105
|
-
accessor: 'total_amount',
|
|
106
|
-
sortable: true,
|
|
107
|
-
showIcon: true,
|
|
108
|
-
},
|
|
109
|
-
// {
|
|
110
|
-
// Header: 'Amount',
|
|
111
|
-
// accessor: 'total_amount',
|
|
112
|
-
// sortable: true,
|
|
113
|
-
// showIcon: true,
|
|
114
|
-
// },
|
|
115
|
-
// { Header: 'VAT', accessor: 'vat_rate', sortable: true, showIcon: true },
|
|
116
|
-
// { Header: 'Total', accessor: 'total', sortable: true, showIcon: false },
|
|
117
|
-
];
|
|
27
|
+
const { data: fetchedStaticData, loading: staticDataLoading } = useApiHook<{
|
|
28
|
+
data: ApiResponse[];
|
|
29
|
+
}>({
|
|
30
|
+
endpoint: `/orders/getStaticData/all/`,
|
|
31
|
+
method: 'GET',
|
|
32
|
+
});
|
|
118
33
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
setLoading(staticDataLoading);
|
|
36
|
+
if (fetchedStaticData && fetchedStaticData.data) {
|
|
37
|
+
const result = fetchedStaticData?.data;
|
|
38
|
+
setOrderStaticData(result[0]);
|
|
39
|
+
}
|
|
40
|
+
}, [staticDataLoading, fetchedStaticData]);
|
|
125
41
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
// }
|
|
164
|
-
// }
|
|
165
|
-
// }, [fetchedOverviewData, scrollActivated]);
|
|
166
|
-
|
|
167
|
-
// const renderContent = () => {
|
|
168
|
-
|
|
169
|
-
// <MyTable
|
|
170
|
-
// columns={columns}
|
|
171
|
-
// data={data}
|
|
172
|
-
// loading={false}
|
|
173
|
-
// // loadingskeleton={loadingskeleton}
|
|
174
|
-
// view="rfi"
|
|
175
|
-
// />
|
|
42
|
+
return (
|
|
43
|
+
<>
|
|
44
|
+
<StyledTableWrapper id="tableScrolling">
|
|
45
|
+
<StyledTable>
|
|
46
|
+
<thead>
|
|
47
|
+
<tr>
|
|
48
|
+
<th>Trading Name</th>
|
|
49
|
+
<th>Client</th>
|
|
50
|
+
<th>Orders</th>
|
|
51
|
+
<th>Products</th>
|
|
52
|
+
<th>Dispose</th>
|
|
53
|
+
<th>Re-allocate</th>
|
|
54
|
+
<th>Re-Del</th>
|
|
55
|
+
<th>Recycle</th>
|
|
56
|
+
<th>Unknown</th>
|
|
57
|
+
</tr>
|
|
58
|
+
</thead>
|
|
59
|
+
<tbody>
|
|
60
|
+
{loadingskeleton ? (
|
|
61
|
+
<tr>
|
|
62
|
+
<td colSpan={9}>
|
|
63
|
+
<Skeleton active />
|
|
64
|
+
</td>
|
|
65
|
+
</tr>
|
|
66
|
+
) : clientData?.length === 0 ? (
|
|
67
|
+
<tr>
|
|
68
|
+
<td colSpan={9}>
|
|
69
|
+
<EmptyDataContainer>
|
|
70
|
+
<Empty />
|
|
71
|
+
</EmptyDataContainer>
|
|
72
|
+
</td>
|
|
73
|
+
</tr>
|
|
74
|
+
) : (
|
|
75
|
+
clientData?.map((key: any, index: any) => {
|
|
76
|
+
return (
|
|
77
|
+
<tr key={index}>
|
|
78
|
+
<td>{key?.trading_as}</td>
|
|
176
79
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
// />
|
|
200
|
-
// );
|
|
201
|
-
// }
|
|
202
|
-
// };
|
|
80
|
+
<td>
|
|
81
|
+
{' '}
|
|
82
|
+
<ul style={{ listStyleType: 'none', padding: 0 }}>
|
|
83
|
+
<li
|
|
84
|
+
style={{
|
|
85
|
+
color: '#0099ff',
|
|
86
|
+
fontWeight: 600,
|
|
87
|
+
paddingLeft: 0,
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
{key?.customer_name}
|
|
91
|
+
</li>
|
|
92
|
+
</ul>{' '}
|
|
93
|
+
</td>
|
|
94
|
+
<td>
|
|
95
|
+
<ColumStyle>
|
|
96
|
+
<GreyBox>
|
|
97
|
+
{key?.return_orders}
|
|
98
|
+
{/* </div> */}
|
|
99
|
+
</GreyBox>
|
|
100
|
+
</ColumStyle>
|
|
101
|
+
</td>
|
|
203
102
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
103
|
+
<td>
|
|
104
|
+
<ColumStyle>
|
|
105
|
+
<GreyBox>{key?.return_order_products}</GreyBox>
|
|
106
|
+
</ColumStyle>
|
|
107
|
+
</td>
|
|
108
|
+
<td>
|
|
109
|
+
<ColumStyle>
|
|
110
|
+
<GreyBox>{key?.DISPOSE}</GreyBox>
|
|
111
|
+
</ColumStyle>
|
|
112
|
+
</td>
|
|
113
|
+
<td>
|
|
114
|
+
<ColumStyle>
|
|
115
|
+
<GreyBox>{key?.['RE-ALLOCATE']}</GreyBox>{' '}
|
|
116
|
+
</ColumStyle>
|
|
117
|
+
</td>
|
|
118
|
+
<td>
|
|
119
|
+
<ColumStyle>
|
|
120
|
+
<GreyBox>{key?.['RE-DEL']}</GreyBox>
|
|
121
|
+
</ColumStyle>
|
|
122
|
+
</td>
|
|
123
|
+
<td>
|
|
124
|
+
<ColumStyle>
|
|
125
|
+
<GreyBox>{key?.RECYCLE}</GreyBox>
|
|
126
|
+
</ColumStyle>
|
|
127
|
+
</td>
|
|
128
|
+
<td>
|
|
129
|
+
<ColumStyle>
|
|
130
|
+
<GreyBox>{key?.UNKNOWN}</GreyBox>
|
|
131
|
+
</ColumStyle>
|
|
132
|
+
</td>
|
|
133
|
+
</tr>
|
|
134
|
+
);
|
|
135
|
+
})
|
|
136
|
+
)}
|
|
137
|
+
</tbody>
|
|
138
|
+
</StyledTable>
|
|
139
|
+
</StyledTableWrapper>
|
|
140
|
+
</>
|
|
215
141
|
);
|
|
216
142
|
};
|
|
217
143
|
|
|
@@ -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
|
};
|
|
@@ -25,9 +25,10 @@ const Flex = styled.div`
|
|
|
25
25
|
gap: 10px;
|
|
26
26
|
align-self: stretch;
|
|
27
27
|
position: relative;
|
|
28
|
-
margin-
|
|
28
|
+
margin-bottom: -71px;
|
|
29
29
|
width: 97%;
|
|
30
|
-
margin-left:
|
|
30
|
+
margin-left: 21px;
|
|
31
|
+
top: -40px;
|
|
31
32
|
justify-content: space-between;
|
|
32
33
|
`;
|
|
33
34
|
export default DetailsFilters;
|
|
@@ -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
|
);
|
package/src/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDown.tsx
CHANGED
|
@@ -1,52 +1,60 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { PrintIconMap } from '../../../../order-daily-overview/shared/utlis';
|
|
4
|
+
import { PrintData } from '../../../../order-daily-overview/shared/interface';
|
|
5
|
+
import { optionsPrint } from '../../../../order-daily-overview/common/fakedata';
|
|
6
|
+
// import { PrintIconMap } from '../utils';
|
|
7
|
+
// import { optionsPrint } from '../fakeData';
|
|
8
|
+
// import { PrintData } from '../interface';
|
|
2
9
|
|
|
3
|
-
|
|
4
|
-
import DropDownMenu from './DropDownMenu';
|
|
5
|
-
import DropDownItem from './DropDownItem';
|
|
6
|
-
import DropDownLarge from '../../../../../assets/icons/DropDownLarge';
|
|
7
|
-
|
|
8
|
-
const Options = [
|
|
9
|
-
{ label: 'Return notes', value: 'return-notes' },
|
|
10
|
-
{ label: 'Product Labels', value: 'product-labels' },
|
|
11
|
-
{ label: 'Returns Cover Note', value: 'cover-note' },
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
const PrintDropDown: React.FC = () => {
|
|
15
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
16
|
-
const dropdownRef = useRef<HTMLDivElement>(null);
|
|
17
|
-
|
|
18
|
-
const handleClick = () => {
|
|
19
|
-
setIsOpen(prev => !prev);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const handleSelect = (value: string) => {
|
|
23
|
-
console.log(`Selected: ${value}`);
|
|
24
|
-
setIsOpen(false);
|
|
25
|
-
};
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
const handleClickOutside = (event: MouseEvent) => {
|
|
28
|
-
if (
|
|
29
|
-
dropdownRef.current &&
|
|
30
|
-
!dropdownRef.current.contains(event.target as Node)
|
|
31
|
-
) {
|
|
32
|
-
setIsOpen(false);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
36
|
-
return () => {
|
|
37
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
38
|
-
};
|
|
39
|
-
}, []);
|
|
10
|
+
const options: PrintData[] = optionsPrint;
|
|
40
11
|
|
|
12
|
+
const PrintDropDown = () => {
|
|
13
|
+
const downloadFiles = () => {};
|
|
41
14
|
return (
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
15
|
+
<OptionsList>
|
|
16
|
+
{options.map((item, index) => {
|
|
17
|
+
const IconComponent = PrintIconMap[item.icon];
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<OptionsListLi key={index} onClick={downloadFiles}>
|
|
21
|
+
{IconComponent && <IconComponent />} {item.label}
|
|
22
|
+
</OptionsListLi>
|
|
23
|
+
);
|
|
24
|
+
})}
|
|
25
|
+
</OptionsList>
|
|
50
26
|
);
|
|
51
27
|
};
|
|
28
|
+
|
|
52
29
|
export default PrintDropDown;
|
|
30
|
+
|
|
31
|
+
export const OptionsList = styled.ul`
|
|
32
|
+
margin: 0;
|
|
33
|
+
padding: 0;
|
|
34
|
+
list-style: none;
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
border-radius: 6px;
|
|
37
|
+
border: 1px solid rgba(224, 226, 231, 0.5);
|
|
38
|
+
background: #fff;
|
|
39
|
+
box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);
|
|
40
|
+
width: 177px;
|
|
41
|
+
padding: 5px 1px 3px 1px;
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 26px;
|
|
44
|
+
right: 0;
|
|
45
|
+
z-index: 99;
|
|
46
|
+
min-width: 194px;
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
export const OptionsListLi = styled.li`
|
|
50
|
+
border-bottom: 1px solid #f0f2f2;
|
|
51
|
+
padding: 8px 10px;
|
|
52
|
+
display: flex;
|
|
53
|
+
gap: 12px;
|
|
54
|
+
align-items: center;
|
|
55
|
+
font-size: 13px;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
&:last-child {
|
|
58
|
+
border: none;
|
|
59
|
+
}
|
|
60
|
+
`;
|