@bjsdistribution/dms-client-return 0.0.94-prod → 0.0.95-prod
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/dist/assets/icons/ArrowDownIcon.d.ts +6 -0
- package/dist/assets/icons/DeliverProductIcon.d.ts +3 -0
- package/dist/assets/icons/ReturnProductIcon.d.ts +3 -0
- package/dist/common/checkbox/index.d.ts +2 -0
- package/dist/common/modals/order-action-modal/OrderActionModal.d.ts +3 -1
- package/dist/components/order-view/details-filters/left-side-filters/dropdowns/DropDowns.d.ts +1 -0
- package/dist/components/order-view/details-filters/left-side-filters/dropdowns/MenuDropDown.d.ts +2 -2
- package/dist/components/order-view/flags-action-modal/Actions.d.ts +6 -2
- package/dist/components/order-view/flags-action-modal/Dropdowns.d.ts +1 -0
- package/dist/components/order-view/flags-action-modal/Header.d.ts +1 -1
- package/dist/components/order-view/notification/FlagTemplate.d.ts +1 -1
- package/dist/components/order-view/notification/OrderTemplate.d.ts +1 -1
- package/dist/components/order-view/notification/Tabs.d.ts +1 -1
- package/dist/components/order-view/order-actions/actions/cancel-order/CancelOrderTable.d.ts +5 -0
- package/dist/components/order-view/order-actions/actions/cancel-order/index.d.ts +7 -1
- package/dist/components/order-view/order-actions/actions/change-customer-account/ChangeCustomerAccModal.d.ts +4 -1
- package/dist/components/order-view/order-actions/actions/charge-log/index.d.ts +11 -0
- package/dist/components/order-view/order-actions/actions/create-task-reminder/CreateReminderModal.d.ts +1 -13
- package/dist/components/order-view/order-actions/actions/create-task-reminder/TaskModal.d.ts +5 -1
- package/dist/components/order-view/order-actions/actions/create-task-reminder/index.d.ts +6 -2
- package/dist/components/order-view/order-actions/actions/hold-order/HoldOrderModal.d.ts +6 -1
- package/dist/components/order-view/order-actions/actions/log-service-refusal/DeliveryPoint.d.ts +5 -1
- package/dist/components/order-view/order-actions/actions/log-service-refusal/Notes.d.ts +5 -3
- package/dist/components/order-view/order-actions/actions/log-service-refusal/OrderServices.d.ts +5 -1
- package/dist/components/order-view/order-actions/actions/log-service-refusal/index.d.ts +1 -1
- package/dist/components/order-view/order-actions/actions/uncancel-order/UncancelOrder.d.ts +7 -1
- package/dist/components/order-view/order-actions/actions/uncancel-order/UncancelOrderTable.d.ts +5 -0
- package/dist/components/order-view/order-actions/actions/unhold-order/UnholdOrder.d.ts +6 -1
- package/dist/components/order-view/order-actions/store.d.ts +10 -8
- package/dist/components/order-view/order-actions/types.d.ts +38 -60
- package/dist/components/order-view/order-actions/utils.d.ts +2 -1
- package/dist/components/order-view/store.d.ts +48 -3
- package/dist/components/order-view/types.d.ts +11 -0
- package/dist/components/order-view/utils.d.ts +1 -0
- package/dist/components/order-view/view-reminder/ViewReminder.d.ts +5 -1
- package/dist/components/order-view/view-reminder/reminder-styles.d.ts +3 -1
- package/dist/components/store.d.ts +2 -1
- package/dist/dms-client-return.cjs.development.js +4812 -3095
- 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 +4815 -3098
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/assets/icons/ArrowDownIcon.tsx +28 -0
- package/src/assets/icons/DeliverProductIcon.tsx +42 -0
- package/src/assets/icons/ReturnProductIcon.tsx +23 -0
- package/src/common/checkbox/index.tsx +60 -17
- package/src/common/modals/order-action-modal/OrderActionModal.tsx +13 -7
- package/src/common/radio-group/RadioButtonGroup.tsx +3 -4
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +29 -26
- package/src/components/order-daily-overview/header-filters/filterStore.ts +6 -8
- package/src/components/order-daily-overview/index.tsx +20 -7
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +2 -2
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +19 -19
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +11 -9
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +19 -4
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +41 -59
- package/src/components/order-daily-overview/table/ReturnTable.tsx +1 -30
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/DropDowns.tsx +52 -2
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/MenuDropDown.tsx +37 -43
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/OptionsDropDown.tsx +75 -44
- package/src/components/order-view/fakedata.ts +7 -6
- package/src/components/order-view/flags-action-modal/Actions.tsx +51 -25
- package/src/components/order-view/flags-action-modal/DetailSection.tsx +5 -5
- package/src/components/order-view/flags-action-modal/Dropdowns.tsx +75 -89
- package/src/components/order-view/flags-action-modal/Header.tsx +32 -23
- package/src/components/order-view/flags-action-modal/TextSection.tsx +9 -6
- package/src/components/order-view/flags-action-modal/index.tsx +54 -67
- package/src/components/order-view/general-information/dropdowns/Print.tsx +136 -70
- package/src/components/order-view/generic-table/AuditLogs.tsx +5 -4
- package/src/components/order-view/index.tsx +9 -42
- package/src/components/order-view/modalsPopup/CreateReturnModal.tsx +20 -18
- package/src/components/order-view/modalsPopup/ModalManager.tsx +4 -10
- package/src/components/order-view/notes/logs/index.tsx +1 -1
- package/src/components/order-view/notes/order-dropdown/NewReturnDropdown.tsx +5 -7
- package/src/components/order-view/notification/FlagTemplate.tsx +8 -8
- package/src/components/order-view/notification/OrderTemplate.tsx +169 -175
- package/src/components/order-view/notification/ReminderTemplate.tsx +23 -14
- package/src/components/order-view/notification/Tabs.tsx +15 -14
- package/src/components/order-view/notification/index.tsx +164 -92
- package/src/components/order-view/order-actions/actions/add-resources/index.tsx +19 -29
- package/src/components/order-view/order-actions/actions/cancel-order/CancelOrderTable.tsx +345 -0
- package/src/components/order-view/order-actions/actions/cancel-order/index.tsx +146 -71
- package/src/components/order-view/order-actions/actions/change-customer-account/ChangeCustomerAccModal.tsx +95 -32
- package/src/components/order-view/order-actions/actions/charge-log/index.tsx +395 -0
- package/src/components/order-view/order-actions/actions/clear-booking-status/ClearBookingStatus.tsx +1 -1
- package/src/components/order-view/order-actions/actions/confirm-order/customer-info/ActionDropdown.tsx +34 -17
- package/src/components/order-view/order-actions/actions/confirm-order/customer-info/ContactMobile.tsx +2 -3
- package/src/components/order-view/order-actions/actions/confirm-order/customer-info/ContactPhone.tsx +2 -3
- package/src/components/order-view/order-actions/actions/confirm-order/customer-info/ContactWork.tsx +2 -3
- package/src/components/order-view/order-actions/actions/confirm-order/customer-info/DeliveryDate.tsx +39 -25
- package/src/components/order-view/order-actions/actions/confirm-order/customer-info/EmailAddress.tsx +1 -1
- package/src/components/order-view/order-actions/actions/confirm-order/customer-info/TimedServiceDropdown.tsx +4 -2
- package/src/components/order-view/order-actions/actions/confirm-order/customer-info/index.tsx +1 -1
- package/src/components/order-view/order-actions/actions/confirm-order/index.tsx +254 -66
- package/src/components/order-view/order-actions/actions/confirm-order/slot-and-instructions/index.tsx +1 -1
- package/src/components/order-view/order-actions/actions/confirm-order/tables/NotesTable.tsx +13 -9
- package/src/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.tsx +1 -1
- package/src/components/order-view/order-actions/actions/create-task-reminder/CreateReminderModal.tsx +213 -117
- package/src/components/order-view/order-actions/actions/create-task-reminder/CreateTaskModal.tsx +97 -152
- package/src/components/order-view/order-actions/actions/create-task-reminder/TaskModal.tsx +30 -87
- package/src/components/order-view/order-actions/actions/create-task-reminder/index.tsx +77 -83
- package/src/components/order-view/order-actions/actions/hold-order/HoldOrderModal.tsx +57 -65
- package/src/components/order-view/order-actions/actions/log-service-refusal/DeliveryPoint.tsx +10 -16
- package/src/components/order-view/order-actions/actions/log-service-refusal/Notes.tsx +21 -4
- package/src/components/order-view/order-actions/actions/log-service-refusal/OrderServices.tsx +39 -11
- package/src/components/order-view/order-actions/actions/log-service-refusal/index.tsx +79 -8
- package/src/components/order-view/order-actions/actions/send-email/SendEmailModal.tsx +114 -17
- package/src/components/order-view/order-actions/actions/send-sms/SendSmsModal.tsx +115 -7
- package/src/components/order-view/order-actions/actions/split-order/index.tsx +14 -4
- package/src/components/order-view/order-actions/actions/uncancel-order/UncancelOrder.tsx +176 -87
- package/src/components/order-view/order-actions/actions/uncancel-order/UncancelOrderTable.tsx +352 -0
- package/src/components/order-view/order-actions/actions/unhold-order/UnholdOrder.tsx +35 -59
- package/src/components/order-view/order-actions/index.tsx +237 -22
- package/src/components/order-view/order-actions/store.ts +50 -48
- package/src/components/order-view/order-actions/types.ts +40 -65
- package/src/components/order-view/order-actions/utils.ts +15 -8
- package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactEmail.tsx +2 -1
- package/src/components/order-view/order-details/expanded-content/footer/index.tsx +80 -39
- package/src/components/order-view/order-details/expanded-content/orders-section/Carrier.tsx +10 -14
- package/src/components/order-view/order-details/expanded-content/orders-section/DeliveryDate.tsx +10 -1
- package/src/components/order-view/order-details/expanded-content/orders-section/ScheduleAfter.tsx +2 -1
- package/src/components/order-view/products-info/expanded-content/index.tsx +3 -2
- package/src/components/order-view/products-info/index.tsx +14 -11
- package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +26 -24
- package/src/components/order-view/store.ts +59 -2
- package/src/components/order-view/system-event-logs/columns/Date.tsx +4 -2
- package/src/components/order-view/system-event-logs/columns/Event.tsx +9 -9
- package/src/components/order-view/system-event-logs/columns/Note.tsx +1 -1
- package/src/components/order-view/system-event-logs/expanded-content/index.tsx +25 -25
- package/src/components/order-view/types.ts +13 -0
- package/src/components/order-view/utils.ts +4 -0
- package/src/components/order-view/view-reminder/AssigneeDropdown.tsx +183 -12
- package/src/components/order-view/view-reminder/ViewReminder.tsx +234 -143
- package/src/components/order-view/view-reminder/reminder-styles.tsx +14 -8
- package/src/components/store.ts +6 -0
- package/src/index.tsx +28 -18
|
@@ -1,32 +1,100 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AntSelect } from '@bjsdistribution/dms-component-library';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { AntSelect, useAxios } from '@bjsdistribution/dms-component-library';
|
|
3
3
|
import OrderActionModal from '../../../../../common/modals/order-action-modal/OrderActionModal';
|
|
4
4
|
import { ContentContainer, Label, Row, SplitLayout } from '../modalstyle';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import {
|
|
6
|
+
useCurrentAction,
|
|
7
|
+
useCustomerData,
|
|
8
|
+
useOrderDetails,
|
|
9
|
+
useOrderId,
|
|
10
|
+
} from '../../../store';
|
|
11
|
+
import { Input, notification } from 'antd';
|
|
12
|
+
import { ApiResponse } from '../../../types';
|
|
13
|
+
interface IProps {
|
|
14
|
+
callOrdersApi?: any;
|
|
15
|
+
}
|
|
8
16
|
|
|
9
|
-
function ChangeCustomerAccModal() {
|
|
17
|
+
function ChangeCustomerAccModal(props: IProps) {
|
|
18
|
+
const [orderId] = useOrderId();
|
|
19
|
+
const [customerData] = useCustomerData();
|
|
10
20
|
const [, setCurrentAction] = useCurrentAction();
|
|
21
|
+
const [orderDetails] = useOrderDetails();
|
|
22
|
+
const [selectedCustomerId, setSelectedCustomerId] = useState<any>(
|
|
23
|
+
orderDetails?.customer_id ?? null
|
|
24
|
+
);
|
|
25
|
+
const [tradingName, setTradingName] = useState<string>(
|
|
26
|
+
orderDetails?.trading_name || ''
|
|
27
|
+
);
|
|
28
|
+
const orderRecipient = orderDetails?.order_recipient;
|
|
29
|
+
const infoText = `${orderRecipient?.recipient_name}, ${orderRecipient?.postcode}`;
|
|
30
|
+
const closeModal = () => setCurrentAction(undefined);
|
|
31
|
+
|
|
32
|
+
const customerMappedData = customerData?.map((customer: any) => ({
|
|
33
|
+
label: customer?.customer_name,
|
|
34
|
+
value: customer?.id,
|
|
35
|
+
}));
|
|
36
|
+
|
|
37
|
+
const { fetchData } = useAxios<{
|
|
38
|
+
data: ApiResponse[];
|
|
39
|
+
}>({
|
|
40
|
+
endpoint: `/orders/change_customer_account`,
|
|
41
|
+
method: 'PUT',
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const handleChangeAcc = async () => {
|
|
45
|
+
if (selectedCustomerId == null || !tradingName?.trim()) {
|
|
46
|
+
notification.warning({
|
|
47
|
+
message: 'Validation Error',
|
|
48
|
+
description: 'Please select a customer and enter a trading name.',
|
|
49
|
+
});
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
11
52
|
|
|
12
|
-
|
|
13
|
-
|
|
53
|
+
try {
|
|
54
|
+
const payload = [
|
|
55
|
+
{
|
|
56
|
+
order_id: +orderId,
|
|
57
|
+
customer_id: +selectedCustomerId,
|
|
58
|
+
trading_name: tradingName,
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
const response = (await fetchData({ payload })) as {
|
|
62
|
+
code: number | null;
|
|
63
|
+
error?: string | null | undefined;
|
|
64
|
+
[key: string]: any;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
if (response?.code === 200) {
|
|
68
|
+
notification.success({
|
|
69
|
+
message: 'Success',
|
|
70
|
+
description: `${response.message}`,
|
|
71
|
+
});
|
|
72
|
+
await props?.callOrdersApi();
|
|
73
|
+
closeModal();
|
|
74
|
+
}
|
|
75
|
+
} catch {
|
|
76
|
+
notification.error({
|
|
77
|
+
message: 'Error',
|
|
78
|
+
description: 'Something went wrong while saving.',
|
|
79
|
+
});
|
|
80
|
+
}
|
|
14
81
|
};
|
|
15
82
|
|
|
16
|
-
const handleSelectChange = () => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
83
|
+
const handleSelectChange = (value: string) => {
|
|
84
|
+
setSelectedCustomerId(+value);
|
|
85
|
+
const selected = customerMappedData?.find(c => c?.value === +value);
|
|
86
|
+
if (selected) {
|
|
87
|
+
setSelectedCustomerId(selected?.value);
|
|
88
|
+
}
|
|
22
89
|
};
|
|
90
|
+
|
|
23
91
|
return (
|
|
24
92
|
<OrderActionModal
|
|
25
93
|
headerTitle="Change customer account"
|
|
26
94
|
onCloseHeader={closeModal}
|
|
27
|
-
onSubmit={
|
|
95
|
+
onSubmit={handleChangeAcc}
|
|
28
96
|
showAdditionalInfo
|
|
29
|
-
infoText=
|
|
97
|
+
infoText={infoText}
|
|
30
98
|
submitBtnTitle="Save Details"
|
|
31
99
|
>
|
|
32
100
|
<ContentContainer>
|
|
@@ -34,29 +102,24 @@ function ChangeCustomerAccModal() {
|
|
|
34
102
|
<Row>
|
|
35
103
|
<Label>New Customer</Label>
|
|
36
104
|
<AntSelect
|
|
37
|
-
options={
|
|
105
|
+
options={customerMappedData}
|
|
38
106
|
placeholder="Select Customer"
|
|
39
107
|
onChange={handleSelectChange}
|
|
40
|
-
disabled={false}
|
|
41
108
|
style={{ width: '22vw', height: 40 }}
|
|
42
|
-
showSearch
|
|
43
|
-
popupClassName=
|
|
44
|
-
selectWrapperClass=
|
|
45
|
-
|
|
109
|
+
showSearch
|
|
110
|
+
popupClassName="dropDownStyle"
|
|
111
|
+
selectWrapperClass="rounded"
|
|
112
|
+
defaultValue={selectedCustomerId}
|
|
113
|
+
/>
|
|
46
114
|
</Row>
|
|
47
115
|
|
|
48
116
|
<Row>
|
|
49
117
|
<Label>New Trading Name</Label>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
onChange={
|
|
54
|
-
|
|
55
|
-
style={{ width: '22vw', height: 40 }}
|
|
56
|
-
showSearch={true}
|
|
57
|
-
popupClassName={'dropDownStyle'}
|
|
58
|
-
selectWrapperClass={'rounded'}
|
|
59
|
-
></AntSelect>
|
|
118
|
+
<Input
|
|
119
|
+
style={{ borderRadius: '15px', minWidth: '22vw' }}
|
|
120
|
+
value={tradingName}
|
|
121
|
+
onChange={e => setTradingName(e.target.value)}
|
|
122
|
+
/>
|
|
60
123
|
</Row>
|
|
61
124
|
</SplitLayout>
|
|
62
125
|
</ContentContainer>
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { useAxios } from '@bjsdistribution/dms-component-library';
|
|
3
|
+
import {
|
|
4
|
+
useCurrentAction,
|
|
5
|
+
useCustomerInfo,
|
|
6
|
+
useOrderDetails,
|
|
7
|
+
} from '../../../store';
|
|
8
|
+
import { ApiResponse } from '../../../types';
|
|
9
|
+
import OrderActionModal from '../../../../../common/modals/order-action-modal/OrderActionModal';
|
|
10
|
+
import { Empty, Skeleton } from 'antd';
|
|
11
|
+
|
|
12
|
+
import styled from 'styled-components';
|
|
13
|
+
|
|
14
|
+
function ChargeLog() {
|
|
15
|
+
const [, setCurrentAction] = useCurrentAction();
|
|
16
|
+
const [customerInfo] = useCustomerInfo();
|
|
17
|
+
const infoText = `${customerInfo?.recipient_name}, ${customerInfo?.postcode}`;
|
|
18
|
+
const [orderDetails] = useOrderDetails();
|
|
19
|
+
|
|
20
|
+
const closeModal = () => {
|
|
21
|
+
setCurrentAction(undefined);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const { data: fetchedData, loading, fetchData } = useAxios<{
|
|
25
|
+
data: ApiResponse[];
|
|
26
|
+
}>({
|
|
27
|
+
endpoint: `/invoices/charge-logs/?order_id=${orderDetails?.id}`,
|
|
28
|
+
method: 'GET',
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
fetchData();
|
|
33
|
+
}, []);
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<OrderActionModal
|
|
37
|
+
headerTitle="Charges For"
|
|
38
|
+
onCloseHeader={closeModal}
|
|
39
|
+
onSubmit={closeModal}
|
|
40
|
+
submitBtnTitle="Close"
|
|
41
|
+
showAdditionalInfo
|
|
42
|
+
infoText={infoText}
|
|
43
|
+
>
|
|
44
|
+
<StyledTableWrapper>
|
|
45
|
+
<StyledTable className="scrollClass">
|
|
46
|
+
<thead>
|
|
47
|
+
<tr>
|
|
48
|
+
<th>Date</th>
|
|
49
|
+
<th>Description</th>
|
|
50
|
+
<th>Amount</th>
|
|
51
|
+
<th>Status</th>
|
|
52
|
+
</tr>
|
|
53
|
+
</thead>
|
|
54
|
+
<tbody>
|
|
55
|
+
{loading ? (
|
|
56
|
+
<tr>
|
|
57
|
+
<td colSpan={6}>
|
|
58
|
+
<Skeleton active />
|
|
59
|
+
</td>
|
|
60
|
+
<td colSpan={6}></td>
|
|
61
|
+
</tr>
|
|
62
|
+
) : fetchedData?.data?.length === 0 ? (
|
|
63
|
+
<tr>
|
|
64
|
+
<td className="emptyTd" colSpan={7}>
|
|
65
|
+
<EmptyDataContainer>
|
|
66
|
+
<Empty />
|
|
67
|
+
</EmptyDataContainer>
|
|
68
|
+
</td>
|
|
69
|
+
</tr>
|
|
70
|
+
) : (
|
|
71
|
+
fetchedData?.data?.map((order: any) => {
|
|
72
|
+
const label = order?.status?.split(':')[0];
|
|
73
|
+
const val = order?.status?.split(':')[1];
|
|
74
|
+
return (
|
|
75
|
+
<tr>
|
|
76
|
+
<td>{order?.date}</td>
|
|
77
|
+
<td>{order?.description}</td>
|
|
78
|
+
<td>{order?.amount}</td>
|
|
79
|
+
<td>
|
|
80
|
+
<div
|
|
81
|
+
style={{
|
|
82
|
+
display: 'flex',
|
|
83
|
+
alignItems: 'center',
|
|
84
|
+
gap: '5px',
|
|
85
|
+
}}
|
|
86
|
+
>
|
|
87
|
+
{label}: <Value>{val}</Value>
|
|
88
|
+
</div>
|
|
89
|
+
</td>
|
|
90
|
+
</tr>
|
|
91
|
+
);
|
|
92
|
+
})
|
|
93
|
+
)}
|
|
94
|
+
</tbody>
|
|
95
|
+
</StyledTable>
|
|
96
|
+
</StyledTableWrapper>
|
|
97
|
+
</OrderActionModal>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
// Styled components
|
|
101
|
+
export const StyledTableWrapper = styled.div`
|
|
102
|
+
overflow-x: auto;
|
|
103
|
+
max-height: calc(100vh - 290px);
|
|
104
|
+
scrollbar-width: none;
|
|
105
|
+
width: 100%;
|
|
106
|
+
/* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */
|
|
107
|
+
&::-webkit-scrollbar {
|
|
108
|
+
width: 5px;
|
|
109
|
+
border-radius: 100px;
|
|
110
|
+
height: 5px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&::-webkit-scrollbar-track {
|
|
114
|
+
background: #777;
|
|
115
|
+
border-radius: 100px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&::-webkit-scrollbar-thumb {
|
|
119
|
+
background: #7b61ff;
|
|
120
|
+
border-radius: 100px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
124
|
+
background: #7b61ff;
|
|
125
|
+
}
|
|
126
|
+
`;
|
|
127
|
+
|
|
128
|
+
export const StyledTable = styled.table`
|
|
129
|
+
border-spacing: 0 10px;
|
|
130
|
+
width: 100%;
|
|
131
|
+
padding: 10px;
|
|
132
|
+
thead {
|
|
133
|
+
tr {
|
|
134
|
+
border-radius: 40px;
|
|
135
|
+
border-spacing: 0 10px;
|
|
136
|
+
th {
|
|
137
|
+
color: #3a3630;
|
|
138
|
+
font-size: 14px;
|
|
139
|
+
font-style: normal;
|
|
140
|
+
font-weight: 600;
|
|
141
|
+
line-height: normal;
|
|
142
|
+
padding: 5px 15px;
|
|
143
|
+
background: #f0f2f2;
|
|
144
|
+
border-right: none;
|
|
145
|
+
border-left: none;
|
|
146
|
+
text-align: left;
|
|
147
|
+
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
148
|
+
border-width: 1px 0;
|
|
149
|
+
text-transform: capitalize;
|
|
150
|
+
&:first-child {
|
|
151
|
+
border-radius: 100px 0 0 100px;
|
|
152
|
+
border-left: 1px solid rgba(0, 0, 0, 0.08);
|
|
153
|
+
}
|
|
154
|
+
&:last-child {
|
|
155
|
+
border-radius: 0px 100px 100px 0;
|
|
156
|
+
border-right: 1px solid rgba(0, 0, 0, 0.08);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
tbody {
|
|
162
|
+
tr {
|
|
163
|
+
td {
|
|
164
|
+
color: #3a3630;
|
|
165
|
+
font-size: 13px;
|
|
166
|
+
font-style: normal;
|
|
167
|
+
font-weight: 400;
|
|
168
|
+
line-height: normal;
|
|
169
|
+
padding: 12px 15px;
|
|
170
|
+
background: #fff;
|
|
171
|
+
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
172
|
+
border-right: none;
|
|
173
|
+
border-left: none;
|
|
174
|
+
}
|
|
175
|
+
.link {
|
|
176
|
+
color: #09f;
|
|
177
|
+
font-family: Roboto;
|
|
178
|
+
font-weight: 400;
|
|
179
|
+
.linkHover {
|
|
180
|
+
cursor: pointer;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
td {
|
|
184
|
+
.flex {
|
|
185
|
+
display: flex;
|
|
186
|
+
gap: 4px;
|
|
187
|
+
align-items: center;
|
|
188
|
+
}
|
|
189
|
+
.overDue {
|
|
190
|
+
border-radius: 20px;
|
|
191
|
+
border: 1px solid #edebe8;
|
|
192
|
+
background: #fff;
|
|
193
|
+
padding: 4px 8px;
|
|
194
|
+
color: #e95252;
|
|
195
|
+
font-size: 12px;
|
|
196
|
+
font-style: normal;
|
|
197
|
+
font-weight: 600;
|
|
198
|
+
line-height: 16px;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
&:nth-child(even) td {
|
|
202
|
+
background: #f6fbff;
|
|
203
|
+
}
|
|
204
|
+
td:first-child {
|
|
205
|
+
border-radius: 100px 0 0 100px;
|
|
206
|
+
border-left: 1px solid rgba(0, 0, 0, 0.08);
|
|
207
|
+
}
|
|
208
|
+
td:last-child {
|
|
209
|
+
border-radius: 0px 100px 100px 0;
|
|
210
|
+
border-right: 1px solid rgba(0, 0, 0, 0.08);
|
|
211
|
+
}
|
|
212
|
+
.emptyTd {
|
|
213
|
+
border-radius: 100px !important;
|
|
214
|
+
}
|
|
215
|
+
.flex {
|
|
216
|
+
display: flex;
|
|
217
|
+
flex-direction: row;
|
|
218
|
+
gap: 5px;
|
|
219
|
+
height: 29px;
|
|
220
|
+
align-items: center;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
&.insideTable {
|
|
224
|
+
td {
|
|
225
|
+
border-radius: 0;
|
|
226
|
+
border: none;
|
|
227
|
+
&:last-child {
|
|
228
|
+
border-radius: 0;
|
|
229
|
+
border-right: none;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
table {
|
|
233
|
+
border-spacing: 0;
|
|
234
|
+
width: 100%;
|
|
235
|
+
border-radius: 5px;
|
|
236
|
+
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
237
|
+
overflow: hidden;
|
|
238
|
+
border-top-left-radius: 15px;
|
|
239
|
+
border-top-right-radius: 15px;
|
|
240
|
+
thead {
|
|
241
|
+
tr {
|
|
242
|
+
border-bottom: none;
|
|
243
|
+
th {
|
|
244
|
+
padding: 14px 20px;
|
|
245
|
+
text-align: left;
|
|
246
|
+
border-top: 0;
|
|
247
|
+
border-right: 0;
|
|
248
|
+
border-left: 0;
|
|
249
|
+
background: #f8fafc;
|
|
250
|
+
&:first-child {
|
|
251
|
+
border-radius: 0;
|
|
252
|
+
border-left: 1px solid rgba(0, 0, 0, 0.08);
|
|
253
|
+
border-top-left-radius: 15px;
|
|
254
|
+
}
|
|
255
|
+
&:last-child {
|
|
256
|
+
border-radius: 0;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
tbody {
|
|
262
|
+
tr {
|
|
263
|
+
td {
|
|
264
|
+
padding: 14px 20px;
|
|
265
|
+
text-align: left;
|
|
266
|
+
border-bottom: 1px solid rgba(58, 54, 48, 0.15);
|
|
267
|
+
background: #fff;
|
|
268
|
+
> svg {
|
|
269
|
+
transform: scale(1.5);
|
|
270
|
+
background-color: #edebe8;
|
|
271
|
+
border-radius: 20px;
|
|
272
|
+
padding: 5px;
|
|
273
|
+
}
|
|
274
|
+
&:last-child {
|
|
275
|
+
border-radius: 0;
|
|
276
|
+
border-right: none;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
.actions {
|
|
286
|
+
display: flex;
|
|
287
|
+
align-items: center;
|
|
288
|
+
gap: 20px;
|
|
289
|
+
> svg {
|
|
290
|
+
transform: scale(1.5);
|
|
291
|
+
background-color: #edebe8;
|
|
292
|
+
border-radius: 20px;
|
|
293
|
+
padding: 5px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.close-icon {
|
|
297
|
+
transform: scale(1.3);
|
|
298
|
+
background-color: transparent;
|
|
299
|
+
border-radius: 0;
|
|
300
|
+
padding: 0;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
`;
|
|
304
|
+
|
|
305
|
+
export const EmptyDataContainer = styled.div`
|
|
306
|
+
display: flex;
|
|
307
|
+
justify-content: center;
|
|
308
|
+
`;
|
|
309
|
+
|
|
310
|
+
export const Badge = styled.div`
|
|
311
|
+
div {
|
|
312
|
+
display: flex;
|
|
313
|
+
min-width: 85px;
|
|
314
|
+
padding: 6px 10px;
|
|
315
|
+
justify-content: center;
|
|
316
|
+
align-items: center;
|
|
317
|
+
gap: 5px;
|
|
318
|
+
border-radius: 22px;
|
|
319
|
+
font-family: 'Open Sans';
|
|
320
|
+
font-size: 12px;
|
|
321
|
+
font-style: normal;
|
|
322
|
+
font-weight: 600;
|
|
323
|
+
line-height: normal;
|
|
324
|
+
}
|
|
325
|
+
`;
|
|
326
|
+
|
|
327
|
+
export const BadgeStatus = styled.div`
|
|
328
|
+
&.pending {
|
|
329
|
+
background: #fff1d6;
|
|
330
|
+
color: #f4a503;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
&.resolved {
|
|
334
|
+
background: rgba(41, 204, 106, 0.15);
|
|
335
|
+
color: #1f9254;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
&.overdue {
|
|
339
|
+
background: rgba(233, 82, 82, 0.15);
|
|
340
|
+
color: var(--contextual-red, #e95252);
|
|
341
|
+
}
|
|
342
|
+
`;
|
|
343
|
+
|
|
344
|
+
export const ClearAll = styled.div`
|
|
345
|
+
border-radius: 20px;
|
|
346
|
+
border: 1px solid #edebe8;
|
|
347
|
+
background: #fff;
|
|
348
|
+
display: flex;
|
|
349
|
+
padding: 6px 6px;
|
|
350
|
+
justify-content: center;
|
|
351
|
+
align-items: center;
|
|
352
|
+
gap: 8px;
|
|
353
|
+
cursor: pointer;
|
|
354
|
+
|
|
355
|
+
&.active {
|
|
356
|
+
background: #313130;
|
|
357
|
+
& > div {
|
|
358
|
+
color: #fff;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
`;
|
|
362
|
+
export const StyledFilterBtnIcon = styled.div`
|
|
363
|
+
display: flex;
|
|
364
|
+
width: 24px;
|
|
365
|
+
height: 24px;
|
|
366
|
+
justify-content: center;
|
|
367
|
+
align-items: center;
|
|
368
|
+
border-radius: 20px;
|
|
369
|
+
border: 1px solid #e2e0db;
|
|
370
|
+
background: #f1f5f6;
|
|
371
|
+
.cross {
|
|
372
|
+
position: relative;
|
|
373
|
+
&:after {
|
|
374
|
+
display: inline-block;
|
|
375
|
+
content: 'X';
|
|
376
|
+
font-style: normal;
|
|
377
|
+
font-size: 14px;
|
|
378
|
+
color: #000;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
`;
|
|
382
|
+
export const StyledFilterBtnLabel = styled.div`
|
|
383
|
+
color: #6a7378;
|
|
384
|
+
font-size: 13px;
|
|
385
|
+
font-style: normal;
|
|
386
|
+
font-weight: 400;
|
|
387
|
+
line-height: 16px;
|
|
388
|
+
white-space: nowrap;
|
|
389
|
+
`;
|
|
390
|
+
|
|
391
|
+
export default ChargeLog;
|
|
392
|
+
|
|
393
|
+
const Value = styled.span`
|
|
394
|
+
color: #29cc6a;
|
|
395
|
+
`;
|
package/src/components/order-view/order-actions/actions/clear-booking-status/ClearBookingStatus.tsx
CHANGED
|
@@ -44,7 +44,7 @@ const ClearBookingStatus = () => {
|
|
|
44
44
|
|
|
45
45
|
useEffect(() => {
|
|
46
46
|
setLoading(loading);
|
|
47
|
-
if (fetchedData && fetchedData
|
|
47
|
+
if (fetchedData && fetchedData?.data) {
|
|
48
48
|
const requiredData = fetchedData?.data;
|
|
49
49
|
setOrderDetails(requiredData[0]);
|
|
50
50
|
setPrevOrderDetails(requiredData[0]);
|
|
@@ -1,38 +1,55 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import { useOrderStaticData } from '../../../../store';
|
|
2
|
+
import { useOrderStaticData, useSelectionAction } from '../../../../store';
|
|
4
3
|
import { capitalize } from '../../../../utils';
|
|
4
|
+
import { Select } from 'antd';
|
|
5
|
+
import { Label } from '@bjsdistribution/dms-component-library';
|
|
6
|
+
import styled from 'styled-components';
|
|
5
7
|
|
|
6
8
|
function ActionDropdown() {
|
|
7
9
|
const [orderStaticData] = useOrderStaticData();
|
|
8
|
-
const [actionTypeOptions, setActionTypeOptions] = useState<any
|
|
10
|
+
const [actionTypeOptions, setActionTypeOptions] = useState<any>([]);
|
|
11
|
+
const [selectedAction, setSelectedAction] = useSelectionAction();
|
|
9
12
|
|
|
10
13
|
useEffect(() => {
|
|
11
14
|
if (orderStaticData) {
|
|
12
15
|
const options = orderStaticData?.order_contact_action_type?.map(
|
|
13
16
|
(option: any) => ({
|
|
14
|
-
label: capitalize(option
|
|
15
|
-
value: option
|
|
17
|
+
label: capitalize(option?.type?.replaceAll('_', ' ')), // Display text
|
|
18
|
+
value: option?.type,
|
|
16
19
|
})
|
|
17
20
|
);
|
|
18
21
|
setActionTypeOptions(options);
|
|
22
|
+
|
|
23
|
+
if (options?.length > 0 && !selectedAction) {
|
|
24
|
+
setSelectedAction(options[0]?.value);
|
|
25
|
+
}
|
|
19
26
|
}
|
|
20
27
|
}, [orderStaticData]);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
const onSelect = (value: any) => {
|
|
29
|
+
setSelectedAction(value);
|
|
30
|
+
};
|
|
24
31
|
|
|
25
32
|
return (
|
|
26
|
-
<
|
|
27
|
-
label="Action"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
<Container>
|
|
34
|
+
<Label label="Action" />
|
|
35
|
+
<Select
|
|
36
|
+
style={{ minWidth: '260px' }}
|
|
37
|
+
placeholder="Select Action"
|
|
38
|
+
options={actionTypeOptions}
|
|
39
|
+
value={selectedAction || undefined}
|
|
40
|
+
onChange={onSelect}
|
|
41
|
+
className="action-dropdown"
|
|
42
|
+
/>
|
|
43
|
+
</Container>
|
|
35
44
|
);
|
|
36
45
|
}
|
|
37
46
|
|
|
47
|
+
const Container = styled.div`
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
.ant-select-selector {
|
|
51
|
+
border-radius: 25px;
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
|
|
38
55
|
export default ActionDropdown;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { Input } from 'antd';
|
|
4
|
-
|
|
5
|
-
import { handleKeyDown } from '../../../../utils';
|
|
6
4
|
import {
|
|
7
5
|
useErrorConfirmOrder,
|
|
8
6
|
useOrderDetailsConfirmOrder,
|
|
9
|
-
} from '
|
|
7
|
+
} from '../../../../store';
|
|
8
|
+
import { handleKeyDown } from '../../../../utils';
|
|
10
9
|
|
|
11
10
|
function ContactMobile() {
|
|
12
11
|
const [orderDetails, setOrderDetails] = useOrderDetailsConfirmOrder();
|
package/src/components/order-view/order-actions/actions/confirm-order/customer-info/ContactPhone.tsx
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { Input } from 'antd';
|
|
4
|
-
|
|
5
|
-
import { handleKeyDown } from '../../../../utils';
|
|
6
4
|
import {
|
|
7
5
|
useErrorConfirmOrder,
|
|
8
6
|
useOrderDetailsConfirmOrder,
|
|
9
|
-
} from '
|
|
7
|
+
} from '../../../../store';
|
|
8
|
+
import { handleKeyDown } from '../../../../utils';
|
|
10
9
|
|
|
11
10
|
function ContactPhone() {
|
|
12
11
|
const [orderDetails, setOrderDetails] = useOrderDetailsConfirmOrder();
|
package/src/components/order-view/order-actions/actions/confirm-order/customer-info/ContactWork.tsx
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { Input } from 'antd';
|
|
4
|
-
|
|
5
|
-
import { handleKeyDown } from '../../../../utils';
|
|
6
4
|
import {
|
|
7
5
|
useErrorConfirmOrder,
|
|
8
6
|
useOrderDetailsConfirmOrder,
|
|
9
|
-
} from '
|
|
7
|
+
} from '../../../../store';
|
|
8
|
+
import { handleKeyDown } from '../../../../utils';
|
|
10
9
|
|
|
11
10
|
function ContactWork() {
|
|
12
11
|
const [orderDetails, setOrderDetails] = useOrderDetailsConfirmOrder();
|