@bjsdistribution/dms-client-return 0.1.19-dev → 0.1.19-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/common/date-picker/header/ClearDate.d.ts +1 -1
- package/dist/components/client-portal/DateFilterStore.d.ts +15 -0
- package/dist/components/client-portal/OutstandingTable.d.ts +3 -0
- package/dist/components/client-portal/ReturnRTFilters.d.ts +3 -0
- package/dist/components/client-portal/ReturnStatus.d.ts +5 -0
- package/dist/components/client-portal/return-confirm/ConfirmedMain.d.ts +3 -0
- package/dist/components/client-portal/return-confirm/ReturnConfirmedTable.d.ts +3 -0
- package/dist/components/order-daily-overview/header/route-header/ClientRouterHeader.d.ts +11 -0
- package/dist/components/order-daily-overview/table-view/TableStyle.d.ts +4 -4
- package/dist/components/order-view/DynamicTable.d.ts +2 -1
- package/dist/components/order-view/general-information/Status.d.ts +1 -1
- package/dist/components/order-view/general-information/index.d.ts +1 -1
- package/dist/components/order-view/index.d.ts +1 -1
- package/dist/components/order-view/notes/AddNote.d.ts +1 -0
- package/dist/components/order-view/notes/order-dropdown/NewReturnDropdown.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/clear-booking-status/ClearBookingStatus.d.ts +4 -1
- package/dist/components/order-view/order-actions/actions/confirm-order/index.d.ts +4 -1
- package/dist/components/order-view/order-actions/actions/force-debrief/BaseChargeConfirmationModal.d.ts +7 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/ForceDebriefModal.d.ts +11 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/Selector.d.ts +11 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/charges/adhoc/index.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/charges/base-charge/index.d.ts +8 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/charges/collection-add-ons/index.d.ts +7 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/charges/delivery-add-ons/index.d.ts +7 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/charges/disposal-charges/index.d.ts +7 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/charges/order-charges/index.d.ts +7 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/escalation/EscalationCategory.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/escalation/EscalationLevel.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/escalation/EscalationReason.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/escalation/index.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/notifications/FlagsTemplate.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/notifications/OrderTemplate.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/notifications/Tabs.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/notifications/index.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/RadioButtons.d.ts +7 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/CancellationReasonDropdown.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/FailureReasonDropdown.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/OrderHoldReasonDropdown.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/StatusDropdown.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/ZoneDropdown.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/failure-content/index.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/index.d.ts +4 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/success-content/index.d.ts +3 -0
- package/dist/components/order-view/order-actions/actions/force-debrief/styles.d.ts +8 -0
- package/dist/components/order-view/order-actions/actions/hold-order/HoldOrderModal.d.ts +1 -0
- package/dist/components/order-view/order-actions/actions/remove-from-route/RemoveFromRoute.d.ts +1 -1
- package/dist/components/order-view/order-actions/actions/unhold-order/UnholdOrder.d.ts +1 -0
- package/dist/components/order-view/order-actions/types.d.ts +3 -3
- package/dist/components/order-view/order-details/expanded-content/index.d.ts +1 -1
- package/dist/components/order-view/order-details/index.d.ts +1 -1
- package/dist/components/order-view/order-resources/expanded-content/index.d.ts +1 -1
- package/dist/components/order-view/products-info/expanded-content/index.d.ts +6 -1
- package/dist/components/order-view/products-info/index.d.ts +1 -1
- package/dist/components/order-view/return-client-products/ProductTable.d.ts +6 -1
- package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.d.ts +6 -1
- package/dist/components/order-view/store.d.ts +15 -3
- package/dist/components/order-view/system-event-logs/expanded-content/index.d.ts +1 -1
- package/dist/components/order-view/types.d.ts +55 -1
- package/dist/components/order-view/utils.d.ts +11 -2
- package/dist/components/store.d.ts +6 -2
- package/dist/dms-client-return.cjs.development.js +9140 -5835
- 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 +7617 -4312
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +6 -4
- package/src/assets/icons/ActionIcon.tsx +1 -1
- package/src/assets/icons/ArrowDownIcon.tsx +2 -2
- package/src/components/client-portal/DateFilterStore.ts +139 -0
- package/src/components/client-portal/OutstandingTable.tsx +356 -0
- package/src/components/client-portal/ReturnAfterSearchBar.tsx +77 -17
- package/src/components/client-portal/ReturnOverview.tsx +15 -6
- package/src/components/client-portal/ReturnRTFilters.tsx +196 -80
- package/src/components/client-portal/ReturnSearchBar.tsx +64 -94
- package/src/components/client-portal/ReturnStatus.tsx +50 -66
- package/src/components/client-portal/return-confirm/ConfirmedMain.tsx +224 -0
- package/src/components/client-portal/return-confirm/ReturnConfirmedTable.tsx +327 -0
- package/src/components/order-daily-overview/header/route-header/ClientRouterHeader.tsx +166 -0
- package/src/components/order-daily-overview/header/route-header/RouterHeader.tsx +2 -86
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +46 -15
- package/src/components/order-daily-overview/index.tsx +23 -4
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +23 -38
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +21 -24
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +36 -36
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +12 -2
- package/src/components/order-daily-overview/return-order-table/ReturnTable.tsx +16 -0
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +58 -155
- package/src/components/order-daily-overview/table/ReturnTable.tsx +8 -4
- package/src/components/order-view/DynamicTable.tsx +21 -8
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/DropDowns.tsx +1 -1
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/OptionsDropDown.tsx +9 -0
- package/src/components/order-view/details-filters/right-side-filters/Details.tsx +28 -3
- package/src/components/order-view/flags-action-modal/Dropdowns.tsx +2 -0
- package/src/components/order-view/general-information/Status.tsx +92 -18
- package/src/components/order-view/general-information/index.tsx +2 -2
- package/src/components/order-view/generic-table/AuditLogs.tsx +39 -12
- package/src/components/order-view/index.tsx +50 -8
- package/src/components/order-view/modalsPopup/ModalManager.tsx +1 -1
- package/src/components/order-view/notes/AddNote.tsx +95 -65
- package/src/components/order-view/notes/order-dropdown/NewReturnDropdown.tsx +8 -10
- package/src/components/order-view/notification/FlagTemplate.tsx +21 -10
- package/src/components/order-view/notification/OrderTemplate.tsx +192 -41
- package/src/components/order-view/notification/ReminderTemplate.tsx +28 -13
- package/src/components/order-view/notification/index.tsx +100 -55
- package/src/components/order-view/order-actions/actions/add-resources/DocFileUpload.tsx +92 -72
- package/src/components/order-view/order-actions/actions/add-resources/index.tsx +27 -10
- package/src/components/order-view/order-actions/actions/cancel-order/ReturnAction.tsx +25 -4
- package/src/components/order-view/order-actions/actions/cancel-order/ReturnReason.tsx +24 -4
- package/src/components/order-view/order-actions/actions/clear-booking-status/ClearBookingStatus.tsx +9 -2
- package/src/components/order-view/order-actions/actions/confirm-order/index.tsx +12 -35
- package/src/components/order-view/order-actions/actions/confirm-order/tables/NotesTable.tsx +1 -0
- package/src/components/order-view/order-actions/actions/create-task-reminder/CreateReminderModal.tsx +88 -30
- package/src/components/order-view/order-actions/actions/create-task-reminder/CreateTaskModal.tsx +5 -3
- package/src/components/order-view/order-actions/actions/create-task-reminder/TaskModal.tsx +2 -2
- package/src/components/order-view/order-actions/actions/force-debrief/BaseChargeConfirmationModal.tsx +94 -0
- package/src/components/order-view/order-actions/actions/force-debrief/ForceDebriefModal.tsx +635 -0
- package/src/components/order-view/order-actions/actions/force-debrief/Selector.tsx +65 -0
- package/src/components/order-view/order-actions/actions/force-debrief/charges/adhoc/index.tsx +94 -0
- package/src/components/order-view/order-actions/actions/force-debrief/charges/base-charge/index.tsx +106 -0
- package/src/components/order-view/order-actions/actions/force-debrief/charges/collection-add-ons/index.tsx +77 -0
- package/src/components/order-view/order-actions/actions/force-debrief/charges/delivery-add-ons/index.tsx +78 -0
- package/src/components/order-view/order-actions/actions/force-debrief/charges/disposal-charges/index.tsx +77 -0
- package/src/components/order-view/order-actions/actions/force-debrief/charges/order-charges/index.tsx +124 -0
- package/src/components/order-view/order-actions/actions/force-debrief/escalation/EscalationCategory.tsx +92 -0
- package/src/components/order-view/order-actions/actions/force-debrief/escalation/EscalationLevel.tsx +90 -0
- package/src/components/order-view/order-actions/actions/force-debrief/escalation/EscalationReason.tsx +122 -0
- package/src/components/order-view/order-actions/actions/force-debrief/escalation/index.tsx +16 -0
- package/src/components/order-view/order-actions/actions/force-debrief/notifications/FlagsTemplate.tsx +46 -0
- package/src/components/order-view/order-actions/actions/force-debrief/notifications/OrderTemplate.tsx +117 -0
- package/src/components/order-view/order-actions/actions/force-debrief/notifications/Tabs.tsx +32 -0
- package/src/components/order-view/order-actions/actions/force-debrief/notifications/index.tsx +180 -0
- package/src/components/order-view/order-actions/actions/force-debrief/order-info/RadioButtons.tsx +150 -0
- package/src/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/CancellationReasonDropdown.tsx +40 -0
- package/src/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/FailureReasonDropdown.tsx +108 -0
- package/src/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/OrderHoldReasonDropdown.tsx +37 -0
- package/src/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/StatusDropdown.tsx +48 -0
- package/src/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/ZoneDropdown.tsx +27 -0
- package/src/components/order-view/order-actions/actions/force-debrief/order-info/failure-content/index.tsx +187 -0
- package/src/components/order-view/order-actions/actions/force-debrief/order-info/index.tsx +55 -0
- package/src/components/order-view/order-actions/actions/force-debrief/order-info/success-content/index.tsx +221 -0
- package/src/components/order-view/order-actions/actions/force-debrief/styles.tsx +51 -0
- package/src/components/order-view/order-actions/actions/hold-order/HoldOrderModal.tsx +2 -0
- package/src/components/order-view/order-actions/actions/remove-from-route/RemoveFromRoute.tsx +7 -2
- package/src/components/order-view/order-actions/actions/unhold-order/UnholdOrder.tsx +2 -0
- package/src/components/order-view/order-actions/index.tsx +19 -10
- package/src/components/order-view/order-actions/store.ts +1 -1
- package/src/components/order-view/order-actions/types.ts +3 -3
- package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactHome.tsx +102 -45
- package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactMobile.tsx +93 -34
- package/src/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactWork.tsx +88 -31
- package/src/components/order-view/order-details/expanded-content/footer/index.tsx +55 -80
- package/src/components/order-view/order-details/expanded-content/index.tsx +37 -16
- package/src/components/order-view/order-details/expanded-content/instruction-section/index.tsx +1 -1
- package/src/components/order-view/order-details/expanded-content/services-section/AssemblyType.tsx +9 -91
- package/src/components/order-view/order-details/expanded-content/services-section/OrderServices.tsx +10 -182
- package/src/components/order-view/order-details/expanded-content/services-section/ServiceLevel.tsx +3 -4
- package/src/components/order-view/order-details/index.tsx +5 -2
- package/src/components/order-view/order-resources/expanded-content/index.tsx +2 -2
- package/src/components/order-view/products-info/expanded-content/index.tsx +33 -11
- package/src/components/order-view/products-info/index.tsx +10 -6
- package/src/components/order-view/return-client-products/ProductTable.tsx +12 -2
- package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +73 -23
- package/src/components/order-view/store.ts +113 -1
- package/src/components/order-view/system-event-logs/expanded-content/index.tsx +6 -2
- package/src/components/order-view/types.ts +60 -1
- package/src/components/order-view/utils.ts +49 -33
- package/src/components/order-view/view-reminder/AssigneeDropdown.tsx +85 -26
- package/src/components/order-view/view-reminder/ViewReminder.tsx +31 -14
- package/src/components/store.ts +25 -2
- package/src/index.tsx +23 -5
- package/dist/components/order-view/order-actions/actions/log-service-refusal/DeliveryPoint.d.ts +0 -7
- package/dist/components/order-view/order-actions/actions/log-service-refusal/Notes.d.ts +0 -7
- package/dist/components/order-view/order-actions/actions/log-service-refusal/OrderServices.d.ts +0 -7
- package/dist/components/order-view/order-actions/actions/log-service-refusal/helper.d.ts +0 -3
- package/dist/components/order-view/order-actions/actions/log-service-refusal/index.d.ts +0 -3
- package/src/components/order-view/order-actions/actions/log-service-refusal/DeliveryPoint.tsx +0 -50
- package/src/components/order-view/order-actions/actions/log-service-refusal/Notes.tsx +0 -50
- package/src/components/order-view/order-actions/actions/log-service-refusal/OrderServices.tsx +0 -57
- package/src/components/order-view/order-actions/actions/log-service-refusal/helper.ts +0 -26
- package/src/components/order-view/order-actions/actions/log-service-refusal/index.tsx +0 -130
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
FlagAlert,
|
|
3
|
+
formatUtcToLocal,
|
|
4
|
+
} from '@bjsdistribution/dms-component-library';
|
|
2
5
|
import React from 'react';
|
|
3
6
|
import styled from 'styled-components';
|
|
4
7
|
import { useFlagRefId } from '../order-actions/store';
|
|
5
8
|
import { useCurrentAction } from '../store';
|
|
6
|
-
import {
|
|
7
|
-
|
|
9
|
+
import { useClientPortal } from '../../store';
|
|
8
10
|
function FlagTemplate({ data, dismissFlags }: any) {
|
|
9
11
|
const [, setSelectedFlag] = useFlagRefId();
|
|
10
12
|
const [, setCurrentAction] = useCurrentAction();
|
|
11
|
-
|
|
13
|
+
const [isCustomerPortal] = useClientPortal();
|
|
14
|
+
//
|
|
12
15
|
const openModal = () => {
|
|
13
16
|
setCurrentAction('view-flag');
|
|
14
17
|
};
|
|
@@ -25,21 +28,30 @@ function FlagTemplate({ data, dismissFlags }: any) {
|
|
|
25
28
|
title={
|
|
26
29
|
<>
|
|
27
30
|
<StyledTitle color={titleColor}>
|
|
28
|
-
Flag : {data?.is_private ? 'Private' : ''}{' '}
|
|
31
|
+
Flag : {data?.is_private ? 'Private' : 'Public'}{' '}
|
|
29
32
|
<StyledLink onClick={() => handleClick(data.id)}>
|
|
30
33
|
{data?.id} - {data?.flag_type}{' '}
|
|
31
34
|
</StyledLink>{' '}
|
|
32
35
|
{data?.status === 'AD' ? 'Unresolved' : 'Resolved on'}{' '}
|
|
33
36
|
{data?.status == 'SD' ? (
|
|
34
37
|
<>
|
|
35
|
-
{
|
|
38
|
+
{`${formatUtcToLocal(data?.resolved_at)?.date} ${
|
|
39
|
+
formatUtcToLocal(data?.resolved_at)?.time
|
|
40
|
+
}`}{' '}
|
|
41
|
+
by {data?.resolved_by}{' '}
|
|
36
42
|
</>
|
|
37
43
|
) : null}
|
|
38
44
|
</StyledTitle>
|
|
39
45
|
</>
|
|
40
46
|
}
|
|
41
47
|
subtitle=""
|
|
42
|
-
description={
|
|
48
|
+
description={
|
|
49
|
+
isCustomerPortal ? (
|
|
50
|
+
<span dangerouslySetInnerHTML={{ __html: data?.description }} />
|
|
51
|
+
) : (
|
|
52
|
+
`${data?.description}`
|
|
53
|
+
)
|
|
54
|
+
}
|
|
43
55
|
showOkButton={false}
|
|
44
56
|
onClose={() => dismissFlags(data?.id)}
|
|
45
57
|
/>
|
|
@@ -47,9 +59,7 @@ function FlagTemplate({ data, dismissFlags }: any) {
|
|
|
47
59
|
);
|
|
48
60
|
}
|
|
49
61
|
|
|
50
|
-
const StyledAlert = styled.div
|
|
51
|
-
margin-bottom: 10px;
|
|
52
|
-
`;
|
|
62
|
+
const StyledAlert = styled.div``;
|
|
53
63
|
|
|
54
64
|
const StyledLink = styled.span`
|
|
55
65
|
color: var(--contextual-blue, #6396e5);
|
|
@@ -57,6 +67,7 @@ const StyledLink = styled.span`
|
|
|
57
67
|
font-size: 14px;
|
|
58
68
|
font-style: normal;
|
|
59
69
|
font-weight: 600;
|
|
70
|
+
cursor: pointer;
|
|
60
71
|
`;
|
|
61
72
|
|
|
62
73
|
const StyledTitle = styled.span<{ color: string }>`
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { FlagAlert } from '@bjsdistribution/dms-component-library';
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { useOrderNotify } from '../order-actions/store';
|
|
5
5
|
import { useOrderStaticData } from '../store';
|
|
6
|
+
import { useClientPortal } from '../../store';
|
|
6
7
|
|
|
7
8
|
function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
8
9
|
const [, setOrderCount] = useOrderNotify();
|
|
9
|
-
const precall = false;
|
|
10
|
+
// const precall = false;
|
|
10
11
|
const [orderStaticData] = useOrderStaticData();
|
|
11
12
|
const statusVal = routeInfoData?.status_value;
|
|
12
|
-
|
|
13
|
+
const [isClientPortal] = useClientPortal();
|
|
13
14
|
const unholdReasons = orderStaticData?.cancellation_reasons?.map(
|
|
14
15
|
(x: any) => ({
|
|
15
16
|
id: x?.id,
|
|
@@ -38,13 +39,17 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
38
39
|
isPreCall: true,
|
|
39
40
|
isConfirmed: true,
|
|
40
41
|
isPostcode: true,
|
|
42
|
+
isSubcontracted: true,
|
|
43
|
+
isRouted: true,
|
|
44
|
+
isOnSite: true,
|
|
45
|
+
isFailed: true,
|
|
41
46
|
});
|
|
42
47
|
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, [precall]);
|
|
48
|
+
// useEffect(() => {
|
|
49
|
+
// if (precall) {
|
|
50
|
+
// setOrderCount(prevCount => prevCount + 1);
|
|
51
|
+
// }
|
|
52
|
+
// }, [precall]);
|
|
48
53
|
|
|
49
54
|
//on close alert functionality
|
|
50
55
|
const onCloseAlert = (alertType: string) => {
|
|
@@ -57,6 +62,28 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
57
62
|
|
|
58
63
|
return (
|
|
59
64
|
<>
|
|
65
|
+
{/* order_red_cross_alerts */}
|
|
66
|
+
{!isClientPortal && routeInfoData?.order_red_cross_alerts?.length > 0 && (
|
|
67
|
+
<FlagAlert
|
|
68
|
+
type="error"
|
|
69
|
+
title=""
|
|
70
|
+
description={
|
|
71
|
+
<FlagsStyle>
|
|
72
|
+
<div className="redCross">
|
|
73
|
+
<div
|
|
74
|
+
className="spanStyle"
|
|
75
|
+
dangerouslySetInnerHTML={{
|
|
76
|
+
__html: routeInfoData?.order_red_cross_alerts,
|
|
77
|
+
}}
|
|
78
|
+
/>
|
|
79
|
+
</div>
|
|
80
|
+
</FlagsStyle>
|
|
81
|
+
}
|
|
82
|
+
showOkButton={false}
|
|
83
|
+
onClose={() => onCloseAlert('isPostcode')}
|
|
84
|
+
/>
|
|
85
|
+
)}
|
|
86
|
+
|
|
60
87
|
{statusVal == 'on hold' && alertVisibility?.isHoldVisible && (
|
|
61
88
|
<StyledAlert>
|
|
62
89
|
<FlagAlert
|
|
@@ -64,7 +91,7 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
64
91
|
title={
|
|
65
92
|
<div
|
|
66
93
|
dangerouslySetInnerHTML={{
|
|
67
|
-
__html: routeInfoData?.
|
|
94
|
+
__html: routeInfoData?.order_info_alerts,
|
|
68
95
|
}}
|
|
69
96
|
></div>
|
|
70
97
|
}
|
|
@@ -81,7 +108,7 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
81
108
|
title={
|
|
82
109
|
<div
|
|
83
110
|
dangerouslySetInnerHTML={{
|
|
84
|
-
__html: routeInfoData?.
|
|
111
|
+
__html: routeInfoData?.order_info_alerts,
|
|
85
112
|
}}
|
|
86
113
|
></div>
|
|
87
114
|
}
|
|
@@ -92,24 +119,6 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
92
119
|
</StyledAlert>
|
|
93
120
|
)}
|
|
94
121
|
|
|
95
|
-
{precall && alertVisibility.isPreCall && (
|
|
96
|
-
<StyledAlert>
|
|
97
|
-
<FlagAlert
|
|
98
|
-
type="success"
|
|
99
|
-
title={
|
|
100
|
-
<div
|
|
101
|
-
dangerouslySetInnerHTML={{
|
|
102
|
-
__html: routeInfoData?.order_alert,
|
|
103
|
-
}}
|
|
104
|
-
></div>
|
|
105
|
-
}
|
|
106
|
-
description={``}
|
|
107
|
-
showOkButton={false}
|
|
108
|
-
onClose={() => onCloseAlert('isPreCall')}
|
|
109
|
-
/>
|
|
110
|
-
</StyledAlert>
|
|
111
|
-
)}
|
|
112
|
-
|
|
113
122
|
{statusVal == 'outstanding' && alertVisibility.isOutstanding && (
|
|
114
123
|
<StyledAlert>
|
|
115
124
|
<FlagAlert
|
|
@@ -117,7 +126,7 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
117
126
|
title={
|
|
118
127
|
<div
|
|
119
128
|
dangerouslySetInnerHTML={{
|
|
120
|
-
__html: routeInfoData?.
|
|
129
|
+
__html: routeInfoData?.order_info_alerts,
|
|
121
130
|
}}
|
|
122
131
|
></div>
|
|
123
132
|
}
|
|
@@ -127,6 +136,7 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
127
136
|
/>
|
|
128
137
|
</StyledAlert>
|
|
129
138
|
)}
|
|
139
|
+
|
|
130
140
|
{statusVal == 'awaiting confirmation' &&
|
|
131
141
|
alertVisibility.isAwaitingConfirmation && (
|
|
132
142
|
<StyledAlert>
|
|
@@ -135,7 +145,7 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
135
145
|
title={
|
|
136
146
|
<div
|
|
137
147
|
dangerouslySetInnerHTML={{
|
|
138
|
-
__html: routeInfoData?.
|
|
148
|
+
__html: routeInfoData?.order_info_alerts,
|
|
139
149
|
}}
|
|
140
150
|
></div>
|
|
141
151
|
}
|
|
@@ -152,7 +162,7 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
152
162
|
title={
|
|
153
163
|
<div
|
|
154
164
|
dangerouslySetInnerHTML={{
|
|
155
|
-
__html: routeInfoData?.
|
|
165
|
+
__html: routeInfoData?.order_info_alerts,
|
|
156
166
|
}}
|
|
157
167
|
></div>
|
|
158
168
|
}
|
|
@@ -165,11 +175,11 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
165
175
|
{statusVal == 'cancelled' && alertVisibility.isCancelled && (
|
|
166
176
|
<StyledAlert>
|
|
167
177
|
<FlagAlert
|
|
168
|
-
type="
|
|
178
|
+
type="info"
|
|
169
179
|
title={
|
|
170
180
|
<div
|
|
171
181
|
dangerouslySetInnerHTML={{
|
|
172
|
-
__html: routeInfoData?.
|
|
182
|
+
__html: routeInfoData?.order_info_alerts,
|
|
173
183
|
}}
|
|
174
184
|
></div>
|
|
175
185
|
}
|
|
@@ -179,6 +189,43 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
179
189
|
/>
|
|
180
190
|
</StyledAlert>
|
|
181
191
|
)}
|
|
192
|
+
|
|
193
|
+
{statusVal == 'confirmed' && alertVisibility.isConfirmed && (
|
|
194
|
+
<StyledAlert>
|
|
195
|
+
<FlagAlert
|
|
196
|
+
type="info"
|
|
197
|
+
title={
|
|
198
|
+
<div
|
|
199
|
+
dangerouslySetInnerHTML={{
|
|
200
|
+
__html: routeInfoData?.order_info_alerts,
|
|
201
|
+
}}
|
|
202
|
+
></div>
|
|
203
|
+
}
|
|
204
|
+
description={``}
|
|
205
|
+
showOkButton={false}
|
|
206
|
+
onClose={() => onCloseAlert('isConfirmed')}
|
|
207
|
+
/>
|
|
208
|
+
</StyledAlert>
|
|
209
|
+
)}
|
|
210
|
+
|
|
211
|
+
{statusVal == 'subcontracted' && alertVisibility.isSubcontracted && (
|
|
212
|
+
<StyledAlert>
|
|
213
|
+
<FlagAlert
|
|
214
|
+
type="info"
|
|
215
|
+
title={
|
|
216
|
+
<div
|
|
217
|
+
dangerouslySetInnerHTML={{
|
|
218
|
+
__html: routeInfoData?.order_info_alerts,
|
|
219
|
+
}}
|
|
220
|
+
></div>
|
|
221
|
+
}
|
|
222
|
+
description={``}
|
|
223
|
+
showOkButton={false}
|
|
224
|
+
onClose={() => onCloseAlert('isRouted')}
|
|
225
|
+
/>
|
|
226
|
+
</StyledAlert>
|
|
227
|
+
)}
|
|
228
|
+
|
|
182
229
|
{statusVal == 'enroute' && alertVisibility.isEnroute && (
|
|
183
230
|
<StyledAlert>
|
|
184
231
|
<FlagAlert
|
|
@@ -186,7 +233,7 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
186
233
|
title={
|
|
187
234
|
<div
|
|
188
235
|
dangerouslySetInnerHTML={{
|
|
189
|
-
__html: routeInfoData?.
|
|
236
|
+
__html: routeInfoData?.order_info_alerts,
|
|
190
237
|
}}
|
|
191
238
|
></div>
|
|
192
239
|
}
|
|
@@ -197,34 +244,89 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
197
244
|
</StyledAlert>
|
|
198
245
|
)}
|
|
199
246
|
|
|
200
|
-
{statusVal == '
|
|
247
|
+
{statusVal == 'routed' && alertVisibility.isRouted && (
|
|
201
248
|
<StyledAlert>
|
|
202
249
|
<FlagAlert
|
|
203
250
|
type="info"
|
|
204
251
|
title={
|
|
205
252
|
<div
|
|
206
253
|
dangerouslySetInnerHTML={{
|
|
207
|
-
__html: routeInfoData?.
|
|
254
|
+
__html: routeInfoData?.order_info_alerts,
|
|
208
255
|
}}
|
|
209
256
|
></div>
|
|
210
257
|
}
|
|
211
258
|
description={``}
|
|
212
259
|
showOkButton={false}
|
|
213
|
-
onClose={() => onCloseAlert('
|
|
260
|
+
onClose={() => onCloseAlert('isRouted')}
|
|
214
261
|
/>
|
|
215
262
|
</StyledAlert>
|
|
216
263
|
)}
|
|
217
264
|
|
|
218
|
-
{
|
|
265
|
+
{statusVal == 'precalled' && alertVisibility.isPreCall && (
|
|
266
|
+
<StyledAlert>
|
|
267
|
+
<FlagAlert
|
|
268
|
+
type="info"
|
|
269
|
+
title={
|
|
270
|
+
<div
|
|
271
|
+
dangerouslySetInnerHTML={{
|
|
272
|
+
__html: routeInfoData?.order_info_alerts,
|
|
273
|
+
}}
|
|
274
|
+
></div>
|
|
275
|
+
}
|
|
276
|
+
description={``}
|
|
277
|
+
showOkButton={false}
|
|
278
|
+
onClose={() => onCloseAlert('isPreCall')}
|
|
279
|
+
/>
|
|
280
|
+
</StyledAlert>
|
|
281
|
+
)}
|
|
282
|
+
|
|
283
|
+
{statusVal == 'on site' && alertVisibility.isOnSite && (
|
|
284
|
+
<StyledAlert>
|
|
285
|
+
<FlagAlert
|
|
286
|
+
type="info"
|
|
287
|
+
title={
|
|
288
|
+
<div
|
|
289
|
+
dangerouslySetInnerHTML={{
|
|
290
|
+
__html: routeInfoData?.order_info_alerts,
|
|
291
|
+
}}
|
|
292
|
+
></div>
|
|
293
|
+
}
|
|
294
|
+
description={``}
|
|
295
|
+
showOkButton={false}
|
|
296
|
+
onClose={() => onCloseAlert('isOnSite')}
|
|
297
|
+
/>
|
|
298
|
+
</StyledAlert>
|
|
299
|
+
)}
|
|
300
|
+
|
|
301
|
+
{statusVal == 'failed' && alertVisibility.isFailed && (
|
|
302
|
+
<StyledAlert>
|
|
303
|
+
<FlagAlert
|
|
304
|
+
type="info"
|
|
305
|
+
title={
|
|
306
|
+
<div
|
|
307
|
+
dangerouslySetInnerHTML={{
|
|
308
|
+
__html: routeInfoData?.order_info_alerts,
|
|
309
|
+
}}
|
|
310
|
+
></div>
|
|
311
|
+
}
|
|
312
|
+
description={``}
|
|
313
|
+
showOkButton={false}
|
|
314
|
+
onClose={() => onCloseAlert('isFailed')}
|
|
315
|
+
/>
|
|
316
|
+
</StyledAlert>
|
|
317
|
+
)}
|
|
318
|
+
|
|
319
|
+
{/* order_warnings_alerts */}
|
|
320
|
+
{!isClientPortal && routeInfoData?.order_warnings_alerts?.length > 0 && (
|
|
219
321
|
<FlagAlert
|
|
220
|
-
type="
|
|
322
|
+
type="warn"
|
|
221
323
|
title=""
|
|
222
324
|
description={
|
|
223
325
|
<FlagsStyle>
|
|
224
|
-
<div className="
|
|
326
|
+
<div className="">
|
|
225
327
|
<div
|
|
226
328
|
dangerouslySetInnerHTML={{
|
|
227
|
-
__html: routeInfoData
|
|
329
|
+
__html: routeInfoData?.order_warnings_alerts,
|
|
228
330
|
}}
|
|
229
331
|
/>
|
|
230
332
|
</div>
|
|
@@ -234,11 +336,58 @@ function OrderTemplate({ orderDetails, routeInfoData }: any) {
|
|
|
234
336
|
onClose={() => onCloseAlert('isPostcode')}
|
|
235
337
|
/>
|
|
236
338
|
)}
|
|
339
|
+
|
|
340
|
+
{/* order_green_check_alerts */}
|
|
341
|
+
{!isClientPortal && routeInfoData?.order_green_check_alerts?.length > 0 && (
|
|
342
|
+
<FlagAlert
|
|
343
|
+
type="success"
|
|
344
|
+
title=""
|
|
345
|
+
description={
|
|
346
|
+
<FlagsStyle>
|
|
347
|
+
<div className="">
|
|
348
|
+
<div
|
|
349
|
+
dangerouslySetInnerHTML={{
|
|
350
|
+
__html: routeInfoData?.order_green_check_alerts,
|
|
351
|
+
}}
|
|
352
|
+
/>
|
|
353
|
+
</div>
|
|
354
|
+
</FlagsStyle>
|
|
355
|
+
}
|
|
356
|
+
showOkButton={false}
|
|
357
|
+
onClose={() => onCloseAlert('isPostcode')}
|
|
358
|
+
/>
|
|
359
|
+
)}
|
|
360
|
+
|
|
361
|
+
{!isClientPortal &&
|
|
362
|
+
routeInfoData?.same_postcode_orders &&
|
|
363
|
+
alertVisibility.isPostcode && (
|
|
364
|
+
<FlagAlert
|
|
365
|
+
type="info"
|
|
366
|
+
title=""
|
|
367
|
+
description={
|
|
368
|
+
<FlagsStyle>
|
|
369
|
+
<div className="postcode-alert-content">
|
|
370
|
+
<div
|
|
371
|
+
dangerouslySetInnerHTML={{
|
|
372
|
+
__html: routeInfoData?.same_postcode_orders,
|
|
373
|
+
}}
|
|
374
|
+
/>
|
|
375
|
+
</div>
|
|
376
|
+
</FlagsStyle>
|
|
377
|
+
}
|
|
378
|
+
showOkButton={false}
|
|
379
|
+
onClose={() => onCloseAlert('isPostcode')}
|
|
380
|
+
/>
|
|
381
|
+
)}
|
|
237
382
|
</>
|
|
238
383
|
);
|
|
239
384
|
}
|
|
240
385
|
|
|
241
386
|
const FlagsStyle = styled.div`
|
|
387
|
+
.redCross {
|
|
388
|
+
font-size: 13px;
|
|
389
|
+
margin-top: 4px;
|
|
390
|
+
}
|
|
242
391
|
.postcode-alert-content {
|
|
243
392
|
> div {
|
|
244
393
|
> h4 {
|
|
@@ -251,6 +400,7 @@ const FlagsStyle = styled.div`
|
|
|
251
400
|
}
|
|
252
401
|
}
|
|
253
402
|
ul {
|
|
403
|
+
margin-bottom: 0;
|
|
254
404
|
}
|
|
255
405
|
|
|
256
406
|
li {
|
|
@@ -268,6 +418,7 @@ const FlagsStyle = styled.div`
|
|
|
268
418
|
> strong {
|
|
269
419
|
> a {
|
|
270
420
|
color: #6396e5;
|
|
421
|
+
|
|
271
422
|
font-family: Roboto;
|
|
272
423
|
font-size: 14px;
|
|
273
424
|
font-style: normal;
|
|
@@ -6,11 +6,12 @@ import {
|
|
|
6
6
|
} from '@bjsdistribution/dms-component-library';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { useReminderRefId } from '../order-actions/store';
|
|
9
|
-
import {
|
|
9
|
+
import { useClientPortal } from '../../store';
|
|
10
10
|
|
|
11
11
|
function ReminderTemplate({ data, dismissReminder }: any) {
|
|
12
12
|
const [, setCurrentAction] = useCurrentAction();
|
|
13
13
|
const [, setReminderRefId] = useReminderRefId();
|
|
14
|
+
const [isClientPortal] = useClientPortal();
|
|
14
15
|
const openModal = () => {
|
|
15
16
|
setCurrentAction('view-reminder');
|
|
16
17
|
};
|
|
@@ -44,18 +45,30 @@ function ReminderTemplate({ data, dismissReminder }: any) {
|
|
|
44
45
|
<>
|
|
45
46
|
<StyledTitle color={titleColor}>
|
|
46
47
|
Reminder:
|
|
47
|
-
<StyledLink
|
|
48
|
-
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
<StyledLink
|
|
49
|
+
onClick={() => handleClick(data.id)}
|
|
50
|
+
$disable={isClientPortal || false}
|
|
51
|
+
>
|
|
52
|
+
{' '}
|
|
53
|
+
{data?.reference || 'NA'}{' '}
|
|
54
|
+
</StyledLink>
|
|
55
|
+
(Due -{' '}
|
|
56
|
+
{`${formatUtcToLocal(data?.due_datetime)?.date} ${
|
|
57
|
+
formatUtcToLocal(data?.due_datetime)?.time
|
|
53
58
|
}`}
|
|
54
|
-
)
|
|
55
|
-
{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
)
|
|
60
|
+
{data?.assigned_to && (
|
|
61
|
+
<div>Assigned to: {data.assigned_to}</div>
|
|
62
|
+
)}
|
|
63
|
+
{data?.completed_at && (
|
|
64
|
+
<div>
|
|
65
|
+
Completed On:{' '}
|
|
66
|
+
{`${formatUtcToLocal(data.completed_at)?.date} ${
|
|
67
|
+
formatUtcToLocal(data.completed_at)?.time
|
|
68
|
+
}`}
|
|
69
|
+
</div>
|
|
70
|
+
)}
|
|
71
|
+
{data?.completed_by && <div>By: {data.completed_by}</div>}
|
|
59
72
|
</StyledTitle>
|
|
60
73
|
</>
|
|
61
74
|
}
|
|
@@ -79,12 +92,14 @@ const StyledTitle = styled.span<{ color: string }>`
|
|
|
79
92
|
font-weight: 600;
|
|
80
93
|
`;
|
|
81
94
|
|
|
82
|
-
const StyledLink = styled.span
|
|
95
|
+
const StyledLink = styled.span<{ $disable: boolean }>`
|
|
83
96
|
color: var(--contextual-blue, #6396e5);
|
|
84
97
|
font-family: Roboto;
|
|
85
98
|
font-size: 14px;
|
|
86
99
|
font-style: normal;
|
|
87
100
|
font-weight: 600;
|
|
101
|
+
cursor: ${props => (props?.$disable ? 'auto' : 'pointer')};
|
|
102
|
+
${props => props?.$disable && `pointer-events: none;`};
|
|
88
103
|
`;
|
|
89
104
|
|
|
90
105
|
export default ReminderTemplate;
|