@bjsdistribution/dms-client-return 0.2.2-prod → 0.2.3-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.
Files changed (151) hide show
  1. package/dist/common/expand-collapse/index.js +44 -26
  2. package/dist/common/expand-collapse/index.js.map +1 -1
  3. package/dist/common/modals/order-action-modal/OrderActionModal.js.map +1 -1
  4. package/dist/common/modals/order-action-modal/footer/OrderActionFooter.js.map +1 -1
  5. package/dist/components/client-portal/ClientPortalResponsive.js +148 -0
  6. package/dist/components/client-portal/ClientPortalResponsive.js.map +1 -0
  7. package/dist/components/client-portal/OutstandingTable.js +112 -118
  8. package/dist/components/client-portal/OutstandingTable.js.map +1 -1
  9. package/dist/components/client-portal/ReturnOverview.js +38 -37
  10. package/dist/components/client-portal/ReturnOverview.js.map +1 -1
  11. package/dist/components/client-portal/return-confirm/ConfirmedMain.js +4 -4
  12. package/dist/components/client-portal/return-confirm/ConfirmedMain.js.map +1 -1
  13. package/dist/components/client-portal/return-confirm/ReturnConfirmedTable.js +445 -185
  14. package/dist/components/client-portal/return-confirm/ReturnConfirmedTable.js.map +1 -1
  15. package/dist/components/fakeData.js.map +1 -1
  16. package/dist/components/order-daily-overview/common/fakedata.js.map +1 -1
  17. package/dist/components/order-daily-overview/common/mediaQuery.js +17 -0
  18. package/dist/components/order-daily-overview/common/mediaQuery.js.map +1 -0
  19. package/dist/components/order-daily-overview/filters/FilterStyle.js +174 -11
  20. package/dist/components/order-daily-overview/filters/FilterStyle.js.map +1 -1
  21. package/dist/components/order-daily-overview/header/route-header/RouterHeaderStyle.js +9 -4
  22. package/dist/components/order-daily-overview/header/route-header/RouterHeaderStyle.js.map +1 -1
  23. package/dist/components/order-daily-overview/header/route-header/title/HeaderTitle.js +11 -1
  24. package/dist/components/order-daily-overview/header/route-header/title/HeaderTitle.js.map +1 -1
  25. package/dist/components/order-daily-overview/header-filters/Styledfilters.js +46 -17
  26. package/dist/components/order-daily-overview/header-filters/Styledfilters.js.map +1 -1
  27. package/dist/components/order-daily-overview/index.js +76 -53
  28. package/dist/components/order-daily-overview/index.js.map +1 -1
  29. package/dist/components/order-daily-overview/return-after-table/table/OrderTable.js +101 -103
  30. package/dist/components/order-daily-overview/return-after-table/table/OrderTable.js.map +1 -1
  31. package/dist/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.js +135 -134
  32. package/dist/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.js.map +1 -1
  33. package/dist/components/order-daily-overview/return-after-table/table-filters/TableFilters.js +17 -11
  34. package/dist/components/order-daily-overview/return-after-table/table-filters/TableFilters.js.map +1 -1
  35. package/dist/components/order-daily-overview/return-order-table/return-orders-filters/ReturnFilter.js +5 -5
  36. package/dist/components/order-daily-overview/return-order-table/return-orders-filters/ReturnFilter.js.map +1 -1
  37. package/dist/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.js +129 -135
  38. package/dist/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.js.map +1 -1
  39. package/dist/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.js +346 -27
  40. package/dist/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.js.map +1 -1
  41. package/dist/components/order-daily-overview/table/ReturnTable.js +199 -183
  42. package/dist/components/order-daily-overview/table/ReturnTable.js.map +1 -1
  43. package/dist/components/order-daily-overview/table/table-data/styles.js +159 -38
  44. package/dist/components/order-daily-overview/table/table-data/styles.js.map +1 -1
  45. package/dist/components/order-daily-overview/table-view/PaginationStyle.js +21 -6
  46. package/dist/components/order-daily-overview/table-view/PaginationStyle.js.map +1 -1
  47. package/dist/components/order-view/DynamicTable.js +136 -35
  48. package/dist/components/order-view/DynamicTable.js.map +1 -1
  49. package/dist/components/order-view/details-filters/DetailsFilters.js +33 -8
  50. package/dist/components/order-view/details-filters/DetailsFilters.js.map +1 -1
  51. package/dist/components/order-view/details-filters/left-side-filters/ActionsMenu.js +23 -5
  52. package/dist/components/order-view/details-filters/left-side-filters/ActionsMenu.js.map +1 -1
  53. package/dist/components/order-view/details-filters/left-side-filters/dropdowns/DropDowns.js +39 -22
  54. package/dist/components/order-view/details-filters/left-side-filters/dropdowns/DropDowns.js.map +1 -1
  55. package/dist/components/order-view/details-filters/right-side-filters/Details.js +25 -12
  56. package/dist/components/order-view/details-filters/right-side-filters/Details.js.map +1 -1
  57. package/dist/components/order-view/general-information/Status.js +58 -28
  58. package/dist/components/order-view/general-information/Status.js.map +1 -1
  59. package/dist/components/order-view/generic-table/AuditLogs.js +129 -24
  60. package/dist/components/order-view/generic-table/AuditLogs.js.map +1 -1
  61. package/dist/components/order-view/notes/logs/index.js +15 -7
  62. package/dist/components/order-view/notes/logs/index.js.map +1 -1
  63. package/dist/components/order-view/notes/order-dropdown/NewReturnDropdown.js +7 -7
  64. package/dist/components/order-view/notes/order-dropdown/NewReturnDropdown.js.map +1 -1
  65. package/dist/components/order-view/notification/index.js +68 -55
  66. package/dist/components/order-view/notification/index.js.map +1 -1
  67. package/dist/components/order-view/order-actions/Dropdown.js +3 -3
  68. package/dist/components/order-view/order-actions/Dropdown.js.map +1 -1
  69. package/dist/components/order-view/order-actions/actions/cancel-order/CancelOrderTable.js +45 -47
  70. package/dist/components/order-view/order-actions/actions/cancel-order/CancelOrderTable.js.map +1 -1
  71. package/dist/components/order-view/order-actions/actions/cancel-order/ReturnReason.js +23 -36
  72. package/dist/components/order-view/order-actions/actions/cancel-order/ReturnReason.js.map +1 -1
  73. package/dist/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.js +23 -25
  74. package/dist/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.js.map +1 -1
  75. package/dist/components/order-view/order-actions/actions/force-debrief/ForceDebriefModal.js +88 -89
  76. package/dist/components/order-view/order-actions/actions/force-debrief/ForceDebriefModal.js.map +1 -1
  77. package/dist/components/order-view/order-actions/actions/force-debrief/charges/collection-add-ons/index.js +16 -16
  78. package/dist/components/order-view/order-actions/actions/force-debrief/charges/collection-add-ons/index.js.map +1 -1
  79. package/dist/components/order-view/order-actions/actions/force-debrief/escalation/EscalationReason.js +22 -23
  80. package/dist/components/order-view/order-actions/actions/force-debrief/escalation/EscalationReason.js.map +1 -1
  81. package/dist/components/order-view/order-actions/actions/force-debrief/order-info/RadioButtons.js +52 -56
  82. package/dist/components/order-view/order-actions/actions/force-debrief/order-info/RadioButtons.js.map +1 -1
  83. package/dist/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/FailureReasonDropdown.js +26 -27
  84. package/dist/components/order-view/order-actions/actions/force-debrief/order-info/dropdowns/FailureReasonDropdown.js.map +1 -1
  85. package/dist/components/order-view/order-actions/actions/hold-order/HoldOrderModal.js +29 -29
  86. package/dist/components/order-view/order-actions/actions/hold-order/HoldOrderModal.js.map +1 -1
  87. package/dist/components/order-view/order-actions/actions/split-order/SplitOrderTable.js +54 -222
  88. package/dist/components/order-view/order-actions/actions/split-order/SplitOrderTable.js.map +1 -1
  89. package/dist/components/order-view/order-actions/actions/split-order/index.js +37 -50
  90. package/dist/components/order-view/order-actions/actions/split-order/index.js.map +1 -1
  91. package/dist/components/order-view/order-actions/actions/uncancel-order/UncancelOrderTable.js +35 -37
  92. package/dist/components/order-view/order-actions/actions/uncancel-order/UncancelOrderTable.js.map +1 -1
  93. package/dist/components/order-view/order-actions/actions/what3words/What3WordsModal.tsx.js +85 -85
  94. package/dist/components/order-view/order-actions/actions/what3words/What3WordsModal.tsx.js.map +1 -1
  95. package/dist/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactHome.js +12 -8
  96. package/dist/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactHome.js.map +1 -1
  97. package/dist/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactMobile.js +22 -18
  98. package/dist/components/order-view/order-details/expanded-content/customer-section/contact-info/ContactMobile.js.map +1 -1
  99. package/dist/components/order-view/order-details/expanded-content/customer-section/contact-info/index.js +14 -8
  100. package/dist/components/order-view/order-details/expanded-content/customer-section/contact-info/index.js.map +1 -1
  101. package/dist/components/order-view/order-details/expanded-content/customer-section/index.js +19 -13
  102. package/dist/components/order-view/order-details/expanded-content/customer-section/index.js.map +1 -1
  103. package/dist/components/order-view/order-details/expanded-content/customer-section/location-info/Address.js +11 -6
  104. package/dist/components/order-view/order-details/expanded-content/customer-section/location-info/Address.js.map +1 -1
  105. package/dist/components/order-view/order-details/expanded-content/customer-section/location-info/Latitude.js +23 -21
  106. package/dist/components/order-view/order-details/expanded-content/customer-section/location-info/Latitude.js.map +1 -1
  107. package/dist/components/order-view/order-details/expanded-content/customer-section/location-info/Longitude.js +23 -21
  108. package/dist/components/order-view/order-details/expanded-content/customer-section/location-info/Longitude.js.map +1 -1
  109. package/dist/components/order-view/order-details/expanded-content/customer-section/location-info/index.js +39 -21
  110. package/dist/components/order-view/order-details/expanded-content/customer-section/location-info/index.js.map +1 -1
  111. package/dist/components/order-view/order-details/expanded-content/footer/index.js +28 -14
  112. package/dist/components/order-view/order-details/expanded-content/footer/index.js.map +1 -1
  113. package/dist/components/order-view/order-details/expanded-content/orders-section/index.js +44 -28
  114. package/dist/components/order-view/order-details/expanded-content/orders-section/index.js.map +1 -1
  115. package/dist/components/order-view/order-details/expanded-content/services-section/OrderServices.js +28 -20
  116. package/dist/components/order-view/order-details/expanded-content/services-section/OrderServices.js.map +1 -1
  117. package/dist/components/order-view/order-details/expanded-content/services-section/ServiceLevel.js +17 -18
  118. package/dist/components/order-view/order-details/expanded-content/services-section/ServiceLevel.js.map +1 -1
  119. package/dist/components/order-view/order-details/expanded-content/services-section/ServiceType.js +22 -26
  120. package/dist/components/order-view/order-details/expanded-content/services-section/ServiceType.js.map +1 -1
  121. package/dist/components/order-view/order-details/expanded-content/services-section/index.js +79 -25
  122. package/dist/components/order-view/order-details/expanded-content/services-section/index.js.map +1 -1
  123. package/dist/components/order-view/order-details/helper.js.map +1 -1
  124. package/dist/components/order-view/products-info/collapsed-content/index.js +21 -15
  125. package/dist/components/order-view/products-info/collapsed-content/index.js.map +1 -1
  126. package/dist/components/order-view/products-info/index.js +36 -36
  127. package/dist/components/order-view/products-info/index.js.map +1 -1
  128. package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.js +265 -334
  129. package/dist/components/order-view/return-client-products/product-table/ReturnProductTable.js.map +1 -1
  130. package/dist/components/order-view/store.js +155 -162
  131. package/dist/components/order-view/store.js.map +1 -1
  132. package/dist/components/order-view/toolbox-resources/expanded-content/index.js +281 -173
  133. package/dist/components/order-view/toolbox-resources/expanded-content/index.js.map +1 -1
  134. package/dist/components/utils.js +5 -4
  135. package/dist/components/utils.js.map +1 -1
  136. package/dist/types/common/modals/order-action-modal/OrderActionModal.d.ts +1 -2
  137. package/dist/types/common/modals/order-action-modal/footer/OrderActionFooter.d.ts +1 -1
  138. package/dist/types/components/client-portal/ClientPortalResponsive.d.ts +15 -0
  139. package/dist/types/components/order-daily-overview/common/mediaQuery.d.ts +4 -0
  140. package/dist/types/components/order-daily-overview/filters/FilterStyle.d.ts +1 -0
  141. package/dist/types/components/order-view/order-actions/Dropdown.d.ts +0 -1
  142. package/dist/types/components/order-view/return-client-products/product-table/ReturnProductTable.d.ts +1 -0
  143. package/dist/types/components/order-view/store.d.ts +0 -1
  144. package/dist/types/components/order-view/types.d.ts +1 -1
  145. package/dist/types/components/utils.d.ts +1 -0
  146. package/package.json +2 -2
  147. package/dist/assets/icons/ChevronDownIcon.js +0 -26
  148. package/dist/assets/icons/ChevronDownIcon.js.map +0 -1
  149. package/dist/components/order-view/return-client-products/product-table/palletGrouping.js +0 -47
  150. package/dist/components/order-view/return-client-products/product-table/palletGrouping.js.map +0 -1
  151. package/dist/types/components/order-view/return-client-products/product-table/palletGrouping.d.ts +0 -23
