@bjsdistribution/dms-client-return 0.1.99-prod → 0.2.0-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/components/client-portal/OutstandingTable.js +118 -112
- package/dist/components/client-portal/OutstandingTable.js.map +1 -1
- package/dist/components/fakeData.js.map +1 -1
- package/dist/components/order-daily-overview/common/fakedata.js.map +1 -1
- package/dist/components/order-daily-overview/return-after-table/table/OrderTable.js +33 -31
- package/dist/components/order-daily-overview/return-after-table/table/OrderTable.js.map +1 -1
- package/dist/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.js +82 -79
- package/dist/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.js.map +1 -1
- package/dist/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.js +157 -151
- package/dist/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.js.map +1 -1
- package/dist/components/order-view/order-actions/Dropdown.js +3 -3
- package/dist/components/order-view/order-actions/Dropdown.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/cancel-order/CancelOrderTable.js +47 -45
- package/dist/components/order-view/order-actions/actions/cancel-order/CancelOrderTable.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/cancel-order/ReturnReason.js +36 -23
- package/dist/components/order-view/order-actions/actions/cancel-order/ReturnReason.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.js +25 -23
- package/dist/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/force-debrief/ForceDebriefModal.js +89 -88
- package/dist/components/order-view/order-actions/actions/force-debrief/ForceDebriefModal.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/force-debrief/charges/collection-add-ons/index.js +16 -16
- package/dist/components/order-view/order-actions/actions/force-debrief/charges/collection-add-ons/index.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/force-debrief/escalation/EscalationReason.js +23 -22
- package/dist/components/order-view/order-actions/actions/force-debrief/escalation/EscalationReason.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/RadioButtons.js +56 -52
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/RadioButtons.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/FailureReasonDropdown.js +27 -26
- package/dist/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/FailureReasonDropdown.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/hold-order/HoldOrderModal.js +29 -29
- package/dist/components/order-view/order-actions/actions/hold-order/HoldOrderModal.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/split-order/SplitOrderTable.js +72 -71
- package/dist/components/order-view/order-actions/actions/split-order/SplitOrderTable.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/uncancel-order/UncancelOrderTable.js +37 -35
- package/dist/components/order-view/order-actions/actions/uncancel-order/UncancelOrderTable.js.map +1 -1
- package/dist/components/order-view/order-details/expanded-content/services-section/OrderServices.js +20 -18
- package/dist/components/order-view/order-details/expanded-content/services-section/OrderServices.js.map +1 -1
- package/dist/components/order-view/order-details/expanded-content/services-section/ServiceType.js +26 -22
- package/dist/components/order-view/order-details/expanded-content/services-section/ServiceType.js.map +1 -1
- package/dist/components/order-view/order-details/helper.js.map +1 -1
- package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.js +53 -53
- package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.js.map +1 -1
- package/dist/components/order-view/toolbox-resources/expanded-content/index.js +6 -7
- package/dist/components/order-view/toolbox-resources/expanded-content/index.js.map +1 -1
- package/dist/components/utils.js +4 -5
- package/dist/components/utils.js.map +1 -1
- package/dist/types/components/order-view/order-actions/Dropdown.d.ts +1 -0
- package/dist/types/components/utils.d.ts +0 -1
- package/package.json +2 -2
package/dist/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.js
CHANGED
|
@@ -1,38 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import n from "styled-components";
|
|
3
3
|
import { useProductDetails as d } from "../../../../store.js";
|
|
4
|
-
import { Skeleton as
|
|
5
|
-
import { useLoading as
|
|
6
|
-
import { StyledTableWrapper as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
import { Skeleton as c, Empty as a } from "antd";
|
|
5
|
+
import { useLoading as s } from "../../../../../order-daily-overview/store/store.js";
|
|
6
|
+
import { StyledTableWrapper as p, StyledTable as h, EmptyDataContainer as m } from "./ReminderStyles.js";
|
|
7
|
+
import { useClientPortal as f } from "../../../../../store.js";
|
|
8
|
+
import { toReverseDeliveryLabel as u } from "@bjsdistribution/dms-component-library";
|
|
9
|
+
function _() {
|
|
10
|
+
const [i] = d(), [l] = s(), [o] = f();
|
|
11
|
+
return i ? /* @__PURE__ */ r(g, { children: [
|
|
12
|
+
/* @__PURE__ */ r(y, { children: [
|
|
11
13
|
"Products (",
|
|
12
|
-
|
|
14
|
+
i?.length,
|
|
13
15
|
")"
|
|
14
16
|
] }),
|
|
15
|
-
/* @__PURE__ */ t(
|
|
16
|
-
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */
|
|
17
|
+
/* @__PURE__ */ t(p, { children: /* @__PURE__ */ r(h, { className: "scrollClass", children: [
|
|
18
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ r("tr", { children: [
|
|
17
19
|
/* @__PURE__ */ t("th", { children: "Action" }),
|
|
18
20
|
/* @__PURE__ */ t("th", { children: "Code" }),
|
|
19
21
|
/* @__PURE__ */ t("th", { children: "Description" }),
|
|
20
22
|
/* @__PURE__ */ t("th", { children: "Parts" })
|
|
21
23
|
] }) }),
|
|
22
|
-
/* @__PURE__ */ t("tbody", { children: l ? /* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */ t("td", { colSpan: 6, children: /* @__PURE__ */ t(
|
|
24
|
+
/* @__PURE__ */ t("tbody", { children: l ? /* @__PURE__ */ r("tr", { children: [
|
|
25
|
+
/* @__PURE__ */ t("td", { colSpan: 6, children: /* @__PURE__ */ t(c, { active: !0 }) }),
|
|
24
26
|
/* @__PURE__ */ t("td", { colSpan: 6 })
|
|
25
|
-
] }) :
|
|
26
|
-
/* @__PURE__ */ t("td", { children:
|
|
27
|
+
] }) : i?.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { className: "emptyTd", colSpan: 7, children: /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(a, {}) }) }) }) : i?.map((e) => /* @__PURE__ */ r("tr", { children: [
|
|
28
|
+
/* @__PURE__ */ t("td", { children: o ? e?.order_product_type?.type : u(e?.order_product_type?.type) }),
|
|
27
29
|
" ",
|
|
28
|
-
/* @__PURE__ */ t("td", { children:
|
|
29
|
-
/* @__PURE__ */ t("td", { children:
|
|
30
|
-
/* @__PURE__ */ t("td", { children:
|
|
31
|
-
] },
|
|
30
|
+
/* @__PURE__ */ t("td", { children: e?.code }),
|
|
31
|
+
/* @__PURE__ */ t("td", { children: e?.description }),
|
|
32
|
+
/* @__PURE__ */ t("td", { children: e?.sku })
|
|
33
|
+
] }, e.id)) })
|
|
32
34
|
] }) })
|
|
33
35
|
] }) : null;
|
|
34
36
|
}
|
|
35
|
-
const
|
|
37
|
+
const y = n.h2`
|
|
36
38
|
color: #3a3630;
|
|
37
39
|
font-family: 'Roboto', sans-serif;
|
|
38
40
|
font-size: 16px;
|
|
@@ -41,7 +43,7 @@ const m = i.h2`
|
|
|
41
43
|
text-transform: uppercase;
|
|
42
44
|
padding: 0;
|
|
43
45
|
margin: 0;
|
|
44
|
-
`,
|
|
46
|
+
`, g = n.div`
|
|
45
47
|
display: flex;
|
|
46
48
|
flex-direction: column;
|
|
47
49
|
gap: 8px;
|
|
@@ -50,6 +52,6 @@ const m = i.h2`
|
|
|
50
52
|
}
|
|
51
53
|
`;
|
|
52
54
|
export {
|
|
53
|
-
|
|
55
|
+
_ as default
|
|
54
56
|
};
|
|
55
57
|
//# sourceMappingURL=ProductTable.js.map
|
package/dist/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductTable.js","sources":["../../../../../../../src/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { useProductDetails } from '../../../../store';\n\nimport { Empty, Skeleton } from 'antd';\nimport { useLoading } from '../../../../../order-daily-overview/store/store';\nimport {\n EmptyDataContainer,\n StyledTable,\n StyledTableWrapper,\n} from './ReminderStyles';\n\nfunction ProductTable() {\n const [orderProductDetails] = useProductDetails();\n const [loading] = useLoading();\n\n if (!orderProductDetails) {\n return null;\n }\n\n return (\n <Container>\n <Title>Products ({orderProductDetails?.length})</Title>\n <StyledTableWrapper>\n <StyledTable className=\"scrollClass\">\n <thead>\n <tr>\n <th>Action</th>\n <th>Code</th>\n <th>Description</th>\n <th>Parts</th>\n </tr>\n </thead>\n <tbody>\n {loading ? (\n <tr>\n <td colSpan={6}>\n <Skeleton active />\n </td>\n <td colSpan={6}></td>\n </tr>\n ) : orderProductDetails?.length === 0 ? (\n <tr>\n <td className=\"emptyTd\" colSpan={7}>\n <EmptyDataContainer>\n <Empty />\n </EmptyDataContainer>\n </td>\n </tr>\n ) : (\n orderProductDetails?.map((order: any) => (\n <tr key={order.id}>\n <td
|
|
1
|
+
{"version":3,"file":"ProductTable.js","sources":["../../../../../../../src/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { useProductDetails } from '../../../../store';\n\nimport { Empty, Skeleton } from 'antd';\nimport { useLoading } from '../../../../../order-daily-overview/store/store';\nimport {\n EmptyDataContainer,\n StyledTable,\n StyledTableWrapper,\n} from './ReminderStyles';\nimport { useClientPortal } from '../../../../../store';\nimport { toReverseDeliveryLabel } from '@bjsdistribution/dms-component-library';\n\nfunction ProductTable() {\n const [orderProductDetails] = useProductDetails();\n const [loading] = useLoading();\n const [isClientPortal] = useClientPortal();\n\n if (!orderProductDetails) {\n return null;\n }\n\n return (\n <Container>\n <Title>Products ({orderProductDetails?.length})</Title>\n <StyledTableWrapper>\n <StyledTable className=\"scrollClass\">\n <thead>\n <tr>\n <th>Action</th>\n <th>Code</th>\n <th>Description</th>\n <th>Parts</th>\n </tr>\n </thead>\n <tbody>\n {loading ? (\n <tr>\n <td colSpan={6}>\n <Skeleton active />\n </td>\n <td colSpan={6}></td>\n </tr>\n ) : orderProductDetails?.length === 0 ? (\n <tr>\n <td className=\"emptyTd\" colSpan={7}>\n <EmptyDataContainer>\n <Empty />\n </EmptyDataContainer>\n </td>\n </tr>\n ) : (\n orderProductDetails?.map((order: any) => (\n <tr key={order.id}>\n <td>\n {isClientPortal\n ? order?.order_product_type?.type\n : toReverseDeliveryLabel(order?.order_product_type?.type)}\n </td>{' '}\n <td>{order?.code}</td>\n <td>{order?.description}</td>\n <td>{order?.sku}</td>\n </tr>\n ))\n )}\n </tbody>\n </StyledTable>\n </StyledTableWrapper>\n </Container>\n );\n}\n\nconst Title = styled.h2`\n color: #3a3630;\n font-family: 'Roboto', sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n text-transform: uppercase;\n padding: 0;\n margin: 0;\n`;\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n gap: 8px;\n > div {\n min-height: 165px;\n }\n`;\n\nexport default ProductTable;\n"],"names":["ProductTable","orderProductDetails","useProductDetails","loading","useLoading","isClientPortal","useClientPortal","Container","jsxs","Title","jsx","StyledTableWrapper","StyledTable","Skeleton","EmptyDataContainer","Empty","order","toReverseDeliveryLabel","styled"],"mappings":";;;;;;;;AAcA,SAASA,IAAe;AACtB,QAAM,CAACC,CAAmB,IAAIC,EAAA,GACxB,CAACC,CAAO,IAAIC,EAAA,GACZ,CAACC,CAAc,IAAIC,EAAA;AAEzB,SAAKL,sBAKFM,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAM,UAAA;AAAA,MAAA;AAAA,MAAWR,GAAqB;AAAA,MAAO;AAAA,IAAA,GAAC;AAAA,IAC/C,gBAAAS,EAACC,GAAA,EACC,UAAA,gBAAAH,EAACI,GAAA,EAAY,WAAU,eACrB,UAAA;AAAA,MAAA,gBAAAF,EAAC,SAAA,EACC,4BAAC,MAAA,EACC,UAAA;AAAA,QAAA,gBAAAA,EAAC,QAAG,UAAA,SAAA,CAAM;AAAA,QACV,gBAAAA,EAAC,QAAG,UAAA,OAAA,CAAI;AAAA,QACR,gBAAAA,EAAC,QAAG,UAAA,cAAA,CAAW;AAAA,QACf,gBAAAA,EAAC,QAAG,UAAA,QAAA,CAAK;AAAA,MAAA,EAAA,CACX,EAAA,CACF;AAAA,MACA,gBAAAA,EAAC,SAAA,EACE,UAAAP,IACC,gBAAAK,EAAC,MAAA,EACC,UAAA;AAAA,QAAA,gBAAAE,EAAC,QAAG,SAAS,GACX,4BAACG,GAAA,EAAS,QAAM,IAAC,EAAA,CACnB;AAAA,QACA,gBAAAH,EAAC,MAAA,EAAG,SAAS,EAAA,CAAG;AAAA,MAAA,EAAA,CAClB,IACET,GAAqB,WAAW,IAClC,gBAAAS,EAAC,QACC,UAAA,gBAAAA,EAAC,MAAA,EAAG,WAAU,WAAU,SAAS,GAC/B,4BAACI,GAAA,EACC,UAAA,gBAAAJ,EAACK,GAAA,CAAA,CAAM,EAAA,CACT,GACF,EAAA,CACF,IAEAd,GAAqB,IAAI,CAACe,MACxB,gBAAAR,EAAC,MAAA,EACC,UAAA;AAAA,QAAA,gBAAAE,EAAC,MAAA,EACE,cACGM,GAAO,oBAAoB,OAC3BC,EAAuBD,GAAO,oBAAoB,IAAI,EAAA,CAC5D;AAAA,QAAM;AAAA,QACN,gBAAAN,EAAC,MAAA,EAAI,UAAAM,GAAO,KAAA,CAAK;AAAA,QACjB,gBAAAN,EAAC,MAAA,EAAI,UAAAM,GAAO,YAAA,CAAY;AAAA,QACxB,gBAAAN,EAAC,MAAA,EAAI,UAAAM,GAAO,IAAA,CAAI;AAAA,MAAA,KARTA,EAAM,EASf,CACD,EAAA,CAEL;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,EAAA,GACF,IAjDO;AAmDX;AAEA,MAAMP,IAAQS,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWfX,IAAYW,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import { jsxs as i, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useCustomerInfo as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
2
|
+
import Me, { useState as b, useEffect as f } from "react";
|
|
3
|
+
import Ge from "../../../../../common/modals/order-action-modal/OrderActionModal.js";
|
|
4
|
+
import { useCustomerInfo as $e, useOrderCustomersList as je, useCurrentAction as ze, useActiveTab as Be, useChargesState as Ue, useOrderDetails as V, usePrevOrderDetails as Ve, useNewStatus as Je, useOrderCancelReason as We, useOrderHoldReason as qe, useFailureReason as Ke, useEscalationCategory as Qe, useEscalationLevel as Xe, useEscalationReason as Ye, useGlobalStateHitOrder as Ze, useGlobalStateHitAuditLog as et, useGlobalEscData as tt, useProductDetails as at, useCustomerDetails as rt } from "../../../store.js";
|
|
5
|
+
import ot from "./charges/order-charges/index.js";
|
|
6
|
+
import st from "./charges/collection-add-ons/index.js";
|
|
7
|
+
import it from "./charges/disposal-charges/index.js";
|
|
8
8
|
import c from "styled-components";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import pt from "
|
|
16
|
-
import
|
|
17
|
-
import
|
|
9
|
+
import nt from "./charges/base-charge/index.js";
|
|
10
|
+
import ct from "./charges/delivery-add-ons/index.js";
|
|
11
|
+
import dt from "./charges/adhoc/index.js";
|
|
12
|
+
import { useClientPortal as lt } from "../../../../store.js";
|
|
13
|
+
import ut from "./order-info/index.js";
|
|
14
|
+
import ft from "./Selector.js";
|
|
15
|
+
import { useAxios as h, useApiHook as pt, Label as J, toReverseDeliveryLabel as mt, Checkbox as ht } from "@bjsdistribution/dms-component-library";
|
|
16
|
+
import gt from "./escalation/index.js";
|
|
17
|
+
import _t from "./notifications/index.js";
|
|
18
|
+
import { filterObject as W, compareOrderDetailsStates as yt } from "../../../utils.js";
|
|
18
19
|
import { notification as n } from "antd";
|
|
19
|
-
import
|
|
20
|
-
import { v4 as
|
|
21
|
-
function
|
|
22
|
-
const [
|
|
20
|
+
import Dt from "./BaseChargeConfirmationModal.js";
|
|
21
|
+
import { v4 as bt } from "uuid";
|
|
22
|
+
function Ct(v) {
|
|
23
|
+
const [Q] = lt(), [R, X] = $e(), [Y, Z] = je(), ee = `${R?.recipient_name}, ${R?.postcode}`, [, te] = ze(), [s, k] = Be(), ae = (e) => k(e), [x, re] = Ue(), [p, m] = b({}), [oe, se] = b([]), [o, A] = V(), [g, ie] = Ve(), [w, ne] = b(!0), [d, ce] = Je(), [F, de] = We(), [T, le] = qe(), [N, ue] = Ke(), [I, fe] = Qe(), [L, pe] = Xe(), [H, me] = Ye(), [, M] = Ze(), [, he] = et(), [, ge] = tt(), [_e, G] = b(
|
|
23
24
|
!1
|
|
24
|
-
), [
|
|
25
|
+
), [ye] = at(), $ = ye?.sort((e, r) => e?.status === r?.status ? 0 : e?.status ? -1 : 1), j = Array.isArray($) ? $?.filter((e) => e?.status === !0) : [], [De] = V(), O = De?.customer_id, {
|
|
25
26
|
data: _,
|
|
26
|
-
loading:
|
|
27
|
-
fetchData:
|
|
27
|
+
loading: be,
|
|
28
|
+
fetchData: Ce
|
|
28
29
|
} = h({
|
|
29
30
|
endpoint: "/v1/customer/list",
|
|
30
31
|
method: "GET",
|
|
@@ -34,60 +35,60 @@ function yt(v) {
|
|
|
34
35
|
f(() => {
|
|
35
36
|
if (_ && _?.data) {
|
|
36
37
|
const e = _?.data;
|
|
37
|
-
|
|
38
|
+
Z(e);
|
|
38
39
|
}
|
|
39
|
-
}, [_,
|
|
40
|
-
|
|
40
|
+
}, [_, be]), f(() => {
|
|
41
|
+
Ce();
|
|
41
42
|
}, []);
|
|
42
|
-
const [S,
|
|
43
|
+
const [S, ve] = rt(), { data: y, loading: xe, setShouldPerformAction: Ae } = pt({
|
|
43
44
|
endpoint: `customers/${O}`,
|
|
44
45
|
method: "GET",
|
|
45
46
|
performAction: !1
|
|
46
47
|
});
|
|
47
48
|
f(() => {
|
|
48
|
-
O &&
|
|
49
|
+
O && Ae(!0);
|
|
49
50
|
}, [O]), f(() => {
|
|
50
51
|
if (y && y?.data) {
|
|
51
52
|
const e = y?.data;
|
|
52
|
-
|
|
53
|
+
ve(e);
|
|
53
54
|
}
|
|
54
|
-
}, [y,
|
|
55
|
-
const
|
|
55
|
+
}, [y, xe]);
|
|
56
|
+
const we = Y?.find(
|
|
56
57
|
(e) => e?.id === S?.id
|
|
57
|
-
),
|
|
58
|
-
id:
|
|
58
|
+
), Oe = Array.from({ length: 9 }, () => ({
|
|
59
|
+
id: bt(),
|
|
59
60
|
adhoc_charges_description: "",
|
|
60
61
|
adhoc_charges: 0
|
|
61
62
|
})), {
|
|
62
|
-
fetchData:
|
|
63
|
+
fetchData: Se,
|
|
63
64
|
data: z,
|
|
64
|
-
loading:
|
|
65
|
+
loading: Ee
|
|
65
66
|
} = h({
|
|
66
67
|
endpoint: "/finance/debrief/getData/all/",
|
|
67
68
|
method: "GET"
|
|
68
69
|
});
|
|
69
70
|
f(() => {
|
|
70
|
-
|
|
71
|
+
re((e) => ({
|
|
71
72
|
...e,
|
|
72
|
-
adhoc_charges:
|
|
73
|
-
})),
|
|
73
|
+
adhoc_charges: Oe
|
|
74
|
+
})), Se();
|
|
74
75
|
}, []), f(() => {
|
|
75
|
-
z?.data &&
|
|
76
|
-
}, [
|
|
77
|
-
const { fetchData:
|
|
76
|
+
z?.data && se(z?.data[0]);
|
|
77
|
+
}, [Ee]);
|
|
78
|
+
const { fetchData: Pe } = h({
|
|
78
79
|
endpoint: "/orders/update/",
|
|
79
80
|
method: "PUT"
|
|
80
|
-
}), { fetchData:
|
|
81
|
+
}), { fetchData: Re } = h({
|
|
81
82
|
endpoint: "/invoices/force-debrief/",
|
|
82
83
|
method: "POST"
|
|
83
|
-
}), { fetchData:
|
|
84
|
+
}), { fetchData: ke } = h({
|
|
84
85
|
endpoint: "/orders/escalations/create/",
|
|
85
86
|
method: "POST"
|
|
86
87
|
}), B = () => {
|
|
87
|
-
A(g),
|
|
88
|
-
}, ke = () => {
|
|
89
|
-
B(), ee(void 0);
|
|
88
|
+
A(g), ce(""), de(""), le(""), ue(""), fe(""), pe(""), me(""), k("success");
|
|
90
89
|
}, Fe = () => {
|
|
90
|
+
B(), te(void 0);
|
|
91
|
+
}, Te = () => {
|
|
91
92
|
const e = [
|
|
92
93
|
"order_locked",
|
|
93
94
|
"order_communications",
|
|
@@ -101,9 +102,9 @@ function yt(v) {
|
|
|
101
102
|
e
|
|
102
103
|
), D = JSON.stringify(r), E = JSON.stringify(t);
|
|
103
104
|
return !(D === E);
|
|
104
|
-
},
|
|
105
|
+
}, Ne = async (e, r) => {
|
|
105
106
|
try {
|
|
106
|
-
const t = await
|
|
107
|
+
const t = await Re({
|
|
107
108
|
payload: {
|
|
108
109
|
debrief_data: e,
|
|
109
110
|
...s === "failure" ? { failure_data: r } : { failure_data: {} }
|
|
@@ -115,8 +116,8 @@ function yt(v) {
|
|
|
115
116
|
});
|
|
116
117
|
} catch {
|
|
117
118
|
}
|
|
118
|
-
},
|
|
119
|
-
const e =
|
|
119
|
+
}, Ie = async () => {
|
|
120
|
+
const e = yt(
|
|
120
121
|
g,
|
|
121
122
|
o
|
|
122
123
|
), r = [
|
|
@@ -131,28 +132,28 @@ function yt(v) {
|
|
|
131
132
|
t in e ? e[t] = e[t] : t in o && (e[t] = o[t]);
|
|
132
133
|
e?.assemble === !1 && e?.disassemble === !1 && (e.assembly_type = null);
|
|
133
134
|
try {
|
|
134
|
-
let t = await
|
|
135
|
+
let t = await Pe({
|
|
135
136
|
payload: [e]
|
|
136
137
|
});
|
|
137
138
|
t.code === 200 && t?.data?.length > 0 && (n.success({
|
|
138
139
|
message: "Success",
|
|
139
140
|
description: `${t?.message}`
|
|
140
|
-
}), A(t?.data[0]),
|
|
141
|
+
}), A(t?.data[0]), ie(t?.data[0]), X({
|
|
141
142
|
recipient_name: t?.data[0]?.order_recipient?.recipient_name,
|
|
142
143
|
postcode: t?.data[0]?.order_recipient?.postcode
|
|
143
144
|
}), await M(!0));
|
|
144
145
|
} catch {
|
|
145
146
|
A(g);
|
|
146
147
|
}
|
|
147
|
-
},
|
|
148
|
+
}, Le = async (e) => {
|
|
148
149
|
try {
|
|
149
|
-
const r = await
|
|
150
|
+
const r = await ke({
|
|
150
151
|
payload: e
|
|
151
152
|
});
|
|
152
153
|
r?.code === 200 && (n.success({
|
|
153
154
|
message: "Success",
|
|
154
155
|
description: `${r?.message}`
|
|
155
|
-
}),
|
|
156
|
+
}), ge(r?.data));
|
|
156
157
|
} catch {
|
|
157
158
|
}
|
|
158
159
|
}, U = async () => {
|
|
@@ -162,7 +163,7 @@ function yt(v) {
|
|
|
162
163
|
order_number: o?.order_number,
|
|
163
164
|
customer_id: S?.id,
|
|
164
165
|
customer_name: S?.customer_name,
|
|
165
|
-
client_name:
|
|
166
|
+
client_name: we?.client_name,
|
|
166
167
|
recipient_name: o?.order_recipient?.recipient_name,
|
|
167
168
|
order_id: o?.id,
|
|
168
169
|
order_type: o?.order_type?.type,
|
|
@@ -220,44 +221,44 @@ function yt(v) {
|
|
|
220
221
|
return;
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
|
-
if (s === "failure" && w && (!I?.value || !
|
|
224
|
+
if (s === "failure" && w && (!I?.value || !L?.value || !H?.value)) {
|
|
224
225
|
n.error({
|
|
225
226
|
message: "Error",
|
|
226
227
|
description: "Escalation Category, Level and Reason are all mandatory"
|
|
227
228
|
});
|
|
228
229
|
return;
|
|
229
230
|
}
|
|
230
|
-
if (
|
|
231
|
+
if (Te() && await Ie(), s === "failure" && w) {
|
|
231
232
|
const l = [
|
|
232
233
|
{
|
|
233
234
|
order_id: o?.id,
|
|
234
|
-
escalation_reason_id:
|
|
235
|
+
escalation_reason_id: H?.value,
|
|
235
236
|
escalation_category_id: I?.value,
|
|
236
|
-
escalation_level_id:
|
|
237
|
+
escalation_level_id: L?.value,
|
|
237
238
|
is_deleted: !1,
|
|
238
239
|
route_id: o?.order_routes?.route_id
|
|
239
240
|
}
|
|
240
241
|
];
|
|
241
|
-
await
|
|
242
|
+
await Le(l);
|
|
242
243
|
}
|
|
243
|
-
await
|
|
244
|
+
await Ne(E, D), await he(!0), B(), await v?.callOrderStatusApi(), await v?.callOrderAlertsApi(), await v?.callOrdersApi();
|
|
244
245
|
};
|
|
245
246
|
return /* @__PURE__ */ i(
|
|
246
|
-
|
|
247
|
+
Ge,
|
|
247
248
|
{
|
|
248
249
|
headerTitle: "Order Debrief",
|
|
249
|
-
onCloseHeader:
|
|
250
|
-
infoText:
|
|
250
|
+
onCloseHeader: Fe,
|
|
251
|
+
infoText: ee,
|
|
251
252
|
onSubmit: () => {
|
|
252
253
|
x?.base_charge > 200 ? G(!0) : U();
|
|
253
254
|
},
|
|
254
255
|
submitBtnTitle: "Complete Order",
|
|
255
256
|
maxWidth: "95vw",
|
|
256
|
-
headerActions: /* @__PURE__ */ a(
|
|
257
|
+
headerActions: /* @__PURE__ */ a(ft, { onSwitchChange: ae }),
|
|
257
258
|
children: [
|
|
258
|
-
/* @__PURE__ */ i(
|
|
259
|
-
/* @__PURE__ */ a(
|
|
260
|
-
/* @__PURE__ */ a(C, { children: /* @__PURE__ */ a(
|
|
259
|
+
/* @__PURE__ */ i(xt, { children: [
|
|
260
|
+
/* @__PURE__ */ a(_t, {}),
|
|
261
|
+
/* @__PURE__ */ a(C, { children: /* @__PURE__ */ a(ut, {}) }),
|
|
261
262
|
/* @__PURE__ */ i(C, { children: [
|
|
262
263
|
/* @__PURE__ */ i(P, { children: [
|
|
263
264
|
/* @__PURE__ */ a(
|
|
@@ -274,10 +275,10 @@ function yt(v) {
|
|
|
274
275
|
/* @__PURE__ */ a(K, { children: o?.other_instructions || "N/A" })
|
|
275
276
|
] })
|
|
276
277
|
] }),
|
|
277
|
-
j?.length > 0 && /* @__PURE__ */ a(
|
|
278
|
+
j?.length > 0 && /* @__PURE__ */ a(At, { children: /* @__PURE__ */ a(P, { children: j?.map((e, r) => /* @__PURE__ */ i(vt, { children: [
|
|
278
279
|
/* @__PURE__ */ a(u, { children: "*" }),
|
|
279
280
|
/* @__PURE__ */ a(u, { children: e?.status_value || "N/A" }),
|
|
280
|
-
/* @__PURE__ */ a(u, { children: e?.order_product_type?.type || "N/A" }),
|
|
281
|
+
/* @__PURE__ */ a(u, { children: (Q ? e?.order_product_type?.type : mt(e?.order_product_type?.type)) || "N/A" }),
|
|
281
282
|
/* @__PURE__ */ a(u, { children: e?.sku || "N/A" }),
|
|
282
283
|
/* @__PURE__ */ a(u, { children: "Part 1 of 1" }),
|
|
283
284
|
/* @__PURE__ */ a(u, { children: "Weight:" + e?.weight || "N/A" }),
|
|
@@ -286,15 +287,15 @@ function yt(v) {
|
|
|
286
287
|
/* @__PURE__ */ i(C, { children: [
|
|
287
288
|
/* @__PURE__ */ i(q, { children: [
|
|
288
289
|
/* @__PURE__ */ a(
|
|
289
|
-
|
|
290
|
+
nt,
|
|
290
291
|
{
|
|
291
292
|
inputValue: p,
|
|
292
293
|
setInputValue: m,
|
|
293
|
-
staticData:
|
|
294
|
+
staticData: oe
|
|
294
295
|
}
|
|
295
296
|
),
|
|
296
297
|
/* @__PURE__ */ a(
|
|
297
|
-
|
|
298
|
+
ct,
|
|
298
299
|
{
|
|
299
300
|
inputValue: p,
|
|
300
301
|
setInputValue: m
|
|
@@ -303,39 +304,39 @@ function yt(v) {
|
|
|
303
304
|
] }),
|
|
304
305
|
/* @__PURE__ */ i(q, { children: [
|
|
305
306
|
/* @__PURE__ */ a(
|
|
306
|
-
|
|
307
|
+
st,
|
|
307
308
|
{
|
|
308
309
|
inputValue: p,
|
|
309
310
|
setInputValue: m
|
|
310
311
|
}
|
|
311
312
|
),
|
|
312
313
|
/* @__PURE__ */ a(
|
|
313
|
-
|
|
314
|
+
it,
|
|
314
315
|
{
|
|
315
316
|
inputValue: p,
|
|
316
317
|
setInputValue: m
|
|
317
318
|
}
|
|
318
319
|
)
|
|
319
320
|
] }),
|
|
320
|
-
/* @__PURE__ */ a(
|
|
321
|
-
/* @__PURE__ */ a(
|
|
321
|
+
/* @__PURE__ */ a(ot, { inputValue: p, setInputValue: m }),
|
|
322
|
+
/* @__PURE__ */ a(dt, {})
|
|
322
323
|
] }),
|
|
323
324
|
s === "failure" && /* @__PURE__ */ i(C, { style: { flexDirection: "column", gap: "10px" }, children: [
|
|
324
325
|
/* @__PURE__ */ i("div", { style: { display: "flex", gap: "10px" }, children: [
|
|
325
326
|
"Escalation",
|
|
326
327
|
/* @__PURE__ */ a(
|
|
327
|
-
|
|
328
|
+
ht,
|
|
328
329
|
{
|
|
329
330
|
checked: w,
|
|
330
|
-
onChange: (e) =>
|
|
331
|
+
onChange: (e) => ne(e.target.checked)
|
|
331
332
|
}
|
|
332
333
|
)
|
|
333
334
|
] }),
|
|
334
|
-
/* @__PURE__ */ a(
|
|
335
|
+
/* @__PURE__ */ a(gt, {})
|
|
335
336
|
] })
|
|
336
337
|
] }),
|
|
337
|
-
|
|
338
|
-
|
|
338
|
+
_e && /* @__PURE__ */ a(
|
|
339
|
+
Dt,
|
|
339
340
|
{
|
|
340
341
|
setConfirmationModal: G,
|
|
341
342
|
onProceed: U
|
|
@@ -351,11 +352,11 @@ const u = c.span`
|
|
|
351
352
|
font-weight: 400;
|
|
352
353
|
text-transform: capitalize;
|
|
353
354
|
color: #3a3630;
|
|
354
|
-
`,
|
|
355
|
+
`, vt = c.div`
|
|
355
356
|
display: flex;
|
|
356
357
|
flex-wrap: wrap;
|
|
357
358
|
gap: 16px;
|
|
358
|
-
`,
|
|
359
|
+
`, xt = c.div`
|
|
359
360
|
padding: 10px;
|
|
360
361
|
display: flex;
|
|
361
362
|
flex-direction: column;
|
|
@@ -381,7 +382,7 @@ const u = c.span`
|
|
|
381
382
|
background: #f8fafc;
|
|
382
383
|
width: 100%;
|
|
383
384
|
white-space: nowrap;
|
|
384
|
-
`,
|
|
385
|
+
`, At = c.div`
|
|
385
386
|
display: flex;
|
|
386
387
|
padding: 12px;
|
|
387
388
|
flex-direction: row;
|
|
@@ -395,10 +396,10 @@ const u = c.span`
|
|
|
395
396
|
min-height: 60px;
|
|
396
397
|
overflow: scroll;
|
|
397
398
|
max-height: 150px;
|
|
398
|
-
`,
|
|
399
|
+
`, qt = Me.memo(Ct);
|
|
399
400
|
export {
|
|
400
401
|
C as ContentContainer,
|
|
401
|
-
|
|
402
|
-
|
|
402
|
+
At as ProductDiv,
|
|
403
|
+
qt as default
|
|
403
404
|
};
|
|
404
405
|
//# sourceMappingURL=ForceDebriefModal.js.map
|