@bjsdistribution/dms-client-return 0.1.97-prod → 0.1.98-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/ChevronDownIcon.js +26 -0
- package/dist/assets/icons/ChevronDownIcon.js.map +1 -0
- package/dist/common/modals/order-action-modal/OrderActionModal.js.map +1 -1
- package/dist/common/modals/order-action-modal/footer/OrderActionFooter.js.map +1 -1
- package/dist/components/order-view/notes/order-dropdown/NewReturnDropdown.js +7 -7
- package/dist/components/order-view/notes/order-dropdown/NewReturnDropdown.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/split-order/SplitOrderTable.js +222 -55
- package/dist/components/order-view/order-actions/actions/split-order/SplitOrderTable.js.map +1 -1
- package/dist/components/order-view/order-actions/actions/split-order/index.js +50 -37
- package/dist/components/order-view/order-actions/actions/split-order/index.js.map +1 -1
- package/dist/components/order-view/products-info/collapsed-content/index.js +1 -1
- package/dist/components/order-view/products-info/collapsed-content/index.js.map +1 -1
- package/dist/components/order-view/products-info/index.js +36 -36
- package/dist/components/order-view/products-info/index.js.map +1 -1
- package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.js +333 -162
- package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.js.map +1 -1
- package/dist/components/order-view/return-client-products/product-table/palletGrouping.js +47 -0
- package/dist/components/order-view/return-client-products/product-table/palletGrouping.js.map +1 -0
- package/dist/components/order-view/store.js +164 -159
- package/dist/components/order-view/store.js.map +1 -1
- package/dist/types/common/modals/order-action-modal/OrderActionModal.d.ts +2 -1
- package/dist/types/common/modals/order-action-modal/footer/OrderActionFooter.d.ts +1 -1
- package/dist/types/components/order-view/return-client-products/product-table/palletGrouping.d.ts +23 -0
- package/dist/types/components/order-view/store.d.ts +1 -0
- package/package.json +1 -1
package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.js
CHANGED
|
@@ -1,193 +1,256 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { StyledTableWrapper as
|
|
4
|
-
import { Checkbox as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { Skeleton as
|
|
8
|
-
import { useSelectedProducts as
|
|
9
|
-
import
|
|
10
|
-
import { NavLink as
|
|
11
|
-
import { EmptyDataContainer as
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsxs as o, jsx as t, Fragment as K } from "react/jsx-runtime";
|
|
2
|
+
import k, { useState as h, useMemo as D, useEffect as Q } from "react";
|
|
3
|
+
import { StyledTableWrapper as U, StyledTable as X } from "../../../order-daily-overview/return-order-table/return-orders-filters/returnstyles.js";
|
|
4
|
+
import { Checkbox as Y, CancelationModal as Z, CancelAndCompleteAction as ee, useAxios as te, displayValueOrNA as E } from "@bjsdistribution/dms-component-library";
|
|
5
|
+
import ne from "../../../../assets/icons/ActionIcon.js";
|
|
6
|
+
import { useReturnProductDetails as oe, useOrderId as le } from "../../store.js";
|
|
7
|
+
import { Skeleton as ie, Empty as re, Spin as ae, notification as C } from "antd";
|
|
8
|
+
import { useSelectedProducts as de, useNewReturnOrderData as se, useIsShowNorthSouth as ce, useClientPortal as pe } from "../../../store.js";
|
|
9
|
+
import i from "styled-components";
|
|
10
|
+
import { NavLink as he } from "react-router-dom";
|
|
11
|
+
import { EmptyDataContainer as me } from "../../order-actions/actions/charge-log/index.js";
|
|
12
|
+
import m from "../../northern-southern-info/CustomInput.js";
|
|
13
|
+
import fe from "../../../../assets/icons/ChevronDownIcon.js";
|
|
14
|
+
import { groupProductsByPallet as ue, hasAnyPallet as ge, toggleGroupSelectionIds as xe } from "./palletGrouping.js";
|
|
15
|
+
const ze = (a) => {
|
|
16
|
+
const [f, s] = de(), [u, N] = h(!1), [l] = oe(), [S] = le(), [R] = se(), [T] = ce(), [g] = pe(), [A, x] = h(null), [O, b] = h(!1), { loading: c, fetchData: G } = te({
|
|
15
17
|
endpoint: "v1/return/product/remove/",
|
|
16
18
|
method: "POST"
|
|
17
|
-
}),
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
19
|
+
}), L = (e) => {
|
|
20
|
+
x(e), b(!0);
|
|
21
|
+
}, j = async () => {
|
|
22
|
+
if (A === null) return;
|
|
23
|
+
const e = A;
|
|
22
24
|
try {
|
|
23
|
-
const
|
|
25
|
+
const n = await G({
|
|
24
26
|
payload: {
|
|
25
|
-
return_order_product_id:
|
|
26
|
-
return_order_id: +
|
|
27
|
+
return_order_product_id: e,
|
|
28
|
+
return_order_id: +S
|
|
27
29
|
}
|
|
28
30
|
});
|
|
29
|
-
|
|
31
|
+
n?.code === 200 ? (C.success({
|
|
30
32
|
message: "Success",
|
|
31
|
-
description:
|
|
32
|
-
}),
|
|
33
|
+
description: n?.message || "Product deleted successfully."
|
|
34
|
+
}), a?.callReturnProducts()) : C.error({
|
|
33
35
|
message: "Deletion Failed",
|
|
34
|
-
description:
|
|
36
|
+
description: n?.message || "Could not delete the product."
|
|
35
37
|
});
|
|
36
|
-
} catch (
|
|
37
|
-
console.error("Error deleting product:",
|
|
38
|
+
} catch (n) {
|
|
39
|
+
console.error("Error deleting product:", n), C.error({
|
|
38
40
|
message: "Error",
|
|
39
41
|
//@ts-ignore
|
|
40
|
-
description:
|
|
42
|
+
description: n?.message || "An unexpected error occurred."
|
|
41
43
|
});
|
|
42
44
|
} finally {
|
|
43
|
-
|
|
45
|
+
x(null), b(!1);
|
|
44
46
|
}
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
if (
|
|
49
|
-
|
|
47
|
+
}, M = () => {
|
|
48
|
+
c || (x(null), b(!1));
|
|
49
|
+
}, $ = () => {
|
|
50
|
+
if (u)
|
|
51
|
+
s([]);
|
|
50
52
|
else {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
+
const e = l?.map((n) => n.id);
|
|
54
|
+
s(e);
|
|
53
55
|
}
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
(
|
|
56
|
+
N(!u);
|
|
57
|
+
}, z = (e) => {
|
|
58
|
+
s(
|
|
59
|
+
(n) => n.includes(e) ? n.filter((r) => r !== e) : [...n, e]
|
|
58
60
|
);
|
|
59
|
-
}, y =
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
}, y = l?.length == 0 || R?.length == 0, p = g ? 8 : 9, B = D(() => ue(l), [
|
|
62
|
+
l
|
|
63
|
+
]), F = D(() => ge(l), [l]), [H, w] = h({});
|
|
64
|
+
Q(() => {
|
|
65
|
+
w({});
|
|
66
|
+
}, [S]);
|
|
67
|
+
const W = (e) => e.isNoPallet || !!H[e.key], V = (e) => w((n) => ({ ...n, [e]: !n[e] })), I = (e) => /* @__PURE__ */ o(k.Fragment, { children: [
|
|
68
|
+
/* @__PURE__ */ o("tr", { className: "product-row", children: [
|
|
69
|
+
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(
|
|
70
|
+
P,
|
|
71
|
+
{
|
|
72
|
+
checked: f?.includes(e?.id),
|
|
73
|
+
onChange: () => z(e?.id),
|
|
74
|
+
disabled: y
|
|
75
|
+
}
|
|
76
|
+
) }),
|
|
77
|
+
/* @__PURE__ */ t("td", { children: e?.location || "N/A" }),
|
|
78
|
+
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ o("ul", { style: { listStyleType: "none", padding: 0 }, children: [
|
|
79
|
+
/* @__PURE__ */ t(
|
|
80
|
+
"li",
|
|
81
|
+
{
|
|
82
|
+
style: {
|
|
83
|
+
color: "#0099ff",
|
|
84
|
+
fontWeight: 600
|
|
85
|
+
},
|
|
86
|
+
children: /* @__PURE__ */ t(he, { to: `/orders/view/${e?.order_id}`, children: E(e?.recipient_name) })
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ t("li", { style: { color: "#888075" }, children: E(e?.postcode) })
|
|
90
|
+
] }) }),
|
|
91
|
+
/* @__PURE__ */ t("td", { children: e?.code }),
|
|
92
|
+
/* @__PURE__ */ t("td", { children: e?.description }),
|
|
93
|
+
/* @__PURE__ */ t("td", { children: e?.return_reason }),
|
|
94
|
+
!g && /* @__PURE__ */ t("td", { children: Array.isArray(e?.product_addon_services) && e?.product_addon_services?.length > 0 ? e.product_addon_services.map((n) => n?.service_code || n?.name || n).filter(Boolean).join(", ") : Array.isArray(e?.addon_services) && e?.addon_services?.length > 0 ? e.addon_services.map((n) => n?.service_code || n?.name || n).filter(Boolean).join(", ") : Array.isArray(e?.addon_services_list) && e?.addon_services_list?.length > 0 ? e.addon_services_list.join(", ") : typeof e?.addon_services == "string" && e?.addon_services.trim() !== "" ? e.addon_services : "NA" }),
|
|
95
|
+
/* @__PURE__ */ t("td", { children: e?.part }),
|
|
96
|
+
/* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(
|
|
97
|
+
"div",
|
|
98
|
+
{
|
|
99
|
+
onClick: (n) => {
|
|
100
|
+
n.stopPropagation(), n.preventDefault(), L(e?.id);
|
|
101
|
+
},
|
|
102
|
+
style: { cursor: "pointer" },
|
|
103
|
+
children: /* @__PURE__ */ t(ne, {})
|
|
104
|
+
}
|
|
105
|
+
) })
|
|
106
|
+
] }),
|
|
107
|
+
T === !0 && /* @__PURE__ */ t("td", { colSpan: p, children: /* @__PURE__ */ o(be, { children: [
|
|
108
|
+
/* @__PURE__ */ t("div", { className: "left", children: "Northern/Southern Ireland" }),
|
|
109
|
+
/* @__PURE__ */ t("div", { className: "left-end" }),
|
|
110
|
+
/* @__PURE__ */ o("div", { className: "section", children: [
|
|
111
|
+
/* @__PURE__ */ t(
|
|
112
|
+
m,
|
|
113
|
+
{
|
|
114
|
+
label: "Commodity Code",
|
|
115
|
+
type: "text",
|
|
116
|
+
direction: "row",
|
|
117
|
+
placeholder: "Enter Commodity Code",
|
|
118
|
+
value: e?.product_customs_details?.commodity_code || "NA",
|
|
119
|
+
disabled: !0
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ t(
|
|
123
|
+
m,
|
|
124
|
+
{
|
|
125
|
+
label: "Country of Origin",
|
|
126
|
+
type: "text",
|
|
127
|
+
direction: "row",
|
|
128
|
+
placeholder: "Enter Country of Origin",
|
|
129
|
+
value: e?.product_customs_details?.country_of_origin || "NA",
|
|
130
|
+
disabled: !0
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
/* @__PURE__ */ t(
|
|
134
|
+
m,
|
|
135
|
+
{
|
|
136
|
+
label: "Item Invoice Amount",
|
|
137
|
+
type: "number",
|
|
138
|
+
direction: "row",
|
|
139
|
+
placeholder: "Enter Item Invoice Amount",
|
|
140
|
+
value: e?.product_customs_details?.item_invoice_amount || 0,
|
|
141
|
+
disabled: !0
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
/* @__PURE__ */ t(
|
|
145
|
+
m,
|
|
146
|
+
{
|
|
147
|
+
label: "NI Additional Info Codes",
|
|
148
|
+
type: "text",
|
|
149
|
+
direction: "row",
|
|
150
|
+
placeholder: "Enter NI Add Info Codes",
|
|
151
|
+
value: e?.product_customs_details?.ni_additional_information_codes || "NA",
|
|
152
|
+
disabled: !0
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
] })
|
|
156
|
+
] }) })
|
|
157
|
+
] }, e.id), q = (e, n) => {
|
|
158
|
+
const r = e.items.map((v) => v?.id), d = xe(
|
|
159
|
+
f,
|
|
160
|
+
r,
|
|
161
|
+
n
|
|
162
|
+
);
|
|
163
|
+
s(d), N(d.length === l?.length);
|
|
164
|
+
}, J = (e) => {
|
|
165
|
+
const n = W(e), r = e.items.filter(
|
|
166
|
+
(_) => f?.includes(_?.id)
|
|
167
|
+
).length, d = e.items.length > 0 && r === e.items.length, v = `${e.items.length} ${e.items.length === 1 ? "item" : "items"}`;
|
|
168
|
+
return /* @__PURE__ */ o(k.Fragment, { children: [
|
|
169
|
+
/* @__PURE__ */ t(ye, { className: e.isNoPallet ? "no-pallet" : void 0, children: /* @__PURE__ */ t("td", { colSpan: p, children: /* @__PURE__ */ o(ve, { children: [
|
|
170
|
+
/* @__PURE__ */ t(
|
|
171
|
+
P,
|
|
172
|
+
{
|
|
173
|
+
checked: d,
|
|
174
|
+
onChange: () => q(e, d),
|
|
175
|
+
disabled: y,
|
|
176
|
+
"aria-label": e.isNoPallet ? "Select all items with no pallet ID" : `Select all items on pallet ${e.label}`
|
|
177
|
+
}
|
|
178
|
+
),
|
|
179
|
+
/* @__PURE__ */ o(
|
|
180
|
+
_e,
|
|
181
|
+
{
|
|
182
|
+
type: "button",
|
|
183
|
+
disabled: e.isNoPallet,
|
|
184
|
+
onClick: e.isNoPallet ? void 0 : () => V(e.key),
|
|
185
|
+
"aria-expanded": e.isNoPallet ? void 0 : n,
|
|
186
|
+
children: [
|
|
187
|
+
!e.isNoPallet && /* @__PURE__ */ t(Ce, { $isExpanded: n, children: /* @__PURE__ */ t(fe, {}) }),
|
|
188
|
+
/* @__PURE__ */ t("span", { className: "title", children: e.isNoPallet ? /* @__PURE__ */ t("span", { children: "No Pallet ID" }) : /* @__PURE__ */ o(K, { children: [
|
|
189
|
+
/* @__PURE__ */ t("span", { children: "Pallet ID:" }),
|
|
190
|
+
/* @__PURE__ */ t("strong", { children: e.label })
|
|
191
|
+
] }) }),
|
|
192
|
+
/* @__PURE__ */ o("span", { className: "count", children: [
|
|
193
|
+
"(",
|
|
194
|
+
v,
|
|
195
|
+
")"
|
|
196
|
+
] }),
|
|
197
|
+
e.depotLocation && /* @__PURE__ */ t("span", { className: "depot", children: e.depotLocation }),
|
|
198
|
+
r > 0 && /* @__PURE__ */ o("span", { className: "selected", children: [
|
|
199
|
+
r,
|
|
200
|
+
" selected"
|
|
201
|
+
] }),
|
|
202
|
+
!e.isNoPallet && /* @__PURE__ */ t(Pe, { "aria-hidden": "true", children: n ? "−" : "+" })
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
] }) }) }),
|
|
207
|
+
n && e.items.map((_) => I(_))
|
|
208
|
+
] }, e.key);
|
|
209
|
+
};
|
|
210
|
+
return /* @__PURE__ */ o("div", { children: [
|
|
211
|
+
/* @__PURE__ */ t(U, { id: "tableScrolling", className: "orderProductTable", children: /* @__PURE__ */ o(X, { children: [
|
|
212
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ o("tr", { children: [
|
|
213
|
+
/* @__PURE__ */ t("th", { className: "emailproductsCheckbox", children: /* @__PURE__ */ t(
|
|
214
|
+
P,
|
|
65
215
|
{
|
|
66
216
|
disabled: y,
|
|
67
|
-
checked:
|
|
68
|
-
onChange:
|
|
217
|
+
checked: u,
|
|
218
|
+
onChange: $
|
|
69
219
|
}
|
|
70
220
|
) }),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
!
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ t("th", { children: "Location" }),
|
|
222
|
+
/* @__PURE__ */ t("th", { children: "Sender" }),
|
|
223
|
+
/* @__PURE__ */ t("th", { children: "Code" }),
|
|
224
|
+
/* @__PURE__ */ t("th", { children: "Description" }),
|
|
225
|
+
/* @__PURE__ */ t("th", { children: "Return Reason" }),
|
|
226
|
+
!g && /* @__PURE__ */ t("th", { children: "Additional Services" }),
|
|
227
|
+
/* @__PURE__ */ t("th", { children: "Part" }),
|
|
228
|
+
/* @__PURE__ */ t("th", { children: "Action" })
|
|
79
229
|
] }) }),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/*
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
{
|
|
85
|
-
checked: b?.includes(t?.id),
|
|
86
|
-
onChange: () => O(t?.id),
|
|
87
|
-
disabled: y
|
|
88
|
-
}
|
|
89
|
-
) }),
|
|
90
|
-
/* @__PURE__ */ e("td", { children: t?.location || "N/A" }),
|
|
91
|
-
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ r("ul", { style: { listStyleType: "none", padding: 0 }, children: [
|
|
92
|
-
/* @__PURE__ */ e(
|
|
93
|
-
"li",
|
|
94
|
-
{
|
|
95
|
-
style: {
|
|
96
|
-
color: "#0099ff",
|
|
97
|
-
fontWeight: 600
|
|
98
|
-
},
|
|
99
|
-
children: /* @__PURE__ */ e(U, { to: `/orders/view/${t?.order_id}`, children: x(t?.recipient_name) })
|
|
100
|
-
}
|
|
101
|
-
),
|
|
102
|
-
/* @__PURE__ */ e("li", { style: { color: "#888075" }, children: x(t?.postcode) })
|
|
103
|
-
] }) }),
|
|
104
|
-
/* @__PURE__ */ e("td", { children: t?.code }),
|
|
105
|
-
/* @__PURE__ */ e("td", { children: t?.description }),
|
|
106
|
-
/* @__PURE__ */ e("td", { children: t?.return_reason }),
|
|
107
|
-
!p && /* @__PURE__ */ e("td", { children: Array.isArray(t?.product_addon_services) && t?.product_addon_services?.length > 0 ? t.product_addon_services.map((o) => o?.service_code || o?.name || o).filter(Boolean).join(", ") : Array.isArray(t?.addon_services) && t?.addon_services?.length > 0 ? t.addon_services.map((o) => o?.service_code || o?.name || o).filter(Boolean).join(", ") : Array.isArray(t?.addon_services_list) && t?.addon_services_list?.length > 0 ? t.addon_services_list.join(", ") : typeof t?.addon_services == "string" && t?.addon_services.trim() !== "" ? t.addon_services : "NA" }),
|
|
108
|
-
/* @__PURE__ */ e("td", { children: t?.part }),
|
|
109
|
-
/* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
|
|
110
|
-
"div",
|
|
111
|
-
{
|
|
112
|
-
onClick: (o) => {
|
|
113
|
-
o.stopPropagation(), o.preventDefault(), D(t?.id);
|
|
114
|
-
},
|
|
115
|
-
style: { cursor: "pointer" },
|
|
116
|
-
children: /* @__PURE__ */ e(F, {})
|
|
117
|
-
}
|
|
118
|
-
) })
|
|
119
|
-
] }),
|
|
120
|
-
S === !0 && /* @__PURE__ */ e("td", { colSpan: p ? 8 : 9, children: /* @__PURE__ */ r(Y, { children: [
|
|
121
|
-
/* @__PURE__ */ e("div", { className: "left", children: "Northern/Southern Ireland" }),
|
|
122
|
-
/* @__PURE__ */ e("div", { className: "left-end" }),
|
|
123
|
-
/* @__PURE__ */ r("div", { className: "section", children: [
|
|
124
|
-
/* @__PURE__ */ e(
|
|
125
|
-
d,
|
|
126
|
-
{
|
|
127
|
-
label: "Commodity Code",
|
|
128
|
-
type: "text",
|
|
129
|
-
direction: "row",
|
|
130
|
-
placeholder: "Enter Commodity Code",
|
|
131
|
-
value: t?.product_customs_details?.commodity_code || "NA",
|
|
132
|
-
disabled: !0
|
|
133
|
-
}
|
|
134
|
-
),
|
|
135
|
-
/* @__PURE__ */ e(
|
|
136
|
-
d,
|
|
137
|
-
{
|
|
138
|
-
label: "Country of Origin",
|
|
139
|
-
type: "text",
|
|
140
|
-
direction: "row",
|
|
141
|
-
placeholder: "Enter Country of Origin",
|
|
142
|
-
value: t?.product_customs_details?.country_of_origin || "NA",
|
|
143
|
-
disabled: !0
|
|
144
|
-
}
|
|
145
|
-
),
|
|
146
|
-
/* @__PURE__ */ e(
|
|
147
|
-
d,
|
|
148
|
-
{
|
|
149
|
-
label: "Item Invoice Amount",
|
|
150
|
-
type: "number",
|
|
151
|
-
direction: "row",
|
|
152
|
-
placeholder: "Enter Item Invoice Amount",
|
|
153
|
-
value: t?.product_customs_details?.item_invoice_amount || 0,
|
|
154
|
-
disabled: !0
|
|
155
|
-
}
|
|
156
|
-
),
|
|
157
|
-
/* @__PURE__ */ e(
|
|
158
|
-
d,
|
|
159
|
-
{
|
|
160
|
-
label: "NI Additional Info Codes",
|
|
161
|
-
type: "text",
|
|
162
|
-
direction: "row",
|
|
163
|
-
placeholder: "Enter NI Add Info Codes",
|
|
164
|
-
value: t?.product_customs_details?.ni_additional_information_codes || "NA",
|
|
165
|
-
disabled: !0
|
|
166
|
-
}
|
|
167
|
-
)
|
|
168
|
-
] })
|
|
169
|
-
] }) })
|
|
170
|
-
] }, t.id)) })
|
|
230
|
+
/* @__PURE__ */ t("tbody", { children: a?.loading || a?.locationloading ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: p, children: /* @__PURE__ */ t(ie, { active: !0 }) }) }) : l?.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: p, children: /* @__PURE__ */ t(me, { children: /* @__PURE__ */ t(re, {}) }) }) }) : F ? B.map(J) : (
|
|
231
|
+
/* Called explicitly so `map`'s index is not passed as `isNoPallet`. */
|
|
232
|
+
l?.map((e) => I(e))
|
|
233
|
+
) })
|
|
171
234
|
] }) }),
|
|
172
|
-
|
|
173
|
-
|
|
235
|
+
O && /* @__PURE__ */ t(ae, { spinning: c, children: /* @__PURE__ */ t(
|
|
236
|
+
Ne,
|
|
174
237
|
{
|
|
175
238
|
title: "Remove Product",
|
|
176
239
|
description: "Are you sure, you want to remove this order product for returns?",
|
|
177
|
-
actions: /* @__PURE__ */
|
|
178
|
-
|
|
240
|
+
actions: /* @__PURE__ */ t(
|
|
241
|
+
Se,
|
|
179
242
|
{
|
|
180
243
|
cancelLabel: "Cancel",
|
|
181
|
-
onCancel:
|
|
182
|
-
completeLabel:
|
|
183
|
-
isDisabled:
|
|
184
|
-
onComplete:
|
|
244
|
+
onCancel: M,
|
|
245
|
+
completeLabel: c ? "REMOVING..." : "Confirm",
|
|
246
|
+
isDisabled: c,
|
|
247
|
+
onComplete: j
|
|
185
248
|
}
|
|
186
249
|
)
|
|
187
250
|
}
|
|
188
251
|
) })
|
|
189
252
|
] });
|
|
190
|
-
},
|
|
253
|
+
}, be = i.div`
|
|
191
254
|
display: flex;
|
|
192
255
|
width: 100%;
|
|
193
256
|
padding: 5px 10px;
|
|
@@ -244,13 +307,121 @@ const ge = (s) => {
|
|
|
244
307
|
background: #fff;
|
|
245
308
|
}
|
|
246
309
|
}
|
|
247
|
-
`,
|
|
310
|
+
`, ye = i.tr`
|
|
311
|
+
> td {
|
|
312
|
+
padding: 0;
|
|
313
|
+
border: none;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/*
|
|
317
|
+
Spec: the No Pallet ID group must be separated from the palletised groups by
|
|
318
|
+
a divider line. Neutral rule only — the rows themselves keep their normal
|
|
319
|
+
background, and the header keeps the same design as the pallet headers.
|
|
320
|
+
*/
|
|
321
|
+
&.no-pallet > td {
|
|
322
|
+
border-top: 1px solid #c9c6c1;
|
|
323
|
+
padding-top: 10px;
|
|
324
|
+
}
|
|
325
|
+
`, ve = i.div`
|
|
326
|
+
/*
|
|
327
|
+
The library Checkbox renders its real <input> as position:absolute with no
|
|
328
|
+
offsets, so it needs a positioned ancestor or the click target drifts away
|
|
329
|
+
from the visible box as the table scrolls. The shared table CSS happens to
|
|
330
|
+
position td already; pinning it here too so this does not depend on that.
|
|
331
|
+
*/
|
|
332
|
+
position: relative;
|
|
333
|
+
display: flex;
|
|
334
|
+
align-items: center;
|
|
335
|
+
gap: 8px;
|
|
336
|
+
width: 100%;
|
|
337
|
+
padding: 8px 12px;
|
|
338
|
+
border: 1px solid #e2e0db;
|
|
339
|
+
border-radius: 6px;
|
|
340
|
+
background: #f1f5f9;
|
|
341
|
+
font-family: 'Roboto', sans-serif;
|
|
342
|
+
font-size: 13px;
|
|
343
|
+
font-weight: 500;
|
|
344
|
+
color: #3a3630;
|
|
345
|
+
|
|
346
|
+
&:hover {
|
|
347
|
+
background: #e7edf4;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
`, _e = i.button`
|
|
351
|
+
display: flex;
|
|
352
|
+
align-items: center;
|
|
353
|
+
gap: 8px;
|
|
354
|
+
flex: 1;
|
|
355
|
+
padding: 0;
|
|
356
|
+
border: none;
|
|
357
|
+
background: transparent;
|
|
358
|
+
cursor: pointer;
|
|
359
|
+
text-align: left;
|
|
360
|
+
font: inherit;
|
|
361
|
+
color: inherit;
|
|
362
|
+
|
|
363
|
+
&:disabled {
|
|
364
|
+
cursor: default;
|
|
365
|
+
/* Inert, but must not read as a greyed-out disabled control. */
|
|
366
|
+
opacity: 1;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.title {
|
|
370
|
+
display: flex;
|
|
371
|
+
align-items: center;
|
|
372
|
+
gap: 6px;
|
|
373
|
+
text-transform: uppercase;
|
|
374
|
+
letter-spacing: 0.3px;
|
|
375
|
+
|
|
376
|
+
strong {
|
|
377
|
+
font-weight: 700;
|
|
378
|
+
text-transform: none;
|
|
379
|
+
letter-spacing: 0;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.count {
|
|
384
|
+
color: #6a7378;
|
|
385
|
+
font-weight: 400;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.depot {
|
|
389
|
+
color: #888075;
|
|
390
|
+
font-weight: 400;
|
|
391
|
+
font-size: 12px;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.selected {
|
|
395
|
+
color: #0099ff;
|
|
396
|
+
font-weight: 600;
|
|
397
|
+
font-size: 12px;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
`, Ce = i.span`
|
|
401
|
+
display: inline-flex;
|
|
402
|
+
align-items: center;
|
|
403
|
+
transition: transform 0.15s ease-in-out;
|
|
404
|
+
transform: rotate(${(a) => a.$isExpanded ? "0deg" : "-90deg"});
|
|
405
|
+
`, Pe = i.span`
|
|
406
|
+
margin-left: auto;
|
|
407
|
+
display: inline-flex;
|
|
408
|
+
align-items: center;
|
|
409
|
+
justify-content: center;
|
|
410
|
+
width: 20px;
|
|
411
|
+
height: 20px;
|
|
412
|
+
border: 1px solid #cbd5e1;
|
|
413
|
+
border-radius: 4px;
|
|
414
|
+
background: #fff;
|
|
415
|
+
font-size: 14px;
|
|
416
|
+
line-height: 1;
|
|
417
|
+
color: #475569;
|
|
418
|
+
`, P = i(Y)`
|
|
248
419
|
&:disabled {
|
|
249
420
|
background-color: gray;
|
|
250
421
|
cursor: not-allowed;
|
|
251
422
|
opacity: -0.4;
|
|
252
423
|
}
|
|
253
|
-
`,
|
|
424
|
+
`, Ne = i(Z)`
|
|
254
425
|
div {
|
|
255
426
|
& > div > div:first-child {
|
|
256
427
|
padding: 8px !important;
|
|
@@ -260,11 +431,11 @@ const ge = (s) => {
|
|
|
260
431
|
width: 28px !important;
|
|
261
432
|
height: 28px !important;
|
|
262
433
|
}
|
|
263
|
-
`,
|
|
434
|
+
`, Se = i(ee)`
|
|
264
435
|
justify-content: center;
|
|
265
436
|
`;
|
|
266
437
|
export {
|
|
267
|
-
|
|
268
|
-
|
|
438
|
+
be as NSWrapper,
|
|
439
|
+
ze as default
|
|
269
440
|
};
|
|
270
441
|
//# sourceMappingURL=ReturnProductTable.js.map
|