@tesouro/embedded-components-react 0.7.45 → 0.7.46
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/index.d.ts +29 -39
- package/dist/lib/CounterpartsWidget.d.ts +29 -22
- package/dist/lib/CounterpartsWidgetPublic.d.ts +29 -22
- package/dist/lib/CustomersWidget.d.ts +29 -22
- package/dist/lib/ReceivablesWidget.d.ts +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +30 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +9 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +7 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +76 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +27 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +2 -76
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +30 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +5 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +32 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +73 -77
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +8 -25
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +197 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +22 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +10 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +53 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +21 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +8 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +77 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +31 -69
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +17 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +40 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +26 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +35 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +14 -36
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +84 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +487 -80
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +2 -494
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +48 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +62 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +438 -61
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +207 -431
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +20 -222
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +265 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +2 -265
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +131 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +22 -125
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +235 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +3 -240
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +249 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +54 -242
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +221 -51
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +38 -222
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index2.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index5.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index6.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index8.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/{bill-pay-widget → shared/document-status}/util/dist/lib/derivePayableStatus.js +23 -10
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/receivableFilledTone.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +0 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +0 -45
|
@@ -1,99 +1,83 @@
|
|
|
1
|
-
import { Badge as e, Button as t, DropdownMenu as n, DropdownMenuContent as r, DropdownMenuItem as i, DropdownMenuTrigger as a, Separator as o, Sheet as s, SheetContent as c, SheetDescription as l, SheetHeader as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { Badge as e, Button as t, DropdownMenu as n, DropdownMenuContent as r, DropdownMenuItem as i, DropdownMenuTrigger as a, Separator as o, Sheet as s, SheetContent as c, SheetDescription as l, SheetHeader as ee, SheetTitle as u, Skeleton as d, Spinner as f, Typography as p, cn as te } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { BILL_STATUS_TONE_CLASS_NAME as m } from "../../../shared/document-status/ui/dist/index3.js";
|
|
3
|
+
import { BillStatusBadge as h } from "../../../shared/document-status/ui/dist/index4.js";
|
|
4
|
+
import { ReceivableStatusBadge as g } from "../../../shared/document-status/ui/dist/index7.js";
|
|
5
|
+
import "../../../shared/document-status/ui/dist/index.js";
|
|
6
|
+
import { COUNTERPART_DETAILS_SHEET_LABELS_EN as ne } from "./index2.js";
|
|
7
|
+
import { CounterpartAddressForm as _ } from "./index5.js";
|
|
8
|
+
import { CounterpartEditForm as re } from "./index6.js";
|
|
9
|
+
import { useEffect as v, useState as ie } from "react";
|
|
10
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
11
|
+
import { EyeIcon as ae, EyeOffIcon as oe, MoreVerticalIcon as se, PencilIcon as S, PlusIcon as C, SearchXIcon as w, Trash2Icon as T, XIcon as ce } from "lucide-react";
|
|
8
12
|
//#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
billInfo: "ttw:border-blue-100 ttw:bg-blue-100 ttw:text-blue-700 ttw:hover:bg-blue-100",
|
|
13
|
-
billSuccess: "ttw:border-green-100 ttw:bg-green-100 ttw:text-green-700 ttw:hover:bg-green-100",
|
|
14
|
-
billSettled: "ttw:border-border ttw:bg-background ttw:text-green-900 ttw:hover:bg-background",
|
|
15
|
-
billDanger: "ttw:border-destructive/20 ttw:bg-destructive/20 ttw:text-destructive ttw:hover:bg-destructive/20",
|
|
16
|
-
invoiceNeutral: "ttw:border-transparent ttw:bg-muted ttw:text-muted-foreground",
|
|
17
|
-
invoiceCyan: "ttw:border-transparent ttw:bg-cyan-100 ttw:text-cyan-700",
|
|
18
|
-
invoiceSuccess: "ttw:border-transparent ttw:bg-green-100 ttw:text-green-700",
|
|
19
|
-
invoicePurple: "ttw:border-transparent ttw:bg-purple-100 ttw:text-purple-700",
|
|
20
|
-
invoiceOrange: "ttw:border-transparent ttw:bg-orange-100 ttw:text-orange-700",
|
|
21
|
-
invoiceDanger: "ttw:border-transparent ttw:bg-destructive/10 ttw:text-destructive"
|
|
22
|
-
};
|
|
23
|
-
function T({ label: t, tone: n }) {
|
|
24
|
-
return /* @__PURE__ */ v(e, {
|
|
25
|
-
variant: "outline",
|
|
26
|
-
className: w[n],
|
|
27
|
-
children: t
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function E({ className: e }) {
|
|
31
|
-
return /* @__PURE__ */ v(f, { className: e ?? "ttw:h-5 ttw:w-24" });
|
|
13
|
+
var E = "-";
|
|
14
|
+
function D({ className: e }) {
|
|
15
|
+
return /* @__PURE__ */ b(d, { className: e ?? "ttw:h-5 ttw:w-24" });
|
|
32
16
|
}
|
|
33
|
-
function
|
|
34
|
-
return /* @__PURE__ */
|
|
17
|
+
function O({ label: e, children: t, isLast: n }) {
|
|
18
|
+
return /* @__PURE__ */ x("div", {
|
|
35
19
|
className: ["ttw:grid ttw:grid-cols-[180px_1fr] ttw:gap-4 ttw:py-3", n ? "" : "ttw:border-b ttw:border-border"].join(" "),
|
|
36
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ b(p, {
|
|
37
21
|
variant: "body2",
|
|
38
22
|
className: "ttw:text-muted-foreground",
|
|
39
23
|
children: e
|
|
40
|
-
}), /* @__PURE__ */
|
|
24
|
+
}), /* @__PURE__ */ b("div", {
|
|
41
25
|
className: "ttw:min-w-0 ttw:text-sm",
|
|
42
26
|
children: t
|
|
43
27
|
})]
|
|
44
28
|
});
|
|
45
29
|
}
|
|
46
|
-
function
|
|
30
|
+
function le({ mode: e, summary: t, labels: n }) {
|
|
47
31
|
let r = e === "customer" ? n.summaryReceived : n.summaryPaid;
|
|
48
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ x("div", {
|
|
49
33
|
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-md ttw:bg-muted ttw:p-5",
|
|
50
34
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ b(p, {
|
|
52
36
|
variant: "body2",
|
|
53
37
|
className: "ttw:text-muted-foreground",
|
|
54
38
|
children: e === "customer" ? n.summaryAmountDue : n.summaryBalanceDue
|
|
55
39
|
}),
|
|
56
|
-
t?.isPrimaryAmountLoading ? /* @__PURE__ */
|
|
40
|
+
t?.isPrimaryAmountLoading ? /* @__PURE__ */ b(D, { className: "ttw:h-9 ttw:w-36" }) : /* @__PURE__ */ b("p", {
|
|
57
41
|
className: "ttw:text-[2rem] ttw:leading-tight ttw:font-semibold ttw:tracking-tight",
|
|
58
|
-
children: t?.primaryAmountLabel ??
|
|
42
|
+
children: t?.primaryAmountLabel ?? E
|
|
59
43
|
}),
|
|
60
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ x("div", {
|
|
61
45
|
className: "ttw:flex ttw:gap-8",
|
|
62
46
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ x("div", {
|
|
64
48
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
65
|
-
children: [/* @__PURE__ */
|
|
49
|
+
children: [/* @__PURE__ */ b(p, {
|
|
66
50
|
variant: "caption",
|
|
67
51
|
className: "ttw:text-muted-foreground",
|
|
68
52
|
children: n.summaryBilled
|
|
69
|
-
}), t?.isBilledAmountLoading ? /* @__PURE__ */
|
|
53
|
+
}), t?.isBilledAmountLoading ? /* @__PURE__ */ b(D, {}) : /* @__PURE__ */ b(p, {
|
|
70
54
|
variant: "body1",
|
|
71
55
|
className: "ttw:font-semibold",
|
|
72
|
-
children: t?.billedAmountLabel ??
|
|
56
|
+
children: t?.billedAmountLabel ?? E
|
|
73
57
|
})]
|
|
74
58
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ x("div", {
|
|
76
60
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
61
|
+
children: [/* @__PURE__ */ b(p, {
|
|
78
62
|
variant: "caption",
|
|
79
63
|
className: "ttw:text-muted-foreground",
|
|
80
64
|
children: r
|
|
81
|
-
}), t?.isReceivedOrPaidAmountLoading ? /* @__PURE__ */
|
|
65
|
+
}), t?.isReceivedOrPaidAmountLoading ? /* @__PURE__ */ b(D, {}) : /* @__PURE__ */ b(p, {
|
|
82
66
|
variant: "body1",
|
|
83
67
|
className: "ttw:font-semibold ttw:text-green-600",
|
|
84
|
-
children: t?.receivedOrPaidAmountLabel ??
|
|
68
|
+
children: t?.receivedOrPaidAmountLabel ?? E
|
|
85
69
|
})]
|
|
86
70
|
}),
|
|
87
|
-
e === "vendor" && /* @__PURE__ */
|
|
71
|
+
e === "vendor" && /* @__PURE__ */ x("div", {
|
|
88
72
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
73
|
+
children: [/* @__PURE__ */ b(p, {
|
|
90
74
|
variant: "caption",
|
|
91
75
|
className: "ttw:text-muted-foreground",
|
|
92
76
|
children: n.summaryRejected
|
|
93
|
-
}), t?.isRejectedAmountLoading ? /* @__PURE__ */
|
|
77
|
+
}), t?.isRejectedAmountLoading ? /* @__PURE__ */ b(D, {}) : /* @__PURE__ */ b(p, {
|
|
94
78
|
variant: "body1",
|
|
95
79
|
className: "ttw:font-semibold",
|
|
96
|
-
children: t?.rejectedAmountLabel ??
|
|
80
|
+
children: t?.rejectedAmountLabel ?? E
|
|
97
81
|
})]
|
|
98
82
|
})
|
|
99
83
|
]
|
|
@@ -101,85 +85,90 @@ function O({ mode: e, summary: t, labels: n }) {
|
|
|
101
85
|
]
|
|
102
86
|
});
|
|
103
87
|
}
|
|
104
|
-
function
|
|
105
|
-
if (!
|
|
106
|
-
let
|
|
107
|
-
return /* @__PURE__ */
|
|
88
|
+
function ue({ mode: n, documents: r, labels: i, onViewAll: a }) {
|
|
89
|
+
if (!r || r.length === 0) return null;
|
|
90
|
+
let s = n === "vendor";
|
|
91
|
+
return /* @__PURE__ */ x("section", {
|
|
108
92
|
className: "ttw:flex ttw:flex-col ttw:border-t ttw:border-border ttw:pt-6",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
93
|
+
children: [/* @__PURE__ */ x("div", {
|
|
110
94
|
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4 ttw:pb-5",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ x("div", {
|
|
112
96
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
113
|
-
children: [/* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ b(p, {
|
|
114
98
|
variant: "body1",
|
|
115
99
|
className: "ttw:font-medium",
|
|
116
|
-
children:
|
|
117
|
-
}), /* @__PURE__ */
|
|
100
|
+
children: n === "customer" ? i.recentCustomerDocumentsHeading : i.recentVendorDocumentsHeading
|
|
101
|
+
}), /* @__PURE__ */ b(p, {
|
|
118
102
|
variant: "body2",
|
|
119
103
|
className: "ttw:text-muted-foreground",
|
|
120
|
-
children:
|
|
104
|
+
children: n === "customer" ? i.recentCustomerDocumentsDescription : i.recentVendorDocumentsDescription
|
|
121
105
|
})]
|
|
122
|
-
}),
|
|
106
|
+
}), a && /* @__PURE__ */ b(t, {
|
|
123
107
|
variant: "link",
|
|
124
108
|
className: "ttw:h-auto ttw:p-0",
|
|
125
|
-
onClick:
|
|
126
|
-
children:
|
|
109
|
+
onClick: a,
|
|
110
|
+
children: i.viewAllDocumentsAction
|
|
127
111
|
})]
|
|
128
|
-
}), /* @__PURE__ */
|
|
112
|
+
}), /* @__PURE__ */ b("div", {
|
|
129
113
|
className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-md ttw:border ttw:border-border ttw:p-4",
|
|
130
|
-
children:
|
|
131
|
-
let
|
|
132
|
-
return /* @__PURE__ */
|
|
114
|
+
children: r.map((t, n) => {
|
|
115
|
+
let a = s && t.isOverdue;
|
|
116
|
+
return /* @__PURE__ */ x("div", {
|
|
133
117
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ x("div", {
|
|
135
119
|
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ x("div", {
|
|
137
121
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
138
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ b(p, {
|
|
139
123
|
variant: "h6",
|
|
140
124
|
className: "ttw:font-medium",
|
|
141
|
-
children:
|
|
142
|
-
}), /* @__PURE__ */
|
|
125
|
+
children: t.amountLabel
|
|
126
|
+
}), /* @__PURE__ */ b(p, {
|
|
143
127
|
variant: "body2",
|
|
144
|
-
className:
|
|
145
|
-
children:
|
|
128
|
+
className: a ? "ttw:text-destructive" : "ttw:text-muted-foreground",
|
|
129
|
+
children: t.dateLabel
|
|
146
130
|
})]
|
|
147
|
-
}), /* @__PURE__ */
|
|
131
|
+
}), /* @__PURE__ */ x("div", {
|
|
148
132
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
149
|
-
children: [
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
133
|
+
children: [a && /* @__PURE__ */ b(e, {
|
|
134
|
+
variant: "outline",
|
|
135
|
+
className: m.danger,
|
|
136
|
+
children: i.overdueTag
|
|
137
|
+
}), t.status.kind === "bill" ? /* @__PURE__ */ b(h, {
|
|
138
|
+
label: t.status.label,
|
|
139
|
+
tone: t.status.tone
|
|
140
|
+
}) : /* @__PURE__ */ b(g, {
|
|
141
|
+
variant: "filled",
|
|
142
|
+
label: t.status.label,
|
|
143
|
+
filledTone: t.status.tone
|
|
155
144
|
})]
|
|
156
145
|
})]
|
|
157
|
-
}),
|
|
158
|
-
},
|
|
146
|
+
}), n < r.length - 1 && /* @__PURE__ */ b(o, {})]
|
|
147
|
+
}, t.id);
|
|
159
148
|
})
|
|
160
149
|
})]
|
|
161
150
|
});
|
|
162
151
|
}
|
|
163
152
|
function k({ mode: e, addressLines: n, canEdit: r, onEditAddress: i, onAddAddress: a, labels: o, addressForm: s }) {
|
|
164
153
|
let c = n.length > 0;
|
|
165
|
-
return /* @__PURE__ */
|
|
154
|
+
return /* @__PURE__ */ x("section", {
|
|
166
155
|
className: e === "customer" ? "ttw:flex ttw:flex-col ttw:gap-3" : "ttw:flex ttw:flex-col",
|
|
167
|
-
children: [e === "customer" && !s && /* @__PURE__ */
|
|
156
|
+
children: [e === "customer" && !s && /* @__PURE__ */ x("div", {
|
|
168
157
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
|
|
169
158
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ x(p, {
|
|
171
160
|
variant: "body1",
|
|
172
161
|
className: "ttw:font-medium",
|
|
173
162
|
children: [
|
|
174
163
|
o.customerAddressHeading,
|
|
175
164
|
" ",
|
|
176
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ b("span", {
|
|
177
166
|
className: "ttw:text-muted-foreground",
|
|
178
167
|
children: o.optionalSuffix
|
|
179
168
|
})
|
|
180
169
|
]
|
|
181
170
|
}),
|
|
182
|
-
r && c && /* @__PURE__ */
|
|
171
|
+
r && c && /* @__PURE__ */ b(t, {
|
|
183
172
|
type: "button",
|
|
184
173
|
variant: "link",
|
|
185
174
|
className: "ttw:h-auto ttw:p-0",
|
|
@@ -187,143 +176,143 @@ function k({ mode: e, addressLines: n, canEdit: r, onEditAddress: i, onAddAddres
|
|
|
187
176
|
onClick: i,
|
|
188
177
|
children: o.editButton
|
|
189
178
|
}),
|
|
190
|
-
r && !c && /* @__PURE__ */
|
|
179
|
+
r && !c && /* @__PURE__ */ x(t, {
|
|
191
180
|
type: "button",
|
|
192
181
|
variant: "link",
|
|
193
182
|
className: "ttw:h-auto ttw:p-0",
|
|
194
183
|
onClick: a,
|
|
195
|
-
children: [/* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ b(C, { className: "ttw:size-4" }), o.addAddressAction]
|
|
196
185
|
})
|
|
197
186
|
]
|
|
198
|
-
}), s ? /* @__PURE__ */
|
|
187
|
+
}), s ? /* @__PURE__ */ b(_, {
|
|
199
188
|
form: s,
|
|
200
189
|
labels: o
|
|
201
|
-
}) : c ? /* @__PURE__ */
|
|
190
|
+
}) : c ? /* @__PURE__ */ b("address", {
|
|
202
191
|
className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:not-italic ttw:text-sm",
|
|
203
|
-
children: n.map((e) => /* @__PURE__ */
|
|
204
|
-
}) : /* @__PURE__ */
|
|
192
|
+
children: n.map((e) => /* @__PURE__ */ b("span", { children: e }, e))
|
|
193
|
+
}) : /* @__PURE__ */ b(p, {
|
|
205
194
|
variant: "body2",
|
|
206
195
|
className: "ttw:text-muted-foreground",
|
|
207
196
|
children: o.noAddress
|
|
208
197
|
})]
|
|
209
198
|
});
|
|
210
199
|
}
|
|
211
|
-
function
|
|
212
|
-
return /* @__PURE__ */
|
|
200
|
+
function A({ paymentMethod: n, canEdit: r, onAddBankAccount: i, onEditBankAccount: a, onDeleteBankAccount: o, labels: s }) {
|
|
201
|
+
return /* @__PURE__ */ x("section", {
|
|
213
202
|
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:border-t ttw:border-border ttw:pt-6",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ x("div", {
|
|
215
204
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ x("div", {
|
|
217
206
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
218
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ b(p, {
|
|
219
208
|
variant: "body1",
|
|
220
209
|
className: "ttw:font-medium",
|
|
221
210
|
children: s.paymentMethodsHeading
|
|
222
|
-
}), /* @__PURE__ */
|
|
211
|
+
}), /* @__PURE__ */ b(p, {
|
|
223
212
|
variant: "body2",
|
|
224
213
|
className: "ttw:text-muted-foreground",
|
|
225
214
|
children: s.paymentMethodsDescription
|
|
226
215
|
})]
|
|
227
|
-
}), r && !n && /* @__PURE__ */
|
|
216
|
+
}), r && !n && /* @__PURE__ */ x(t, {
|
|
228
217
|
type: "button",
|
|
229
218
|
variant: "ghost",
|
|
230
219
|
size: "sm",
|
|
231
220
|
onClick: i,
|
|
232
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ b(C, { className: "ttw:size-4" }), s.addPaymentMethodAction]
|
|
233
222
|
})]
|
|
234
|
-
}), n ? /* @__PURE__ */
|
|
223
|
+
}), n ? /* @__PURE__ */ x("div", {
|
|
235
224
|
className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-md ttw:border ttw:border-border ttw:p-4",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
225
|
+
children: [/* @__PURE__ */ x("div", {
|
|
237
226
|
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-3",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ x("div", {
|
|
239
228
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ b(p, {
|
|
241
230
|
variant: "body2",
|
|
242
231
|
className: "ttw:font-medium",
|
|
243
232
|
children: n.title
|
|
244
|
-
}), n.isIncomplete && /* @__PURE__ */
|
|
233
|
+
}), n.isIncomplete && /* @__PURE__ */ b(e, {
|
|
245
234
|
variant: "outline",
|
|
246
235
|
children: s.incompletePaymentMethod
|
|
247
236
|
})]
|
|
248
|
-
}), r && /* @__PURE__ */
|
|
237
|
+
}), r && /* @__PURE__ */ x("div", {
|
|
249
238
|
className: "ttw:flex ttw:gap-1",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ b(t, {
|
|
251
240
|
type: "button",
|
|
252
241
|
variant: "ghost",
|
|
253
242
|
size: "icon-sm",
|
|
254
243
|
"aria-label": s.editPaymentMethodAction,
|
|
255
244
|
onClick: () => a?.(n.id),
|
|
256
|
-
children: /* @__PURE__ */
|
|
257
|
-
}), /* @__PURE__ */
|
|
245
|
+
children: /* @__PURE__ */ b(S, { className: "ttw:size-4" })
|
|
246
|
+
}), /* @__PURE__ */ b(t, {
|
|
258
247
|
type: "button",
|
|
259
248
|
variant: "ghost",
|
|
260
249
|
size: "icon-sm",
|
|
261
250
|
"aria-label": s.deletePaymentMethodAction,
|
|
262
251
|
onClick: () => o?.(n.id),
|
|
263
|
-
children: /* @__PURE__ */
|
|
252
|
+
children: /* @__PURE__ */ b(T, { className: "ttw:size-4" })
|
|
264
253
|
})]
|
|
265
254
|
})]
|
|
266
|
-
}), /* @__PURE__ */
|
|
255
|
+
}), /* @__PURE__ */ x("div", {
|
|
267
256
|
className: "ttw:grid ttw:grid-cols-3 ttw:gap-3 ttw:text-sm",
|
|
268
257
|
children: [
|
|
269
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ x("div", {
|
|
270
259
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ b("span", {
|
|
272
261
|
className: "ttw:text-muted-foreground",
|
|
273
262
|
children: s.accountHolderLabel
|
|
274
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ b("span", { children: n.accountHolderLabel || E })]
|
|
275
264
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ x("div", {
|
|
277
266
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ b("span", {
|
|
279
268
|
className: "ttw:text-muted-foreground",
|
|
280
269
|
children: s.accountNumberLabel
|
|
281
|
-
}), /* @__PURE__ */
|
|
270
|
+
}), /* @__PURE__ */ b("span", { children: n.accountNumberLabel || E })]
|
|
282
271
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ x("div", {
|
|
284
273
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ b("span", {
|
|
286
275
|
className: "ttw:text-muted-foreground",
|
|
287
276
|
children: s.routingNumberLabel
|
|
288
|
-
}), /* @__PURE__ */
|
|
277
|
+
}), /* @__PURE__ */ b("span", { children: n.routingNumberLabel || E })]
|
|
289
278
|
})
|
|
290
279
|
]
|
|
291
280
|
})]
|
|
292
|
-
}) : /* @__PURE__ */
|
|
281
|
+
}) : /* @__PURE__ */ b(p, {
|
|
293
282
|
variant: "body2",
|
|
294
283
|
className: "ttw:text-muted-foreground",
|
|
295
284
|
children: s.noPaymentMethods
|
|
296
285
|
})]
|
|
297
286
|
});
|
|
298
287
|
}
|
|
299
|
-
function
|
|
288
|
+
function j({ open: e, onOpenChange: o, privacyResetKey: m, mode: h = "customer", counterpart: g, isLoading: _, isError: S, canEdit: C = !0, canEditProfile: D = C, canEditAddress: j = C, canEditPaymentMethod: M = C, canDelete: N = !0, onEdit: P, onDelete: F, onClose: I, onEditAddress: L, onAddAddress: R, onAddBankAccount: z, onEditBankAccount: B, onDeleteBankAccount: V, onViewAllDocuments: H, onCreateDocument: U, editForm: W, addressForm: G, labels: de }) {
|
|
300
289
|
let K = {
|
|
301
|
-
...
|
|
290
|
+
...ne,
|
|
302
291
|
...de
|
|
303
|
-
}, [fe, q] =
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
].join(":"), Y = e && !!
|
|
308
|
-
|
|
292
|
+
}, [fe, q] = ie(null), J = [
|
|
293
|
+
m ?? g?.name ?? "",
|
|
294
|
+
g?.taxId ?? "",
|
|
295
|
+
g?.taxIdMasked ?? ""
|
|
296
|
+
].join(":"), Y = e && !!g?.taxId && fe === J;
|
|
297
|
+
v(() => {
|
|
309
298
|
e || q(null);
|
|
310
299
|
}, [e]);
|
|
311
|
-
let X =
|
|
300
|
+
let X = h === "vendor", pe = Y ? g?.taxId ?? E : g?.taxIdMasked || g?.taxId || E, Z = g?.taxIdHelpText ?? (X ? K.vendorTaxIdHelp : K.customerTaxIdHelp), Q = (e) => {
|
|
312
301
|
e || q(null), o(e);
|
|
313
302
|
};
|
|
314
|
-
if (
|
|
303
|
+
if (S) return /* @__PURE__ */ b(s, {
|
|
315
304
|
open: e,
|
|
316
305
|
onOpenChange: Q,
|
|
317
|
-
children: /* @__PURE__ */
|
|
306
|
+
children: /* @__PURE__ */ b(c, {
|
|
318
307
|
className: "ttw:w-160 ttw:sm:max-w-160 ttw:gap-0",
|
|
319
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ x("div", {
|
|
320
309
|
className: "ttw:m-auto ttw:flex ttw:w-3/4 ttw:flex-col ttw:items-center ttw:gap-4 ttw:p-4",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ b(w, { className: "ttw:size-8 ttw:text-destructive" }), /* @__PURE__ */ x("div", {
|
|
322
311
|
className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-2",
|
|
323
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ b(u, {
|
|
324
313
|
className: "ttw:text-xl ttw:font-semibold ttw:tracking-tight",
|
|
325
314
|
children: X ? K.notFoundVendorTitle : K.notFoundCustomerTitle
|
|
326
|
-
}), /* @__PURE__ */
|
|
315
|
+
}), /* @__PURE__ */ b(l, {
|
|
327
316
|
className: "ttw:text-center ttw:text-base ttw:text-foreground",
|
|
328
317
|
children: X ? K.notFoundVendorDescription : K.notFoundCustomerDescription
|
|
329
318
|
})]
|
|
@@ -331,51 +320,51 @@ function A({ open: e, onOpenChange: o, privacyResetKey: g, mode: b = "customer",
|
|
|
331
320
|
})
|
|
332
321
|
})
|
|
333
322
|
});
|
|
334
|
-
let $ =
|
|
335
|
-
return /* @__PURE__ */
|
|
323
|
+
let $ = _ || !g;
|
|
324
|
+
return /* @__PURE__ */ b(s, {
|
|
336
325
|
open: e,
|
|
337
326
|
onOpenChange: Q,
|
|
338
|
-
children: /* @__PURE__ */
|
|
327
|
+
children: /* @__PURE__ */ x(c, {
|
|
339
328
|
showCloseButton: !1,
|
|
340
329
|
className: "ttw:w-160 ttw:sm:max-w-160 ttw:gap-0 ttw:overflow-y-auto",
|
|
341
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ x(ee, {
|
|
342
331
|
className: "ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-4 ttw:border-b ttw:border-border ttw:px-6 ttw:py-6",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
332
|
+
children: [/* @__PURE__ */ b("div", {
|
|
344
333
|
className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-1",
|
|
345
|
-
children: $ ? /* @__PURE__ */ y
|
|
346
|
-
/* @__PURE__ */
|
|
334
|
+
children: $ ? /* @__PURE__ */ x(y, { children: [
|
|
335
|
+
/* @__PURE__ */ b(u, {
|
|
347
336
|
className: "ttw:sr-only",
|
|
348
337
|
children: K.loadingTitle
|
|
349
338
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ b(d, { className: "ttw:h-8 ttw:w-40" }),
|
|
340
|
+
/* @__PURE__ */ b(l, {
|
|
352
341
|
className: "ttw:sr-only",
|
|
353
342
|
children: K.hiddenDescription
|
|
354
343
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
] }) : /* @__PURE__ */ y
|
|
344
|
+
/* @__PURE__ */ b(d, { className: "ttw:h-5 ttw:w-60" })
|
|
345
|
+
] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(u, {
|
|
357
346
|
className: "ttw:truncate ttw:text-2xl",
|
|
358
|
-
children:
|
|
359
|
-
}), /* @__PURE__ */
|
|
360
|
-
}), /* @__PURE__ */
|
|
347
|
+
children: g.name
|
|
348
|
+
}), /* @__PURE__ */ b(l, { children: g.subtitle ?? K.hiddenDescription })] })
|
|
349
|
+
}), /* @__PURE__ */ x("div", {
|
|
361
350
|
className: "ttw:flex ttw:gap-2",
|
|
362
|
-
children: [N &&
|
|
351
|
+
children: [N && g && /* @__PURE__ */ x(n, { children: [/* @__PURE__ */ b(a, {
|
|
363
352
|
asChild: !0,
|
|
364
|
-
children: /* @__PURE__ */
|
|
353
|
+
children: /* @__PURE__ */ b(t, {
|
|
365
354
|
type: "button",
|
|
366
355
|
variant: "outline",
|
|
367
356
|
size: "icon",
|
|
368
357
|
"aria-label": K.openActionsMenu,
|
|
369
|
-
children: /* @__PURE__ */
|
|
358
|
+
children: /* @__PURE__ */ b(se, { className: "ttw:size-4" })
|
|
370
359
|
})
|
|
371
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ b(r, {
|
|
372
361
|
align: "end",
|
|
373
|
-
children: /* @__PURE__ */
|
|
362
|
+
children: /* @__PURE__ */ x(i, {
|
|
374
363
|
variant: "destructive",
|
|
375
364
|
onClick: F,
|
|
376
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ b(T, { className: "ttw:size-4" }), X ? K.deleteVendorAction : K.deleteCustomerAction]
|
|
377
366
|
})
|
|
378
|
-
})] }), /* @__PURE__ */
|
|
367
|
+
})] }), /* @__PURE__ */ b(t, {
|
|
379
368
|
type: "button",
|
|
380
369
|
variant: "outline",
|
|
381
370
|
size: "icon",
|
|
@@ -383,107 +372,107 @@ function A({ open: e, onOpenChange: o, privacyResetKey: g, mode: b = "customer",
|
|
|
383
372
|
onClick: () => {
|
|
384
373
|
q(null), I();
|
|
385
374
|
},
|
|
386
|
-
children: /* @__PURE__ */
|
|
375
|
+
children: /* @__PURE__ */ b(ce, { className: "ttw:size-4" })
|
|
387
376
|
})]
|
|
388
377
|
})]
|
|
389
|
-
}), $ ? /* @__PURE__ */
|
|
378
|
+
}), $ ? /* @__PURE__ */ b("div", {
|
|
390
379
|
className: "ttw:flex ttw:flex-1 ttw:items-center ttw:justify-center ttw:p-6",
|
|
391
|
-
children: /* @__PURE__ */
|
|
392
|
-
}) : /* @__PURE__ */
|
|
380
|
+
children: /* @__PURE__ */ b(f, {})
|
|
381
|
+
}) : /* @__PURE__ */ x("main", {
|
|
393
382
|
className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:p-6",
|
|
394
383
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ x("div", {
|
|
396
385
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
398
|
-
mode:
|
|
399
|
-
summary:
|
|
386
|
+
children: [/* @__PURE__ */ b(le, {
|
|
387
|
+
mode: h,
|
|
388
|
+
summary: g.summary,
|
|
400
389
|
labels: K
|
|
401
|
-
}), U && /* @__PURE__ */
|
|
390
|
+
}), U && /* @__PURE__ */ b(t, {
|
|
402
391
|
type: "button",
|
|
403
392
|
className: "ttw:w-fit",
|
|
404
393
|
onClick: U,
|
|
405
394
|
children: X ? K.sendPaymentAction : K.issueInvoiceAction
|
|
406
395
|
})]
|
|
407
396
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
409
|
-
mode:
|
|
410
|
-
documents:
|
|
397
|
+
/* @__PURE__ */ b(ue, {
|
|
398
|
+
mode: h,
|
|
399
|
+
documents: g.recentDocuments,
|
|
411
400
|
labels: K,
|
|
412
401
|
onViewAll: H
|
|
413
402
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ x("section", {
|
|
415
404
|
className: "ttw:flex ttw:flex-col",
|
|
416
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ x("div", {
|
|
417
406
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:pb-5",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ b(p, {
|
|
419
408
|
variant: "body1",
|
|
420
409
|
className: "ttw:font-medium",
|
|
421
410
|
children: X ? K.vendorDetailsHeading : K.customerDetailsHeading
|
|
422
|
-
}),
|
|
411
|
+
}), D && !W && /* @__PURE__ */ b(t, {
|
|
423
412
|
type: "button",
|
|
424
413
|
variant: "link",
|
|
425
414
|
className: "ttw:h-auto ttw:p-0",
|
|
426
415
|
onClick: P,
|
|
427
416
|
children: K.editButton
|
|
428
417
|
})]
|
|
429
|
-
}), W ? /* @__PURE__ */
|
|
418
|
+
}), W ? /* @__PURE__ */ b(re, {
|
|
430
419
|
form: W,
|
|
431
420
|
labels: K
|
|
432
|
-
}) : /* @__PURE__ */
|
|
433
|
-
className:
|
|
421
|
+
}) : /* @__PURE__ */ x("div", {
|
|
422
|
+
className: te("ttw:border-t ttw:border-border", !X && "ttw:border-b"),
|
|
434
423
|
children: [
|
|
435
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ b(O, {
|
|
436
425
|
label: K.rowType,
|
|
437
|
-
children:
|
|
426
|
+
children: g.entityTypeLabel ?? E
|
|
438
427
|
}),
|
|
439
|
-
/* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ b(O, {
|
|
440
429
|
label: K.rowName,
|
|
441
|
-
children:
|
|
430
|
+
children: g.name
|
|
442
431
|
}),
|
|
443
|
-
/* @__PURE__ */
|
|
432
|
+
/* @__PURE__ */ b(O, {
|
|
444
433
|
label: K.rowEmail,
|
|
445
|
-
children:
|
|
434
|
+
children: g.email || E
|
|
446
435
|
}),
|
|
447
|
-
!X && /* @__PURE__ */
|
|
436
|
+
!X && /* @__PURE__ */ b(O, {
|
|
448
437
|
label: K.rowPaymentReminders,
|
|
449
|
-
children:
|
|
438
|
+
children: g.remindersLabel ?? E
|
|
450
439
|
}),
|
|
451
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ b(O, {
|
|
452
441
|
label: K.rowPhone,
|
|
453
|
-
children:
|
|
442
|
+
children: g.phone || E
|
|
454
443
|
}),
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
label:
|
|
444
|
+
/* @__PURE__ */ b(O, {
|
|
445
|
+
label: g.entityType === "individual" ? K.rowTaxIdSsn : K.rowTaxIdEin,
|
|
457
446
|
isLast: !X,
|
|
458
|
-
children: /* @__PURE__ */
|
|
447
|
+
children: /* @__PURE__ */ x("div", {
|
|
459
448
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
449
|
+
children: [/* @__PURE__ */ x("div", {
|
|
461
450
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
462
|
-
children: [/* @__PURE__ */
|
|
451
|
+
children: [/* @__PURE__ */ b("span", {
|
|
463
452
|
className: "ttw:font-medium",
|
|
464
453
|
children: pe
|
|
465
|
-
}),
|
|
454
|
+
}), g.taxId && /* @__PURE__ */ x(t, {
|
|
466
455
|
type: "button",
|
|
467
456
|
variant: "outline",
|
|
468
457
|
size: "sm",
|
|
469
458
|
onClick: () => {
|
|
470
459
|
q((e) => e === J ? null : J);
|
|
471
460
|
},
|
|
472
|
-
children: [
|
|
461
|
+
children: [b(Y ? oe : ae, { className: "ttw:size-4" }), Y ? K.hideTaxId : K.showTaxId]
|
|
473
462
|
})]
|
|
474
|
-
}), Z && /* @__PURE__ */
|
|
463
|
+
}), Z && /* @__PURE__ */ b(p, {
|
|
475
464
|
variant: "body2",
|
|
476
465
|
className: "ttw:text-muted-foreground",
|
|
477
466
|
children: Z
|
|
478
467
|
})]
|
|
479
468
|
})
|
|
480
469
|
}),
|
|
481
|
-
X && /* @__PURE__ */
|
|
470
|
+
X && /* @__PURE__ */ b(O, {
|
|
482
471
|
label: K.addressHeading,
|
|
483
472
|
isLast: !0,
|
|
484
|
-
children: /* @__PURE__ */
|
|
485
|
-
mode:
|
|
486
|
-
addressLines:
|
|
473
|
+
children: /* @__PURE__ */ b(k, {
|
|
474
|
+
mode: h,
|
|
475
|
+
addressLines: g.addressLines,
|
|
487
476
|
canEdit: j,
|
|
488
477
|
onEditAddress: L,
|
|
489
478
|
onAddAddress: R,
|
|
@@ -494,17 +483,17 @@ function A({ open: e, onOpenChange: o, privacyResetKey: g, mode: b = "customer",
|
|
|
494
483
|
]
|
|
495
484
|
})]
|
|
496
485
|
}),
|
|
497
|
-
!X && /* @__PURE__ */
|
|
498
|
-
mode:
|
|
499
|
-
addressLines:
|
|
486
|
+
!X && /* @__PURE__ */ b(k, {
|
|
487
|
+
mode: h,
|
|
488
|
+
addressLines: g.addressLines,
|
|
500
489
|
canEdit: j,
|
|
501
490
|
onEditAddress: L,
|
|
502
491
|
onAddAddress: R,
|
|
503
492
|
labels: K,
|
|
504
493
|
addressForm: G
|
|
505
494
|
}),
|
|
506
|
-
X && /* @__PURE__ */
|
|
507
|
-
paymentMethod:
|
|
495
|
+
X && /* @__PURE__ */ b(A, {
|
|
496
|
+
paymentMethod: g.paymentMethod,
|
|
508
497
|
canEdit: M,
|
|
509
498
|
onAddBankAccount: z,
|
|
510
499
|
onEditBankAccount: B,
|
|
@@ -517,4 +506,4 @@ function A({ open: e, onOpenChange: o, privacyResetKey: g, mode: b = "customer",
|
|
|
517
506
|
});
|
|
518
507
|
}
|
|
519
508
|
//#endregion
|
|
520
|
-
export {
|
|
509
|
+
export { j as CounterpartDetailsSheet, j as default };
|