@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
|
@@ -62,24 +62,26 @@ const CreateReturnModal = () => {
|
|
|
62
62
|
/>
|
|
63
63
|
<Container>
|
|
64
64
|
<ul style={{ listStyle: 'none', padding: 0 }}>
|
|
65
|
-
{uniqueLocations?.map((returnLoc: any) =>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
65
|
+
{uniqueLocations?.map((returnLoc: any) => {
|
|
66
|
+
return (
|
|
67
|
+
<li
|
|
68
|
+
key={returnLoc.id}
|
|
69
|
+
style={{
|
|
70
|
+
marginBottom: '8px',
|
|
71
|
+
display: 'flex',
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
}}
|
|
74
|
+
>
|
|
75
|
+
<Checkbox
|
|
76
|
+
checked={selectedlocation?.includes(returnLoc.id)}
|
|
77
|
+
onChange={() => handleSelectLocations(returnLoc.id)}
|
|
78
|
+
/>
|
|
79
|
+
<StyledText style={{ marginLeft: '8px' }}>
|
|
80
|
+
{displayValueOrNA(returnLoc?.return_location_name)}
|
|
81
|
+
</StyledText>
|
|
82
|
+
</li>
|
|
83
|
+
);
|
|
84
|
+
})}
|
|
83
85
|
</ul>
|
|
84
86
|
</Container>
|
|
85
87
|
</Wrapper>
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { AntModal, useApiHook } from '@bjsdistribution/dms-component-library';
|
|
3
3
|
import { useAtom } from 'jotai';
|
|
4
|
-
import {
|
|
5
|
-
countReducerAtom,
|
|
6
|
-
useDeleteProdsID,
|
|
7
|
-
usefetchAgain,
|
|
8
|
-
useProductDetails,
|
|
9
|
-
} from '../store';
|
|
4
|
+
import { countReducerAtom, useDeleteProdsID, usefetchAgain } from '../store';
|
|
10
5
|
|
|
11
6
|
import DefectsModal from './DefectsModal';
|
|
12
7
|
import { ApiResponse } from '../types';
|
|
@@ -25,7 +20,6 @@ import { useNavigate } from 'react-router-dom';
|
|
|
25
20
|
|
|
26
21
|
const ModalManager = () => {
|
|
27
22
|
const [popupName, dispatch] = useAtom(countReducerAtom);
|
|
28
|
-
const [,] = useProductDetails();
|
|
29
23
|
const [selectedRows] = useDeleteProdsID();
|
|
30
24
|
const [, setIsFormValid] = useState(false);
|
|
31
25
|
const [newGrouped] = useFinalPayload();
|
|
@@ -60,7 +54,7 @@ const ModalManager = () => {
|
|
|
60
54
|
} = useApiHook<{
|
|
61
55
|
data: ApiResponse[];
|
|
62
56
|
}>({
|
|
63
|
-
endpoint:
|
|
57
|
+
endpoint: `/v1/return/create/`,
|
|
64
58
|
method: 'POST',
|
|
65
59
|
body: newGrouped,
|
|
66
60
|
performAction: false,
|
|
@@ -96,7 +90,7 @@ const ModalManager = () => {
|
|
|
96
90
|
setShouldPerformAction(false);
|
|
97
91
|
setError(null);
|
|
98
92
|
// @ts-ignore
|
|
99
|
-
} else if (response?.code === 200) {
|
|
93
|
+
} else if (response?.code === 201 || response?.code === 200) {
|
|
100
94
|
notification.success({
|
|
101
95
|
message: 'Success',
|
|
102
96
|
// @ts-ignore
|
|
@@ -111,7 +105,7 @@ const ModalManager = () => {
|
|
|
111
105
|
setError(null);
|
|
112
106
|
|
|
113
107
|
// for local
|
|
114
|
-
// navigate('/
|
|
108
|
+
// navigate('/overview');
|
|
115
109
|
|
|
116
110
|
// for dev
|
|
117
111
|
navigate('/orders/view/return/overview');
|
|
@@ -22,10 +22,9 @@ const NewReturnDropdown = () => {
|
|
|
22
22
|
const [orderId] = useOrderId();
|
|
23
23
|
|
|
24
24
|
const id = orderData?.customer_id;
|
|
25
|
-
|
|
26
25
|
useEffect(() => {
|
|
27
26
|
const allProductIds =
|
|
28
|
-
productData?.map((product: any) => product
|
|
27
|
+
productData?.map((product: any) => product?.return_location) || [];
|
|
29
28
|
setId(allProductIds);
|
|
30
29
|
}, [productData]);
|
|
31
30
|
|
|
@@ -47,9 +46,9 @@ const NewReturnDropdown = () => {
|
|
|
47
46
|
const { data: fetchedReturnOrderData, setShouldPerformAction } = useApiHook<
|
|
48
47
|
ApiResponse
|
|
49
48
|
>({
|
|
50
|
-
endpoint: '/
|
|
49
|
+
endpoint: '/v1/return/orders/',
|
|
51
50
|
method: 'GET',
|
|
52
|
-
filters,
|
|
51
|
+
filters: filters && filters?.length > 0 ? filters : undefined,
|
|
53
52
|
//@ts-ignore
|
|
54
53
|
pagination: { is_pagination: false },
|
|
55
54
|
performAction: false,
|
|
@@ -80,10 +79,9 @@ const NewReturnDropdown = () => {
|
|
|
80
79
|
const handleDropdownChange = (value: string) => {
|
|
81
80
|
setSelectedOrderId(value);
|
|
82
81
|
};
|
|
83
|
-
|
|
84
82
|
const dropdownOptions = returnOrderData?.map((order: any) => ({
|
|
85
|
-
label: `${order
|
|
86
|
-
value: order
|
|
83
|
+
label: `${order?.recipient_name} - ${order?.postcode}`,
|
|
84
|
+
value: order?.id,
|
|
87
85
|
}));
|
|
88
86
|
|
|
89
87
|
return (
|
|
@@ -5,9 +5,10 @@ import { useFlagRefId } from '../order-actions/store';
|
|
|
5
5
|
import { useCurrentAction } from '../store';
|
|
6
6
|
import { formatDate } from '../order-actions/utils';
|
|
7
7
|
|
|
8
|
-
function FlagTemplate({ data }: any) {
|
|
8
|
+
function FlagTemplate({ data, dismissFlags }: any) {
|
|
9
9
|
const [, setSelectedFlag] = useFlagRefId();
|
|
10
10
|
const [, setCurrentAction] = useCurrentAction();
|
|
11
|
+
|
|
11
12
|
const openModal = () => {
|
|
12
13
|
setCurrentAction('view-flag');
|
|
13
14
|
};
|
|
@@ -16,20 +17,20 @@ function FlagTemplate({ data }: any) {
|
|
|
16
17
|
openModal();
|
|
17
18
|
};
|
|
18
19
|
|
|
19
|
-
const titleColor = data
|
|
20
|
+
const titleColor = data?.status === 'SD' ? '#36A053' : '#3a3630';
|
|
20
21
|
return (
|
|
21
22
|
<StyledAlert>
|
|
22
23
|
<FlagAlert
|
|
23
|
-
type={data?.
|
|
24
|
+
type={data?.status === 'AD' ? 'info' : 'success'}
|
|
24
25
|
title={
|
|
25
26
|
<>
|
|
26
27
|
<StyledTitle color={titleColor}>
|
|
27
28
|
Flag : {data?.is_private ? 'Private' : ''}{' '}
|
|
28
29
|
<StyledLink onClick={() => handleClick(data.id)}>
|
|
29
|
-
{data?.id} - {data?.
|
|
30
|
+
{data?.id} - {data?.flag_type}{' '}
|
|
30
31
|
</StyledLink>{' '}
|
|
31
|
-
{data
|
|
32
|
-
{data
|
|
32
|
+
{data?.status === 'AD' ? 'Unresolved' : 'Resolved on'}{' '}
|
|
33
|
+
{data?.status == 'SD' ? (
|
|
33
34
|
<>
|
|
34
35
|
{formatDate(data?.resolved_at)} by {data?.resolved_by}{' '}
|
|
35
36
|
</>
|
|
@@ -40,7 +41,7 @@ function FlagTemplate({ data }: any) {
|
|
|
40
41
|
subtitle=""
|
|
41
42
|
description={`${data?.description}`}
|
|
42
43
|
showOkButton={false}
|
|
43
|
-
onClose={() =>
|
|
44
|
+
onClose={() => dismissFlags(data?.id)}
|
|
44
45
|
/>
|
|
45
46
|
</StyledAlert>
|
|
46
47
|
);
|
|
@@ -56,7 +57,6 @@ const StyledLink = styled.span`
|
|
|
56
57
|
font-size: 14px;
|
|
57
58
|
font-style: normal;
|
|
58
59
|
font-weight: 600;
|
|
59
|
-
cursor: pointer;
|
|
60
60
|
`;
|
|
61
61
|
|
|
62
62
|
const StyledTitle = styled.span<{ color: string }>`
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { FlagAlert } from '@bjsdistribution/dms-component-library';
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import {
|
|
5
|
-
useAllOrderStatus,
|
|
6
|
-
useOrderNotify,
|
|
7
|
-
useRouteDetails,
|
|
8
|
-
} from '../order-actions/store';
|
|
9
|
-
import { format } from 'date-fns';
|
|
4
|
+
import { useOrderNotify } from '../order-actions/store';
|
|
10
5
|
import { useOrderStaticData } from '../store';
|
|
11
6
|
|
|
12
|
-
function OrderTemplate({ orderDetails }: any) {
|
|
13
|
-
const [routeData] = useRouteDetails();
|
|
7
|
+
function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
14
8
|
const [, setOrderCount] = useOrderNotify();
|
|
15
|
-
const [statusVal] = useAllOrderStatus();
|
|
16
9
|
const precall = false;
|
|
17
10
|
const [orderStaticData] = useOrderStaticData();
|
|
11
|
+
const statusVal = routeInfoData?.status_value;
|
|
18
12
|
|
|
19
13
|
const unholdReasons = orderStaticData?.cancellation_reasons?.map(
|
|
20
14
|
(x: any) => ({
|
|
@@ -43,18 +37,9 @@ function OrderTemplate({ orderDetails }: any) {
|
|
|
43
37
|
isEnroute: true,
|
|
44
38
|
isPreCall: true,
|
|
45
39
|
isConfirmed: true,
|
|
40
|
+
isPostcode: true,
|
|
46
41
|
});
|
|
47
42
|
|
|
48
|
-
const crewDetails =
|
|
49
|
-
routeData?.route_crew_info?.crew1_id +
|
|
50
|
-
' ' +
|
|
51
|
-
routeData?.route_crew_info?.crew1 +
|
|
52
|
-
' ' +
|
|
53
|
-
routeData?.route_crew_info?.crew2_id +
|
|
54
|
-
' ' +
|
|
55
|
-
routeData?.route_crew_info?.crew2 +
|
|
56
|
-
' ';
|
|
57
|
-
|
|
58
43
|
useEffect(() => {
|
|
59
44
|
if (precall) {
|
|
60
45
|
setOrderCount(prevCount => prevCount + 1);
|
|
@@ -77,21 +62,11 @@ function OrderTemplate({ orderDetails }: any) {
|
|
|
77
62
|
<FlagAlert
|
|
78
63
|
type="warn"
|
|
79
64
|
title={
|
|
80
|
-
|
|
81
|
-
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
? format(
|
|
86
|
-
new Date(orderDetails?.order_on_hold?.hold_untill),
|
|
87
|
-
'dd/MM/yyyy'
|
|
88
|
-
)
|
|
89
|
-
: ''}
|
|
90
|
-
</HoldText>
|
|
91
|
-
) : (
|
|
92
|
-
<HoldText>On Hold Until: Indefinitely</HoldText>
|
|
93
|
-
)}
|
|
94
|
-
</>
|
|
65
|
+
<div
|
|
66
|
+
dangerouslySetInnerHTML={{
|
|
67
|
+
__html: routeInfoData?.order_alert,
|
|
68
|
+
}}
|
|
69
|
+
></div>
|
|
95
70
|
}
|
|
96
71
|
description={''}
|
|
97
72
|
showOkButton={false}
|
|
@@ -99,25 +74,18 @@ function OrderTemplate({ orderDetails }: any) {
|
|
|
99
74
|
/>
|
|
100
75
|
</StyledAlert>
|
|
101
76
|
)}
|
|
102
|
-
{
|
|
77
|
+
{statusVal == 'complete' && alertVisibility.isCompleted && (
|
|
103
78
|
<StyledAlert>
|
|
104
79
|
<FlagAlert
|
|
105
80
|
type="success"
|
|
106
81
|
title={
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
description={
|
|
114
|
-
<SubtitleText>
|
|
115
|
-
Route: {routeData?.route_name}
|
|
116
|
-
{routeData?.route_lock ? ' *LOCKED* ' : ''} on{' '}
|
|
117
|
-
{routeData?.route_detail?.vehicle_number} | Crew : {crewDetails}
|
|
118
|
-
| {routeData?.route_date}
|
|
119
|
-
</SubtitleText>
|
|
82
|
+
<div
|
|
83
|
+
dangerouslySetInnerHTML={{
|
|
84
|
+
__html: routeInfoData?.order_alert,
|
|
85
|
+
}}
|
|
86
|
+
></div>
|
|
120
87
|
}
|
|
88
|
+
description={''}
|
|
121
89
|
showOkButton={false}
|
|
122
90
|
onClose={() => onCloseAlert('isCompleted')}
|
|
123
91
|
/>
|
|
@@ -128,11 +96,13 @@ function OrderTemplate({ orderDetails }: any) {
|
|
|
128
96
|
<StyledAlert>
|
|
129
97
|
<FlagAlert
|
|
130
98
|
type="success"
|
|
131
|
-
title={
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
99
|
+
title={
|
|
100
|
+
<div
|
|
101
|
+
dangerouslySetInnerHTML={{
|
|
102
|
+
__html: routeInfoData?.order_alert,
|
|
103
|
+
}}
|
|
104
|
+
></div>
|
|
105
|
+
}
|
|
136
106
|
description={``}
|
|
137
107
|
showOkButton={false}
|
|
138
108
|
onClose={() => onCloseAlert('isPreCall')}
|
|
@@ -144,7 +114,13 @@ function OrderTemplate({ orderDetails }: any) {
|
|
|
144
114
|
<StyledAlert>
|
|
145
115
|
<FlagAlert
|
|
146
116
|
type="release"
|
|
147
|
-
title={
|
|
117
|
+
title={
|
|
118
|
+
<div
|
|
119
|
+
dangerouslySetInnerHTML={{
|
|
120
|
+
__html: routeInfoData?.order_alert,
|
|
121
|
+
}}
|
|
122
|
+
></div>
|
|
123
|
+
}
|
|
148
124
|
description={``}
|
|
149
125
|
showOkButton={false}
|
|
150
126
|
onClose={() => onCloseAlert('isOutstanding')}
|
|
@@ -157,18 +133,11 @@ function OrderTemplate({ orderDetails }: any) {
|
|
|
157
133
|
<FlagAlert
|
|
158
134
|
type="info"
|
|
159
135
|
title={
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
new Date(orderDetails?.action_date),
|
|
166
|
-
'dd/MM/yyyy'
|
|
167
|
-
)
|
|
168
|
-
: ''}{' '}
|
|
169
|
-
<span>, Awaiting Confirmation</span>
|
|
170
|
-
</ScheduledText>
|
|
171
|
-
</>
|
|
136
|
+
<div
|
|
137
|
+
dangerouslySetInnerHTML={{
|
|
138
|
+
__html: routeInfoData?.order_alert,
|
|
139
|
+
}}
|
|
140
|
+
></div>
|
|
172
141
|
}
|
|
173
142
|
description={``}
|
|
174
143
|
showOkButton={false}
|
|
@@ -181,15 +150,11 @@ function OrderTemplate({ orderDetails }: any) {
|
|
|
181
150
|
<FlagAlert
|
|
182
151
|
type="info"
|
|
183
152
|
title={
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
: ''}{' '}
|
|
190
|
-
,<span> Awaiting Route</span>
|
|
191
|
-
</ScheduledText>
|
|
192
|
-
</>
|
|
153
|
+
<div
|
|
154
|
+
dangerouslySetInnerHTML={{
|
|
155
|
+
__html: routeInfoData?.order_alert,
|
|
156
|
+
}}
|
|
157
|
+
></div>
|
|
193
158
|
}
|
|
194
159
|
description={``}
|
|
195
160
|
showOkButton={false}
|
|
@@ -201,7 +166,13 @@ function OrderTemplate({ orderDetails }: any) {
|
|
|
201
166
|
<StyledAlert>
|
|
202
167
|
<FlagAlert
|
|
203
168
|
type="error"
|
|
204
|
-
title={
|
|
169
|
+
title={
|
|
170
|
+
<div
|
|
171
|
+
dangerouslySetInnerHTML={{
|
|
172
|
+
__html: routeInfoData?.order_alert,
|
|
173
|
+
}}
|
|
174
|
+
></div>
|
|
175
|
+
}
|
|
205
176
|
description={reason}
|
|
206
177
|
showOkButton={false}
|
|
207
178
|
onClose={() => onCloseAlert('isCancelled')}
|
|
@@ -213,24 +184,11 @@ function OrderTemplate({ orderDetails }: any) {
|
|
|
213
184
|
<FlagAlert
|
|
214
185
|
type="info"
|
|
215
186
|
title={
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
{routeData?.route_lock ? ' *LOCKED* ' : ''} on{' '}
|
|
222
|
-
{routeData?.route_detail?.vehicle_number} | Crew :{' '}
|
|
223
|
-
{crewDetails}|{' '}
|
|
224
|
-
{routeData?.route_date
|
|
225
|
-
? format(new Date(routeData?.route_date), 'dd/MM/yyyy')
|
|
226
|
-
: ''}{' '}
|
|
227
|
-
</span>
|
|
228
|
-
<span>
|
|
229
|
-
{' '}
|
|
230
|
-
, Confirmed: <span className="no">NO</span>
|
|
231
|
-
</span>
|
|
232
|
-
</EnRouteText>
|
|
233
|
-
</>
|
|
187
|
+
<div
|
|
188
|
+
dangerouslySetInnerHTML={{
|
|
189
|
+
__html: routeInfoData?.order_alert,
|
|
190
|
+
}}
|
|
191
|
+
></div>
|
|
234
192
|
}
|
|
235
193
|
description={``}
|
|
236
194
|
showOkButton={false}
|
|
@@ -244,24 +202,11 @@ function OrderTemplate({ orderDetails }: any) {
|
|
|
244
202
|
<FlagAlert
|
|
245
203
|
type="info"
|
|
246
204
|
title={
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
{routeData?.route_lock ? ' *LOCKED* ' : ''} on{' '}
|
|
253
|
-
{routeData?.route_detail?.vehicle_number} | Crew :{' '}
|
|
254
|
-
{crewDetails}|{' '}
|
|
255
|
-
{routeData?.route_date
|
|
256
|
-
? format(new Date(routeData?.route_date), 'dd/MM/yyyy')
|
|
257
|
-
: ''}{' '}
|
|
258
|
-
</span>
|
|
259
|
-
<span>
|
|
260
|
-
{' '}
|
|
261
|
-
, Confirmed: <span className="yes">YES</span>
|
|
262
|
-
</span>
|
|
263
|
-
</EnRouteText>
|
|
264
|
-
</>
|
|
205
|
+
<div
|
|
206
|
+
dangerouslySetInnerHTML={{
|
|
207
|
+
__html: routeInfoData?.order_alert,
|
|
208
|
+
}}
|
|
209
|
+
></div>
|
|
265
210
|
}
|
|
266
211
|
description={``}
|
|
267
212
|
showOkButton={false}
|
|
@@ -269,81 +214,130 @@ function OrderTemplate({ orderDetails }: any) {
|
|
|
269
214
|
/>
|
|
270
215
|
</StyledAlert>
|
|
271
216
|
)}
|
|
217
|
+
|
|
218
|
+
{routeInfoData?.same_postcode_orders && alertVisibility.isPostcode && (
|
|
219
|
+
<FlagAlert
|
|
220
|
+
type="info"
|
|
221
|
+
title=""
|
|
222
|
+
description={
|
|
223
|
+
<FlagsStyle>
|
|
224
|
+
<div className="postcode-alert-content">
|
|
225
|
+
<div
|
|
226
|
+
dangerouslySetInnerHTML={{
|
|
227
|
+
__html: routeInfoData.same_postcode_orders,
|
|
228
|
+
}}
|
|
229
|
+
/>
|
|
230
|
+
</div>
|
|
231
|
+
</FlagsStyle>
|
|
232
|
+
}
|
|
233
|
+
showOkButton={false}
|
|
234
|
+
onClose={() => onCloseAlert('isPostcode')}
|
|
235
|
+
/>
|
|
236
|
+
)}
|
|
272
237
|
</>
|
|
273
238
|
);
|
|
274
239
|
}
|
|
275
240
|
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
color: #3a3630;
|
|
291
|
-
font-family: Lato;
|
|
292
|
-
font-size: 14px;
|
|
293
|
-
font-style: normal;
|
|
294
|
-
font-weight: 500;
|
|
295
|
-
line-height: 18px;
|
|
296
|
-
`;
|
|
241
|
+
const FlagsStyle = styled.div`
|
|
242
|
+
.postcode-alert-content {
|
|
243
|
+
> div {
|
|
244
|
+
> h4 {
|
|
245
|
+
color: #3a3630;
|
|
246
|
+
font-family: Lato;
|
|
247
|
+
font-size: 14px;
|
|
248
|
+
font-style: normal;
|
|
249
|
+
font-weight: 500;
|
|
250
|
+
line-height: 18px;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
ul {
|
|
254
|
+
}
|
|
297
255
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
256
|
+
li {
|
|
257
|
+
border-radius: 6px;
|
|
258
|
+
list-style-type: none;
|
|
259
|
+
> a {
|
|
260
|
+
color: #6396e5;
|
|
261
|
+
font-family: Roboto;
|
|
262
|
+
font-size: 14px;
|
|
263
|
+
font-style: normal;
|
|
264
|
+
font-weight: 600;
|
|
265
|
+
line-height: 24px;
|
|
266
|
+
text-decoration: none;
|
|
267
|
+
}
|
|
268
|
+
> strong {
|
|
269
|
+
> a {
|
|
270
|
+
color: #6396e5;
|
|
271
|
+
font-family: Roboto;
|
|
272
|
+
font-size: 14px;
|
|
273
|
+
font-style: normal;
|
|
274
|
+
font-weight: 600;
|
|
275
|
+
line-height: 24px;
|
|
276
|
+
text-decoration: none;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
312
280
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
281
|
+
li.outstanding strong,
|
|
282
|
+
li.awaiting_confirmation strong,
|
|
283
|
+
li.awaiting_route strong {
|
|
284
|
+
font-family: Roboto, sans-serif;
|
|
285
|
+
font-size: 14px;
|
|
286
|
+
font-weight: 600;
|
|
287
|
+
line-height: 24px;
|
|
288
|
+
font-style: normal;
|
|
289
|
+
}
|
|
290
|
+
li.routed strong {
|
|
291
|
+
margin-left: 5px;
|
|
292
|
+
color: #3a3630;
|
|
293
|
+
font-family: Lato;
|
|
294
|
+
font-size: 14px;
|
|
295
|
+
font-style: normal;
|
|
296
|
+
font-weight: 500;
|
|
297
|
+
line-height: 18px;
|
|
298
|
+
}
|
|
327
299
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
color: #6396e5;
|
|
336
|
-
font-family: Roboto;
|
|
337
|
-
font-size: 14px;
|
|
338
|
-
font-style: normal;
|
|
339
|
-
font-weight: 600;
|
|
340
|
-
.yes {
|
|
300
|
+
li.outstanding strong {
|
|
301
|
+
color: #e95252;
|
|
302
|
+
}
|
|
303
|
+
li.awaiting_confirmation strong {
|
|
304
|
+
color: #6396e5;
|
|
305
|
+
}
|
|
306
|
+
li.awaiting_route strong {
|
|
341
307
|
color: #36a053;
|
|
342
308
|
}
|
|
343
|
-
.
|
|
309
|
+
li.confirmed strong {
|
|
310
|
+
color: #36a053;
|
|
311
|
+
}
|
|
312
|
+
li.enroute strong {
|
|
313
|
+
color: #36a053;
|
|
314
|
+
}
|
|
315
|
+
li.cancelled strong {
|
|
344
316
|
color: #e95252;
|
|
345
317
|
}
|
|
318
|
+
li.complete strong {
|
|
319
|
+
color: #36a053;
|
|
320
|
+
}
|
|
321
|
+
li.on_hold strong {
|
|
322
|
+
color: #feba30;
|
|
323
|
+
}
|
|
324
|
+
li.routed strong {
|
|
325
|
+
color: #3a3630;
|
|
326
|
+
}
|
|
327
|
+
span {
|
|
328
|
+
margin-left: 5px;
|
|
329
|
+
color: #3a3630;
|
|
330
|
+
font-family: Lato;
|
|
331
|
+
font-size: 14px;
|
|
332
|
+
font-style: normal;
|
|
333
|
+
font-weight: 500;
|
|
334
|
+
line-height: 18px;
|
|
335
|
+
}
|
|
346
336
|
}
|
|
347
337
|
`;
|
|
348
338
|
|
|
339
|
+
const StyledAlert = styled.div`
|
|
340
|
+
margin-bottom: 5px;
|
|
341
|
+
`;
|
|
342
|
+
|
|
349
343
|
export default OrderTemplate;
|