@@ -1,42 +1,43 @@
1
- import { jsx as e, Fragment as P, jsxs as n } from "react/jsx-runtime";
2
- import { Skeleton as M, Empty as x } from "antd";
3
- import { useRef as k, useState as S, useMemo as W, useEffect as U } from "react";
4
- import { NavLink as Y } from "react-router-dom";
5
- import { Checkbox as y, displayValueOrNA as o } from "@bjsdistribution/dms-component-library";
6
- import { usePrintOptionTOggle as j, useLoading as H } from "../../order-daily-overview/store/store.js";
7
- import { useReturnConfirmedOrderData as V, useClientPortal as $, useSelectedClientAfterOrders as B } from "../../store.js";
8
- import { useOrderId as G } from "../../order-view/store.js";
9
- import q from "../../../common/SortIcon.js";
10
- import _ from "../../../common/CaretDownFilledIcon.js";
11
- import { StyledTableWrapper as z, StyledTable as J, EmptyDataContainer as K, CustomDrop as Q } from "../../order-daily-overview/return-order-table/return-orders-filters/returnstyles.js";
12
- import X from "../../../assets/icons/PrinterIcon.js";
13
- import Z from "../../../assets/icons/DownIcon.js";
14
- import ee from "../../order-daily-overview/shared/elements/PrintDropDown.js";
15
- import { formatDate as te } from "../../order-daily-overview/shared/utlis.js";
16
- import re from "dayjs";
17
- import { WEIGHT_UNIT as w, VOLUME_UNIT as ne } from "../../../common/utils.js";
18
- const _e = () => {
19
- const I = k(null), m = k(null), [p, g] = j(), [, N] = G(), [h] = V(), [D] = $(), [F] = H(), [O, v] = S(!1), [
20
- A,
21
- f
22
- ] = B(), [l, T] = S(null), i = (t) => {
23
- T((r) => r?.key === t && r.direction === "asc" ? { key: t, direction: "desc" } : { key: t, direction: "asc" });
24
- }, C = W(() => {
25
- if (!h || !l) return h;
26
- const { key: t, direction: r } = l;
27
- return [...h].sort((d, s) => {
28
- const c = d[t], u = s[t];
29
- return typeof c == "number" && typeof u == "number" ? r === "asc" ? c - u : u - c : typeof c == "string" && typeof u == "string" ? r === "asc" ? c.localeCompare(u) : u.localeCompare(c) : 0;
1
+ import { jsx as e, Fragment as j, jsxs as n } from "react/jsx-runtime";
2
+ import { Select as $, Skeleton as B, Empty as U } from "antd";
3
+ import { useRef as I, useState as R, useMemo as Y, useEffect as H } from "react";
4
+ import D from "styled-components";
5
+ import { NavLink as V } from "react-router-dom";
6
+ import { Checkbox as g, displayValueOrNA as l } from "@bjsdistribution/dms-component-library";
7
+ import { usePrintOptionTOggle as G, useLoading as q } from "../../order-daily-overview/store/store.js";
8
+ import { useReturnConfirmedOrderData as J, useClientPortal as K, useSelectedClientAfterOrders as Q } from "../../store.js";
9
+ import { useOrderId as X } from "../../order-view/store.js";
10
+ import Z from "../../../common/SortIcon.js";
11
+ import O from "../../../common/CaretDownFilledIcon.js";
12
+ import { StyledTableWrapper as ee, StyledTable as te, EmptyDataContainer as ne, CustomDrop as re } from "../../order-daily-overview/return-order-table/return-orders-filters/returnstyles.js";
13
+ import ae from "../../../assets/icons/PrinterIcon.js";
14
+ import oe from "../../../assets/icons/DownIcon.js";
15
+ import le from "../../order-daily-overview/shared/elements/PrintDropDown.js";
16
+ import { formatDate as ie } from "../../order-daily-overview/shared/utlis.js";
17
+ import de from "dayjs";
18
+ import { VOLUME_UNIT as m, WEIGHT_UNIT as x } from "../../../common/utils.js";
19
+ const Re = () => {
20
+ const F = I(null), h = I(null), [y, C] = G(), [, A] = X(), [u] = J(), [L] = K(), [w] = q(), [k, P] = R(!1), [
21
+ z,
22
+ b
23
+ ] = Q(), [o, v] = R(null), d = (t) => {
24
+ v((r) => r?.key === t && r.direction === "asc" ? { key: t, direction: "desc" } : { key: t, direction: "asc" });
25
+ }, f = Y(() => {
26
+ if (!u || !o) return u;
27
+ const { key: t, direction: r } = o;
28
+ return [...u].sort((s, p) => {
29
+ const a = s[t], i = p[t], N = a == null || a === "", T = i == null || i === "";
30
+ return N && T ? 0 : N ? 1 : T ? -1 : typeof a == "number" && typeof i == "number" ? r === "asc" ? a - i : i - a : typeof a == "string" && typeof i == "string" ? r === "asc" ? a.localeCompare(i) : i.localeCompare(a) : 0;
30
31
  });
31
- }, [h, l]), a = (t) => !l || l.key !== t ? /* @__PURE__ */ e(q, {}) : l.direction === "asc" ? /* @__PURE__ */ e(_, {}) : /* @__PURE__ */ e(_, { style: { transform: "rotate(180deg)" } }), R = (t) => {
32
- g((r) => r === t ? null : t);
32
+ }, [u, o]), c = (t) => !o || o.key !== t ? /* @__PURE__ */ e(Z, {}) : o.direction === "asc" ? /* @__PURE__ */ e(O, {}) : /* @__PURE__ */ e(O, { style: { transform: "rotate(180deg)" } }), E = (t) => {
33
+ C((r) => r === t ? null : t);
33
34
  };
34
- U(() => (document.addEventListener("mousedown", b), () => {
35
- document.removeEventListener("mousedown", b);
35
+ H(() => (document.addEventListener("mousedown", S), () => {
36
+ document.removeEventListener("mousedown", S);
36
37
  }), []);
37
- const b = (t) => {
38
- m.current && !m.current.contains(t.target) && g(null);
39
- }, E = (t) => {
38
+ const S = (t) => {
39
+ h.current && !h.current.contains(t.target) && C(null);
40
+ }, M = (t) => {
40
41
  switch (t) {
41
42
  case "Cancelled":
42
43
  case "Failed":
@@ -61,166 +62,425 @@ const _e = () => {
61
62
  default:
62
63
  return { color: "#000", background: "#fff" };
63
64
  }
64
- }, L = (t) => {
65
- f(
66
- (r) => r.includes(t) ? r.filter((d) => d !== t) : [...r, t]
65
+ }, W = (t) => {
66
+ b(
67
+ (r) => r.includes(t) ? r.filter((s) => s !== t) : [...r, t]
68
+ );
69
+ }, _ = (t) => {
70
+ const r = t.target.checked;
71
+ P(r), b(
72
+ r ? u?.map((s) => s?.id) || [] : []
67
73
  );
68
74
  };
69
- return /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(z, { className: "fortables", children: /* @__PURE__ */ n(J, { children: [
70
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
71
- /* @__PURE__ */ e("th", { className: "emailInvoiceCheckbox", children: /* @__PURE__ */ e(
72
- y,
73
- {
74
- checked: O,
75
- onChange: (t) => {
76
- const r = t.target.checked;
77
- v(r), f(
78
- r ? h?.map((d) => d?.id) || [] : []
79
- );
75
+ return /* @__PURE__ */ e(j, { children: /* @__PURE__ */ n(se, { className: "fortables cpTable", children: [
76
+ !w && f?.length > 0 && /* @__PURE__ */ n(ce, { className: "cpMobileBar", children: [
77
+ /* @__PURE__ */ n("label", { className: "selectAll", children: [
78
+ /* @__PURE__ */ e(
79
+ g,
80
+ {
81
+ checked: k,
82
+ onChange: _
80
83
  }
81
- }
82
- ) }),
83
- /* @__PURE__ */ e("th", { onClick: () => i("created_at"), children: /* @__PURE__ */ n("div", { className: "sortIconClass", children: [
84
- "Created ",
85
- a("created_at")
86
- ] }) }),
87
- /* @__PURE__ */ e("th", { onClick: () => i("return_location_name"), children: /* @__PURE__ */ n("div", { className: "sortIconClass", children: [
88
- "Return Location ",
89
- a("return_location_name")
90
- ] }) }),
91
- /* @__PURE__ */ e("th", { onClick: () => i("recipient_name"), children: /* @__PURE__ */ n("div", { className: "sortIconClass", children: [
92
- "Recipient ",
93
- a("recipient_name")
94
- ] }) }),
95
- /* @__PURE__ */ e("th", { onClick: () => i("recipient_reference"), children: /* @__PURE__ */ n("div", { className: "sortIconClass", children: [
96
- "Recipient Reference ",
97
- a("recipient_reference")
98
- ] }) }),
99
- /* @__PURE__ */ e("th", { children: "Sender" }),
100
- /* @__PURE__ */ e("th", { children: "Consignment" }),
101
- /* @__PURE__ */ e("th", { children: "Return Order No" }),
102
- /* @__PURE__ */ e("th", { children: " Total Parts" }),
103
- /* @__PURE__ */ e("th", { onClick: () => i("weight"), children: /* @__PURE__ */ n("div", { className: "sortIconClass", children: [
104
- "Total Weight (",
105
- w,
106
- ") ",
107
- a("weight")
108
- ] }) }),
109
- /* @__PURE__ */ e("th", { onClick: () => i("cube"), children: /* @__PURE__ */ n("div", { className: "sortIconClass", children: [
110
- "Total ",
111
- ne,
112
- " ",
113
- a("cube")
114
- ] }) }),
115
- /* @__PURE__ */ e("th", { style: { textAlign: "center" }, children: "Status" }),
116
- /* @__PURE__ */ e("th", { className: "emailInvoiceShare", children: "Labels" })
117
- ] }) }),
118
- /* @__PURE__ */ e("tbody", { children: F ? /* @__PURE__ */ n("tr", { children: [
119
- /* @__PURE__ */ e("td", { colSpan: 16, children: /* @__PURE__ */ e(M, { active: !0 }) }),
120
- /* @__PURE__ */ e("td", { colSpan: 16 })
121
- ] }) : C?.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: 16, children: /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(x, {}) }) }) }) : C?.map((t, r) => {
122
- const s = {
123
- cancelled: "Cancelled",
124
- "on hold": "On Hold",
125
- subcontracted: "Sub-Contracted",
126
- SC: "Sub-Contracted",
127
- "awaiting route": "Awaiting route",
128
- "awaiting confirmation": "Awaiting Confirmation",
129
- complete: "Completed",
130
- outstanding: "Outstanding",
131
- routed: "Routed",
132
- failed: "Failed",
133
- confirmed: "Confirmed"
134
- }[t?.status_value] || "Unknown", c = E(s);
135
- return /* @__PURE__ */ n("tr", { children: [
136
- /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
137
- y,
84
+ ),
85
+ "Select all"
86
+ ] }),
87
+ /* @__PURE__ */ n("div", { className: "sortControls", children: [
88
+ /* @__PURE__ */ e(
89
+ $,
138
90
  {
139
- checked: A.includes(t?.id),
140
- onChange: () => L(t?.id)
91
+ "aria-label": "Sort by",
92
+ placeholder: "Sort by",
93
+ value: o?.key,
94
+ allowClear: !0,
95
+ popupMatchSelectWidth: !1,
96
+ onChange: (t) => v(t ? { key: t, direction: "asc" } : null),
97
+ options: [
98
+ { value: "created_at", label: "Created" },
99
+ { value: "return_location_name", label: "Return Location" },
100
+ { value: "recipient_name", label: "Recipient" },
101
+ { value: "recipient_reference", label: "Recipient Reference" },
102
+ { value: "weight", label: "Total Weight" },
103
+ { value: "cube", label: `Total ${m}` }
104
+ ]
141
105
  }
142
- ) }),
143
- /* @__PURE__ */ e("td", { children: te(new Date(t?.created_at)) }),
144
- /* @__PURE__ */ e("td", { children: o(t?.return_location_name) }),
145
- /* @__PURE__ */ e("td", { onClick: () => N(t.id), children: /* @__PURE__ */ n("ul", { style: { listStyleType: "none", padding: 0 }, children: [
146
- /* @__PURE__ */ e(
147
- "li",
148
- {
149
- style: {
150
- color: "#0099ff",
151
- fontWeight: 600,
152
- paddingLeft: 0
153
- },
154
- children: /* @__PURE__ */ e(Y, { to: `/return/view/${t.id}`, children: o(t?.recipient_name) })
155
- }
156
- ),
157
- /* @__PURE__ */ e("li", { style: { color: "#888075" }, children: o(t?.postcode) })
158
- ] }) }),
159
- /* @__PURE__ */ e("td", { children: o(t?.recipient_reference) }),
160
- /* @__PURE__ */ e("td", { children: o(t?.customer_name) }),
161
- /* @__PURE__ */ n("td", { children: [
162
- o(t?.consignment),
163
- !D && Number(t?.failure_count) > 0 && /* @__PURE__ */ n("span", { style: { color: "inherit", fontWeight: 700, marginLeft: 2 }, title: "Delivery Failure Count", children: [
164
- "- [",
165
- t?.failure_count,
166
- "]"
167
- ] })
168
- ] }),
169
- /* @__PURE__ */ e("td", { children: o(t?.order_number) }),
170
- /* @__PURE__ */ e("td", { children: o(t?.total_products) }),
171
- /* @__PURE__ */ n("td", { children: [
172
- o(t?.weight),
173
- " ",
174
- t?.weight && t?.weight > 0 ? w : ""
175
- ] }),
176
- /* @__PURE__ */ e("td", { children: o(t?.cube) }),
177
- /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
178
- "ul",
106
+ ),
107
+ /* @__PURE__ */ e(
108
+ "button",
179
109
  {
180
- className: "statuscontainer",
181
- style: {
182
- listStyleType: "none",
183
- background: c.background
184
- },
185
- children: /* @__PURE__ */ n(
186
- "li",
187
- {
188
- className: "statustext",
189
- style: { color: c.color },
190
- children: [
191
- s,
192
- (s === "Completed" || s === "Failed") && t?.action_date ? ` - ${re(t?.action_date).format(
193
- "DD/MM/YYYY"
194
- )}` : ""
195
- ]
196
- }
197
- )
110
+ type: "button",
111
+ "aria-label": "Toggle sort direction",
112
+ disabled: !o,
113
+ onClick: () => o && d(o.key),
114
+ children: o?.direction === "desc" ? "↓" : "↑"
198
115
  }
199
- ) }),
200
- /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("ul", { className: "actionbox", children: /* @__PURE__ */ e(
201
- Q,
116
+ )
117
+ ] })
118
+ ] }),
119
+ /* @__PURE__ */ n(te, { children: [
120
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { children: [
121
+ /* @__PURE__ */ e("th", { className: "emailInvoiceCheckbox", children: /* @__PURE__ */ e(
122
+ g,
202
123
  {
203
- ref: I,
204
- className: p === r ? "active" : "",
205
- children: /* @__PURE__ */ n(
124
+ checked: k,
125
+ onChange: _
126
+ }
127
+ ) }),
128
+ /* @__PURE__ */ e("th", { onClick: () => d("created_at"), children: /* @__PURE__ */ n("div", { className: "sortIconClass", children: [
129
+ "Created ",
130
+ c("created_at")
131
+ ] }) }),
132
+ /* @__PURE__ */ e("th", { onClick: () => d("return_location_name"), children: /* @__PURE__ */ n("div", { className: "sortIconClass", children: [
133
+ "Return Location ",
134
+ c("return_location_name")
135
+ ] }) }),
136
+ /* @__PURE__ */ e("th", { onClick: () => d("recipient_name"), children: /* @__PURE__ */ n("div", { className: "sortIconClass", children: [
137
+ "Recipient ",
138
+ c("recipient_name")
139
+ ] }) }),
140
+ /* @__PURE__ */ e("th", { onClick: () => d("recipient_reference"), children: /* @__PURE__ */ n("div", { className: "sortIconClass", children: [
141
+ "Recipient Reference ",
142
+ c("recipient_reference")
143
+ ] }) }),
144
+ /* @__PURE__ */ e("th", { children: "Sender" }),
145
+ /* @__PURE__ */ e("th", { children: "Consignment" }),
146
+ /* @__PURE__ */ e("th", { children: "Return Order No" }),
147
+ /* @__PURE__ */ e("th", { children: " Total Parts" }),
148
+ /* @__PURE__ */ e("th", { onClick: () => d("weight"), children: /* @__PURE__ */ n("div", { className: "sortIconClass", children: [
149
+ "Total Weight (",
150
+ x,
151
+ ") ",
152
+ c("weight")
153
+ ] }) }),
154
+ /* @__PURE__ */ e("th", { onClick: () => d("cube"), children: /* @__PURE__ */ n("div", { className: "sortIconClass", children: [
155
+ "Total ",
156
+ m,
157
+ " ",
158
+ c("cube")
159
+ ] }) }),
160
+ /* @__PURE__ */ e("th", { style: { textAlign: "center" }, children: "Status" }),
161
+ /* @__PURE__ */ e("th", { className: "emailInvoiceShare", children: "Labels" })
162
+ ] }) }),
163
+ /* @__PURE__ */ e("tbody", { children: w ? /* @__PURE__ */ n("tr", { children: [
164
+ /* @__PURE__ */ e("td", { colSpan: 16, children: /* @__PURE__ */ e(B, { active: !0 }) }),
165
+ /* @__PURE__ */ e("td", { colSpan: 16 })
166
+ ] }) : f?.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: 16, children: /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(U, {}) }) }) }) : f?.map((t, r) => {
167
+ const p = {
168
+ cancelled: "Cancelled",
169
+ "on hold": "On Hold",
170
+ subcontracted: "Sub-Contracted",
171
+ SC: "Sub-Contracted",
172
+ "awaiting route": "Awaiting route",
173
+ "awaiting confirmation": "Awaiting Confirmation",
174
+ complete: "Completed",
175
+ outstanding: "Outstanding",
176
+ routed: "Routed",
177
+ failed: "Failed",
178
+ confirmed: "Confirmed"
179
+ }[t?.status_value] || "Unknown", a = M(p);
180
+ return /* @__PURE__ */ n("tr", { children: [
181
+ /* @__PURE__ */ e("td", { className: "cpSelect", children: /* @__PURE__ */ e(
182
+ g,
183
+ {
184
+ checked: z.includes(t?.id),
185
+ onChange: () => W(t?.id)
186
+ }
187
+ ) }),
188
+ /* @__PURE__ */ e("td", { "data-label": "Created", children: ie(new Date(t?.created_at)) }),
189
+ /* @__PURE__ */ e("td", { "data-label": "Return Location", children: /* @__PURE__ */ e(
190
+ "span",
191
+ {
192
+ className: "cpClip",
193
+ title: String(t?.return_location_name ?? ""),
194
+ children: l(t?.return_location_name)
195
+ }
196
+ ) }),
197
+ /* @__PURE__ */ e("td", { className: "cpTitle", onClick: () => A(t.id), children: /* @__PURE__ */ n("ul", { style: { listStyleType: "none", padding: 0 }, children: [
198
+ /* @__PURE__ */ e(
206
199
  "li",
207
200
  {
208
- className: "shareIconContainer",
209
- onClick: () => R(r),
210
- children: [
211
- /* @__PURE__ */ e(X, {}),
212
- /* @__PURE__ */ e(Z, {}),
213
- p === r && /* @__PURE__ */ e("div", { ref: m, children: /* @__PURE__ */ e(ee, { legacyProductId: t }) })
214
- ]
201
+ style: {
202
+ color: "#0099ff",
203
+ fontWeight: 600,
204
+ paddingLeft: 0
205
+ },
206
+ children: /* @__PURE__ */ e(V, { to: `/return/view/${t.id}`, children: l(t?.recipient_name) })
215
207
  }
216
- )
217
- }
218
- ) }) })
219
- ] }, t.id);
220
- }) })
221
- ] }) }) });
222
- };
208
+ ),
209
+ /* @__PURE__ */ e("li", { style: { color: "#888075" }, children: l(t?.postcode) })
210
+ ] }) }),
211
+ /* @__PURE__ */ e("td", { "data-label": "Recipient Reference", children: /* @__PURE__ */ e(
212
+ "span",
213
+ {
214
+ className: "cpClip",
215
+ title: String(t?.recipient_reference ?? ""),
216
+ children: l(t?.recipient_reference)
217
+ }
218
+ ) }),
219
+ /* @__PURE__ */ e("td", { "data-label": "Sender", children: /* @__PURE__ */ e(
220
+ "span",
221
+ {
222
+ className: "cpClip",
223
+ title: String(t?.customer_name ?? ""),
224
+ children: l(t?.customer_name)
225
+ }
226
+ ) }),
227
+ /* @__PURE__ */ e("td", { "data-label": "Consignment", children: /* @__PURE__ */ n("span", { children: [
228
+ l(t?.consignment),
229
+ !L && Number(t?.failure_count) > 0 && /* @__PURE__ */ n("span", { style: { color: "inherit", fontWeight: 700, marginLeft: 2 }, title: "Delivery Failure Count", children: [
230
+ "- [",
231
+ t?.failure_count,
232
+ "]"
233
+ ] })
234
+ ] }) }),
235
+ /* @__PURE__ */ e("td", { "data-label": "Return Order No", children: l(t?.order_number) }),
236
+ /* @__PURE__ */ e("td", { "data-label": "Total Parts", children: l(t?.total_products) }),
237
+ /* @__PURE__ */ n("td", { "data-label": `Total Weight (${x})`, children: [
238
+ l(t?.weight),
239
+ " ",
240
+ t?.weight && t?.weight > 0 ? x : ""
241
+ ] }),
242
+ /* @__PURE__ */ e("td", { "data-label": `Total ${m}`, children: l(t?.cube) }),
243
+ /* @__PURE__ */ e("td", { className: "cpStatus", "data-label": "Status", children: /* @__PURE__ */ e(
244
+ "ul",
245
+ {
246
+ className: "statuscontainer",
247
+ style: {
248
+ listStyleType: "none",
249
+ background: a.background
250
+ },
251
+ children: /* @__PURE__ */ n(
252
+ "li",
253
+ {
254
+ className: "statustext",
255
+ style: { color: a.color },
256
+ children: [
257
+ p,
258
+ (p === "Completed" || p === "Failed") && t?.action_date ? ` - ${de(t?.action_date).format(
259
+ "DD/MM/YYYY"
260
+ )}` : ""
261
+ ]
262
+ }
263
+ )
264
+ }
265
+ ) }),
266
+ /* @__PURE__ */ e("td", { className: "cpLabels", "data-label": "Labels", children: /* @__PURE__ */ e("ul", { className: "actionbox", children: /* @__PURE__ */ e(
267
+ re,
268
+ {
269
+ ref: F,
270
+ className: y === r ? "active" : "",
271
+ children: /* @__PURE__ */ n(
272
+ "li",
273
+ {
274
+ className: "shareIconContainer",
275
+ onClick: () => E(r),
276
+ children: [
277
+ /* @__PURE__ */ e(ae, {}),
278
+ /* @__PURE__ */ e(oe, {}),
279
+ y === r && /* @__PURE__ */ e("div", { ref: h, children: /* @__PURE__ */ e(le, { legacyProductId: t }) })
280
+ ]
281
+ }
282
+ )
283
+ }
284
+ ) }) })
285
+ ] }, t.id);
286
+ }) })
287
+ ] })
288
+ ] }) });
289
+ }, ce = D.div`
290
+ display: none;
291
+
292
+ @media (max-width: 767px) {
293
+ display: flex;
294
+ align-items: center;
295
+ justify-content: space-between;
296
+ gap: 10px;
297
+ flex-wrap: wrap;
298
+ padding: 4px 4px 10px;
299
+
300
+ .selectAll {
301
+ display: flex;
302
+ align-items: center;
303
+ gap: 8px;
304
+ font-size: 12px;
305
+ font-weight: 600;
306
+ color: #3a3630;
307
+ cursor: pointer;
308
+ }
309
+ .sortControls {
310
+ display: flex;
311
+ align-items: center;
312
+ gap: 6px;
313
+ min-width: 0;
314
+ }
315
+ /* stock antd Select (same look as the Row on Page dropdown) */
316
+ .ant-select {
317
+ width: 150px;
318
+ }
319
+ button {
320
+ width: 32px;
321
+ height: 32px;
322
+ border: 1px solid #e0e2e7;
323
+ border-radius: 50%;
324
+ background: #fff;
325
+ color: #3a3630;
326
+ font-size: 14px;
327
+ cursor: pointer;
328
+ &:disabled {
329
+ opacity: 0.4;
330
+ cursor: default;
331
+ }
332
+ }
333
+ }
334
+ `, se = D(ee)`
335
+ /* Tablet / small laptop: a thin, single-line-per-row table. Long text is
336
+ clipped with an ellipsis (full text is in the title tooltip) instead of
337
+ wrapping onto 3 lines. */
338
+ @media (min-width: 768px) and (max-width: 1280px) {
339
+ /* whatever still does not fit scrolls sideways inside the card */
340
+ overflow-x: auto;
341
+
342
+ table {
343
+ border-spacing: 0 6px;
344
+ }
345
+ thead tr th {
346
+ padding: 5px 6px;
347
+ font-size: 11px;
348
+ line-height: 1.15;
349
+ }
350
+ tbody tr td {
351
+ padding: 4px 6px;
352
+ font-size: 11px;
353
+ line-height: 1.25;
354
+ white-space: nowrap;
355
+ }
356
+ .cpClip {
357
+ display: inline-block;
358
+ max-width: 84px;
359
+ overflow: hidden;
360
+ text-overflow: ellipsis;
361
+ vertical-align: bottom;
362
+ }
363
+ tbody tr td.cpTitle li {
364
+ max-width: 112px;
365
+ overflow: hidden;
366
+ text-overflow: ellipsis;
367
+ }
368
+ tbody tr td.cpTitle ul > li > a {
369
+ word-break: normal;
370
+ }
371
+ tbody tr td .statuscontainer {
372
+ padding: 3px 8px;
373
+ flex: 0 0 auto;
374
+ }
375
+ tbody tr td .statustext {
376
+ font-size: 10px;
377
+ white-space: nowrap;
378
+ }
379
+ tbody tr td .shareIconContainer {
380
+ padding: 1px 6px;
381
+ }
382
+ }
383
+
384
+ @media (max-width: 767px) {
385
+ max-height: none;
386
+ overflow: visible;
387
+ padding-top: 0;
388
+
389
+ table,
390
+ tbody {
391
+ display: block;
392
+ width: 100%;
393
+ }
394
+ thead {
395
+ display: none;
396
+ }
397
+
398
+ tbody tr {
399
+ display: flex;
400
+ flex-direction: column;
401
+ position: relative;
402
+ margin-bottom: 12px;
403
+ padding: 10px 12px 6px;
404
+ border: 1px solid rgba(0, 0, 0, 0.08);
405
+ border-radius: 16px;
406
+ background: #fff;
407
+ }
408
+ tbody tr:nth-child(even) {
409
+ background: #f6fbff;
410
+ }
411
+
412
+ tbody tr td {
413
+ display: flex;
414
+ align-items: center;
415
+ justify-content: space-between;
416
+ gap: 12px;
417
+ padding: 6px 0;
418
+ border: none !important;
419
+ border-radius: 0 !important;
420
+ background: transparent !important;
421
+ font-size: 12px;
422
+ text-align: right;
423
+ }
424
+ tbody tr td[data-label]::before {
425
+ content: attr(data-label);
426
+ flex: 0 0 auto;
427
+ color: #8e8a85;
428
+ font-size: 11px;
429
+ font-weight: 600;
430
+ text-align: left;
431
+ }
432
+ tbody tr td[data-label] > span {
433
+ min-width: 0;
434
+ overflow-wrap: anywhere;
435
+ }
436
+
437
+ /* checkbox sits in the card corner */
438
+ tbody tr td.cpSelect {
439
+ position: absolute;
440
+ top: 10px;
441
+ right: 10px;
442
+ width: auto;
443
+ padding: 0;
444
+ z-index: 1;
445
+ }
446
+ /* recipient = card title */
447
+ tbody tr td.cpTitle {
448
+ order: -1;
449
+ display: block;
450
+ padding: 0 32px 8px 0;
451
+ margin-bottom: 4px;
452
+ border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
453
+ text-align: left;
454
+ font-size: 13px;
455
+ }
456
+ tbody tr td.cpTitle ul {
457
+ margin: 0;
458
+ }
459
+ tbody tr td.cpTitle ul > li > a {
460
+ word-break: normal;
461
+ overflow-wrap: anywhere;
462
+ }
463
+ tbody tr td.cpStatus .statuscontainer {
464
+ padding: 4px 14px;
465
+ flex: 0 0 auto;
466
+ }
467
+ tbody tr td.cpLabels .actionbox {
468
+ margin: 0;
469
+ }
470
+
471
+ /* loading skeleton + empty state rows have no labels */
472
+ tbody tr:has(td[colspan]) {
473
+ padding: 0;
474
+ border: none;
475
+ background: transparent;
476
+ }
477
+ tbody tr td[colspan] {
478
+ display: block;
479
+ text-align: center;
480
+ }
481
+ }
482
+ `;
223
483
  export {
224
- _e as default
484
+ Re as default
225
485
  };
226
486
  //# sourceMappingURL=ReturnConfirmedTable.js.map