@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,9 +1,107 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import AddNote from './AddNote';
|
|
4
4
|
import AuditLogs from './logs';
|
|
5
|
-
|
|
5
|
+
import { useApiHook } from '@bjsdistribution/dms-component-library';
|
|
6
|
+
import {
|
|
7
|
+
useCallAPi,
|
|
8
|
+
usegetNotes,
|
|
9
|
+
usemoduleIds,
|
|
10
|
+
UseNotesLoading,
|
|
11
|
+
useOrderId,
|
|
12
|
+
} from '../store';
|
|
13
|
+
import { useLocation } from 'react-router-dom';
|
|
6
14
|
function Notes() {
|
|
15
|
+
const [moduleIds, setModuleIds] = usemoduleIds();
|
|
16
|
+
const [orderId] = useOrderId();
|
|
17
|
+
const location = useLocation();
|
|
18
|
+
const pathname = location.pathname;
|
|
19
|
+
const orderIdLocaation = pathname.split('/')[1];
|
|
20
|
+
const [, setNoteLoadingStore] = UseNotesLoading();
|
|
21
|
+
const [, setNotes] = usegetNotes();
|
|
22
|
+
const [loderStatus] = useCallAPi();
|
|
23
|
+
|
|
24
|
+
// Declare `allIds` state to store the comma-separated IDs
|
|
25
|
+
// const [allIds, setAllIds] = useState<string | null>(null);
|
|
26
|
+
|
|
27
|
+
// Fetch module IDs
|
|
28
|
+
const { data: fetchedData, loading: apiLoading } = useApiHook<{ data: any }>({
|
|
29
|
+
endpoint: 'audit_logs/modules/',
|
|
30
|
+
method: 'GET',
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (!apiLoading && fetchedData?.data) {
|
|
35
|
+
const modules =
|
|
36
|
+
fetchedData?.data
|
|
37
|
+
.filter((item: any) => item?.name === 'ORDER')
|
|
38
|
+
.flatMap((item: any) =>
|
|
39
|
+
item?.static_child_mappings?.map((child: any) => ({
|
|
40
|
+
id: child?.child_module?.id,
|
|
41
|
+
name: child?.child_module?.name,
|
|
42
|
+
parentId: child?.parent_module?.id,
|
|
43
|
+
parentName: child?.parent_module?.name,
|
|
44
|
+
}))
|
|
45
|
+
) || [];
|
|
46
|
+
|
|
47
|
+
// console.log(modules, 'modulesmodules');
|
|
48
|
+
|
|
49
|
+
// const ids = modules?.map((module: any) => module.id).join(',');
|
|
50
|
+
// setAllIds(ids);
|
|
51
|
+
|
|
52
|
+
// console.log(ids, 'allIds');
|
|
53
|
+
|
|
54
|
+
const orderNoteModule = modules?.find(
|
|
55
|
+
(module: any) => module?.name === 'ORDER-NOTE'
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
setModuleIds(orderNoteModule || modules[0] || null);
|
|
59
|
+
}
|
|
60
|
+
}, [apiLoading, fetchedData]);
|
|
61
|
+
|
|
62
|
+
// Fetch Notes Data when `allIds` is available
|
|
63
|
+
const {
|
|
64
|
+
data: NotesData,
|
|
65
|
+
loading: NotesLoading,
|
|
66
|
+
setShouldPerformAction,
|
|
67
|
+
} = useApiHook<{ data: any }>({
|
|
68
|
+
// Use `allIds` in the endpoint if it's set
|
|
69
|
+
endpoint: `audit_logs/?module_id=${
|
|
70
|
+
moduleIds?.parentId
|
|
71
|
+
}&module_object_id=${orderId || orderIdLocaation}
|
|
72
|
+
`,
|
|
73
|
+
method: 'GET',
|
|
74
|
+
performAction: false,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// &sub_module_ids=${allIds}
|
|
78
|
+
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
setNoteLoadingStore(true);
|
|
81
|
+
if (moduleIds) {
|
|
82
|
+
// Ensure `allIds` is set
|
|
83
|
+
setShouldPerformAction(true);
|
|
84
|
+
}
|
|
85
|
+
if (!NotesLoading && NotesData?.data) {
|
|
86
|
+
const updatedData = NotesData?.data
|
|
87
|
+
// .filter((item: any) => item['ORDER-NOTE'] || item['ORDER'])
|
|
88
|
+
// .map((item: any) => [item['ORDER-NOTE'], item['ORDER']])
|
|
89
|
+
.flat()
|
|
90
|
+
.filter(Boolean);
|
|
91
|
+
|
|
92
|
+
const combinedArray = updatedData.flat();
|
|
93
|
+
combinedArray.sort(
|
|
94
|
+
(a: any, b: any) =>
|
|
95
|
+
new Date(b.created_at).getTime() - new Date(a.created_at).getTime()
|
|
96
|
+
);
|
|
97
|
+
setNotes(combinedArray);
|
|
98
|
+
setNoteLoadingStore(NotesLoading);
|
|
99
|
+
loderStatus
|
|
100
|
+
? setShouldPerformAction(true)
|
|
101
|
+
: setShouldPerformAction(false);
|
|
102
|
+
}
|
|
103
|
+
}, [moduleIds, NotesLoading, loderStatus]); // Add `allIds` to dependencies
|
|
104
|
+
|
|
7
105
|
return (
|
|
8
106
|
<Container>
|
|
9
107
|
<CardHeader>NOTES</CardHeader>
|
|
@@ -31,7 +129,6 @@ const CardHeader = styled.div`
|
|
|
31
129
|
text-transform: uppercase;
|
|
32
130
|
font-family: 'Roboto', sans-serif;
|
|
33
131
|
font-weight: 600;
|
|
34
|
-
|
|
35
132
|
`;
|
|
36
133
|
|
|
37
134
|
const CustomizedFormSection = styled.div`
|
|
@@ -1,50 +1,10 @@
|
|
|
1
|
-
export const
|
|
2
|
-
{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
product_id: 'GS601',
|
|
12
|
-
created_at: '22/01/2024 07:22:47',
|
|
13
|
-
updated_at: '22/01/2024 07:22:47',
|
|
14
|
-
created_by: 'Manpreet - DMS @ Upload Doc',
|
|
15
|
-
note: 'Uploaded doc for Assemble and Disassemble service instruction.',
|
|
16
|
-
id: 2,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
product_id: 'GS601',
|
|
20
|
-
created_at: '22/01/2024 07:22:47',
|
|
21
|
-
updated_at: '22/01/2024 07:22:47',
|
|
22
|
-
created_by: 'Manpreet - DMS @ Upload Doc',
|
|
23
|
-
note: 'Uploaded doc for Assemble and Disassemble service instruction.',
|
|
24
|
-
id: 3,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
product_id: 'GS601',
|
|
28
|
-
created_at: '22/01/2024 07:22:47',
|
|
29
|
-
updated_at: '22/01/2024 07:22:47',
|
|
30
|
-
created_by: 'Manpreet - DMS @ Upload Doc',
|
|
31
|
-
note: 'Uploaded doc for Assemble and Disassemble service instruction.',
|
|
32
|
-
id: 4,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
product_id: 'GS601',
|
|
36
|
-
created_at: '22/01/2024 07:22:47',
|
|
37
|
-
updated_at: '22/01/2024 07:22:47',
|
|
38
|
-
created_by: 'Manpreet - DMS @ Upload Doc',
|
|
39
|
-
note: 'Uploaded doc for Assemble and Disassemble service instruction.',
|
|
40
|
-
id: 5,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
product_id: 'GS601',
|
|
44
|
-
created_at: '22/01/2024 07:22:47',
|
|
45
|
-
updated_at: '22/01/2024 07:22:47',
|
|
46
|
-
created_by: 'Manpreet - DMS @ Upload Doc',
|
|
47
|
-
note: 'Uploaded doc for Assemble and Disassemble service instruction.',
|
|
48
|
-
id: 6,
|
|
1
|
+
export const NotesTableData = [
|
|
2
|
+
{
|
|
3
|
+
tableHead: [
|
|
4
|
+
{ key: 'startFinish', label: 'Created', alwaysVisible: true },
|
|
5
|
+
{ key: 'routeDetails', label: 'Notes', alwaysVisible: true },
|
|
6
|
+
],
|
|
7
|
+
tableBody: [
|
|
8
|
+
],
|
|
49
9
|
},
|
|
50
10
|
];
|
|
@@ -1,59 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
// import { tableColumns } from './helper';
|
|
3
2
|
import styled from 'styled-components';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import CustomScrollBar from '../../../../common/scrollbar';
|
|
7
|
-
// import GenericAuditLogsTable from '../../../add-order/order-details/common/generic-table/AuditLogs';
|
|
8
|
-
// import { fakeData } from './fakeData';
|
|
3
|
+
import GenericAuditLogsTable from '../../generic-table/AuditLogs';
|
|
4
|
+
// import CustomScrollBar from '../../../../common/scrollbar';
|
|
9
5
|
|
|
10
6
|
function AuditLogs() {
|
|
11
7
|
return (
|
|
12
8
|
<Container>
|
|
13
|
-
<CustomScrollBar>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<thead>
|
|
17
|
-
<tr>
|
|
18
|
-
{/* <th className="emailInvoiceNo">Invoice No.</th> */}
|
|
19
|
-
<th>Created</th>
|
|
20
|
-
<th>Notes</th>
|
|
21
|
-
</tr>
|
|
22
|
-
</thead>
|
|
23
|
-
<tbody>
|
|
24
|
-
{data?.map((invoice: any) => (
|
|
25
|
-
<tr key={invoice.id}>
|
|
26
|
-
<td>
|
|
27
|
-
<ul style={{ listStyleType: 'none', padding: 0 }}>
|
|
28
|
-
<li
|
|
29
|
-
style={{
|
|
30
|
-
color: '#3A3630',
|
|
31
|
-
fontWeight: 600,
|
|
32
|
-
paddingLeft: 0,
|
|
33
|
-
}}
|
|
34
|
-
>
|
|
35
|
-
{' '}
|
|
36
|
-
{invoice?.notes}
|
|
37
|
-
</li>
|
|
38
|
-
<li style={{ color: '#888075' }}>{invoice?.date}</li>
|
|
39
|
-
</ul>
|
|
40
|
-
</td>
|
|
41
|
-
<td>{invoice?.customer_name}</td>
|
|
42
|
-
</tr>
|
|
43
|
-
))}
|
|
44
|
-
</tbody>
|
|
45
|
-
</NotesStyledTable>
|
|
46
|
-
</NotesStyledTableWrapper>
|
|
47
|
-
{/* <CustomScrollBar> */}
|
|
48
|
-
{/* <GenericAuditLogsTable columns={tableColumns} data={fakeData} /> */}
|
|
49
|
-
{/* </CustomScrollBar> */}
|
|
50
|
-
</CustomScrollBar>
|
|
9
|
+
{/* <CustomScrollBar> */}
|
|
10
|
+
<GenericAuditLogsTable />
|
|
11
|
+
{/* </CustomScrollBar> */}
|
|
51
12
|
</Container>
|
|
52
13
|
);
|
|
53
14
|
}
|
|
54
15
|
|
|
55
16
|
const Container = styled.div`
|
|
56
|
-
height:
|
|
17
|
+
height: 295px; /* Set height to limit container size */
|
|
57
18
|
overflow: auto; /* Enable scrolling */
|
|
58
19
|
scrollbar-width: thin;
|
|
59
20
|
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import OrderActionModal from '../../../../../common/modals/order-action-modal/OrderActionModal';
|
|
3
3
|
import { useCurrentAction } from '../../../store';
|
|
4
|
-
import NewEscalation from '
|
|
4
|
+
import NewEscalation from './NewEscalation';
|
|
5
5
|
|
|
6
6
|
const EscalationModal: React.FC = () => {
|
|
7
7
|
const [, setCurrentAction] = useCurrentAction();
|
|
@@ -98,9 +98,10 @@ const Container = styled.div`
|
|
|
98
98
|
background: #f8fafc;
|
|
99
99
|
/* margin: 0px -15px -15px -15px; */
|
|
100
100
|
border-radius: 0px 0px 8px 8px;
|
|
101
|
-
margin-bottom: 22px;
|
|
101
|
+
/* margin-bottom: 22px; */
|
|
102
102
|
position: relative;
|
|
103
|
-
|
|
103
|
+
align-items: center;
|
|
104
|
+
/* top: 21px; */
|
|
104
105
|
`;
|
|
105
106
|
|
|
106
107
|
export default OrderDetailsFooter;
|
package/src/components/order-view/order-details/expanded-content/instruction-section/index.tsx
CHANGED
|
@@ -21,7 +21,7 @@ function InstructionSection() {
|
|
|
21
21
|
const FormInputs = styled.div`
|
|
22
22
|
display: flex;
|
|
23
23
|
flex-direction: column;
|
|
24
|
-
gap:
|
|
24
|
+
gap: 7px;
|
|
25
25
|
flex: 1;
|
|
26
26
|
`;
|
|
27
27
|
|
|
@@ -30,6 +30,7 @@ const CustomFormSection = styled(FormSection)`
|
|
|
30
30
|
border-radius: 8px;
|
|
31
31
|
background: #f8fafc;
|
|
32
32
|
box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1);
|
|
33
|
+
padding: 10px !important;
|
|
33
34
|
`;
|
|
34
35
|
|
|
35
36
|
export default InstructionSection;
|
|
@@ -11,7 +11,13 @@ function Carrier() {
|
|
|
11
11
|
<Label label="Carrier" htmlFor="carrier" />
|
|
12
12
|
<CopyText text="hello234e" />
|
|
13
13
|
</Wrapper>
|
|
14
|
-
<Input
|
|
14
|
+
<Input
|
|
15
|
+
name="carrier"
|
|
16
|
+
type="text"
|
|
17
|
+
placeholder="Carrier"
|
|
18
|
+
disabled
|
|
19
|
+
style={{ borderRadius: '25PX' }}
|
|
20
|
+
/>
|
|
15
21
|
</Container>
|
|
16
22
|
);
|
|
17
23
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Label,
|
|
3
|
+
SelectDropdown,
|
|
4
|
+
dropdownStyles,
|
|
5
|
+
} from '@bjsdistribution/dms-component-library';
|
|
2
6
|
import React from 'react';
|
|
3
7
|
import styled from 'styled-components';
|
|
4
8
|
import { useDepotOptions, useOrderDetails } from '../../../store';
|
|
@@ -26,6 +30,15 @@ function DepotDropdown() {
|
|
|
26
30
|
)}
|
|
27
31
|
options={depotOptions || []}
|
|
28
32
|
onChange={onChange}
|
|
33
|
+
styles={{
|
|
34
|
+
...dropdownStyles,
|
|
35
|
+
|
|
36
|
+
control: styles => ({
|
|
37
|
+
...styles,
|
|
38
|
+
borderRadius: '25px',
|
|
39
|
+
cursor: 'pointer',
|
|
40
|
+
}),
|
|
41
|
+
}}
|
|
29
42
|
/>
|
|
30
43
|
</FormContainer>
|
|
31
44
|
);
|
package/src/components/order-view/order-details/expanded-content/orders-section/Droptime.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import { handleKeyDown } from '../../../utils';
|
|
|
7
7
|
function Droptime() {
|
|
8
8
|
const [orderDetails, setOrderDetails] = useOrderDetails();
|
|
9
9
|
const orderRoutes = orderDetails?.order_routes;
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
12
12
|
const val = parseFloat(e.target.value);
|
|
13
13
|
const updatedOrderRoutes = {
|
|
@@ -39,6 +39,7 @@ function Droptime() {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const CustomInput = styled(Input)`
|
|
42
|
+
border-radius: 25px;
|
|
42
43
|
&::-webkit-outer-spin-button,
|
|
43
44
|
&::-webkit-inner-spin-button {
|
|
44
45
|
-webkit-appearance: none;
|
package/src/components/order-view/order-details/expanded-content/orders-section/OrderNumber.tsx
CHANGED
|
@@ -10,7 +10,7 @@ function OrderNumber() {
|
|
|
10
10
|
orderDetails?.order_number !== null &&
|
|
11
11
|
orderDetails?.order_number !== undefined &&
|
|
12
12
|
orderDetails?.order_number?.length > 0;
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
15
15
|
setOrderDetails(prev => {
|
|
16
16
|
return {
|
|
@@ -31,6 +31,7 @@ function OrderNumber() {
|
|
|
31
31
|
placeholder="Order Number"
|
|
32
32
|
value={orderDetails?.order_number || ''}
|
|
33
33
|
onChange={onChange}
|
|
34
|
+
style={{ borderRadius: '25px' }}
|
|
34
35
|
/>
|
|
35
36
|
</Container>
|
|
36
37
|
);
|
|
@@ -5,7 +5,7 @@ import { useOrderDetails } from '../../../store';
|
|
|
5
5
|
|
|
6
6
|
function RecipientReference() {
|
|
7
7
|
const [orderDetails, setOrderDetails] = useOrderDetails();
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
10
10
|
setOrderDetails(prev => {
|
|
11
11
|
return {
|
|
@@ -23,6 +23,7 @@ function RecipientReference() {
|
|
|
23
23
|
placeholder="Enter Recipient Reference"
|
|
24
24
|
value={orderDetails.recipient_reference || ''}
|
|
25
25
|
onChange={onChange}
|
|
26
|
+
style={{ borderRadius: '25px' }}
|
|
26
27
|
/>
|
|
27
28
|
</Container>
|
|
28
29
|
);
|
package/src/components/order-view/order-details/expanded-content/orders-section/VehicleType.tsx
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Label,
|
|
3
|
+
SelectDropdown,
|
|
4
|
+
dropdownStyles,
|
|
5
|
+
} from '@bjsdistribution/dms-component-library';
|
|
2
6
|
import React from 'react';
|
|
3
7
|
import styled from 'styled-components';
|
|
4
8
|
import { vehicleTypeOptions } from '../../helper';
|
|
@@ -14,6 +18,14 @@ function VehicleTypeDropdown() {
|
|
|
14
18
|
openMenuOnFocus
|
|
15
19
|
isDisabled={true}
|
|
16
20
|
value={vehicleTypeOptions[1]}
|
|
21
|
+
styles={{
|
|
22
|
+
...dropdownStyles,
|
|
23
|
+
control: styles => ({
|
|
24
|
+
...styles,
|
|
25
|
+
borderRadius: '25px',
|
|
26
|
+
cursor: 'pointer',
|
|
27
|
+
}),
|
|
28
|
+
}}
|
|
17
29
|
/>
|
|
18
30
|
</FormContainer>
|
|
19
31
|
);
|
package/src/components/order-view/order-details/expanded-content/services-section/DeliveryPoint.tsx
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Label,
|
|
4
|
+
SelectDropdown,
|
|
5
|
+
dropdownStyles,
|
|
6
|
+
} from '@bjsdistribution/dms-component-library';
|
|
3
7
|
import { useOrderDetails, useOrderStaticData } from '../../../store';
|
|
4
8
|
import styled from 'styled-components';
|
|
5
9
|
import { capitalize } from '../../../utils';
|
|
@@ -38,6 +42,14 @@ function DeliveryPointDropdown() {
|
|
|
38
42
|
)}
|
|
39
43
|
openMenuOnFocus
|
|
40
44
|
onChange={onChange}
|
|
45
|
+
styles={{
|
|
46
|
+
...dropdownStyles,
|
|
47
|
+
control: styles => ({
|
|
48
|
+
...styles,
|
|
49
|
+
borderRadius: '25px',
|
|
50
|
+
cursor: 'pointer',
|
|
51
|
+
}),
|
|
52
|
+
}}
|
|
41
53
|
/>
|
|
42
54
|
</Container>
|
|
43
55
|
);
|
package/src/components/order-view/order-details/expanded-content/services-section/ServiceType.tsx
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Label,
|
|
4
|
+
SelectDropdown,
|
|
5
|
+
dropdownStyles,
|
|
6
|
+
} from '@bjsdistribution/dms-component-library';
|
|
3
7
|
import { useOrderDetails, useOrderStaticData } from '../../../store';
|
|
4
8
|
import styled from 'styled-components';
|
|
5
9
|
import { capitalize } from '../../../utils';
|
|
@@ -32,6 +36,14 @@ function ServiceTypeDropdown() {
|
|
|
32
36
|
inputId="serviceTypeDropdown"
|
|
33
37
|
openMenuOnFocus
|
|
34
38
|
onChange={onChange}
|
|
39
|
+
styles={{
|
|
40
|
+
...dropdownStyles,
|
|
41
|
+
control: styles => ({
|
|
42
|
+
...styles,
|
|
43
|
+
borderRadius: '25px',
|
|
44
|
+
cursor: 'pointer',
|
|
45
|
+
}),
|
|
46
|
+
}}
|
|
35
47
|
/>
|
|
36
48
|
</Container>
|
|
37
49
|
);
|
package/src/components/order-view/order-details/expanded-content/services-section/TimedService.tsx
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useOrderDetails, useOrderStaticData } from '../../../store';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Label,
|
|
5
|
+
SelectDropdown,
|
|
6
|
+
dropdownStyles,
|
|
7
|
+
} from '@bjsdistribution/dms-component-library';
|
|
4
8
|
import styled from 'styled-components';
|
|
5
9
|
import { capitalize } from '../../../utils';
|
|
6
10
|
|
|
@@ -37,6 +41,15 @@ function TimedServiceDropdown() {
|
|
|
37
41
|
)}
|
|
38
42
|
inputId="timedServiceDropdown"
|
|
39
43
|
onChange={onChange}
|
|
44
|
+
styles={{
|
|
45
|
+
...dropdownStyles,
|
|
46
|
+
|
|
47
|
+
control: styles => ({
|
|
48
|
+
...styles,
|
|
49
|
+
borderRadius: '25px',
|
|
50
|
+
cursor: 'pointer',
|
|
51
|
+
}),
|
|
52
|
+
}}
|
|
40
53
|
/>
|
|
41
54
|
</Container>
|
|
42
55
|
);
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import ProductTable from '../../return-client-products/ProductTable';
|
|
4
4
|
// import OrderDetailsFooter from '../../order-details/expanded-content/footer';
|
|
5
|
-
import NewReturnDropdown from '../../notes/order-dropdown/NewReturnDropdown';
|
|
5
|
+
// import NewReturnDropdown from '../../notes/order-dropdown/NewReturnDropdown';
|
|
6
6
|
import { Button } from '@bjsdistribution/dms-component-library';
|
|
7
7
|
|
|
8
8
|
function ExpandedContent() {
|
|
@@ -17,7 +17,7 @@ function ExpandedContent() {
|
|
|
17
17
|
<Button style={{ borderRadius: '20px' }} onClick={SaveNote}>
|
|
18
18
|
SAVE Details
|
|
19
19
|
</Button>
|
|
20
|
-
<NewReturnDropdown />
|
|
20
|
+
{/* <NewReturnDropdown /> */}
|
|
21
21
|
</SaveNoteContainer>
|
|
22
22
|
</MidConatiner>
|
|
23
23
|
</Container>
|
|
@@ -16,8 +16,9 @@ interface ApiResponse {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function ProductsInfo() {
|
|
19
|
-
const [
|
|
20
|
-
const customerData =
|
|
19
|
+
const [data] = useOrderDetails();
|
|
20
|
+
const customerData = data;
|
|
21
|
+
|
|
21
22
|
// For API Call
|
|
22
23
|
const [, setAPidata] = useProductDetails();
|
|
23
24
|
const [, setLoading] = useLoading();
|