@tesouro/embedded-components-react 0.4.20 → 0.4.21
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/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +73 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +195 -193
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +35 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +2 -5
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -2,37 +2,42 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
5
|
+
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
+
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
+
import "../../../shared/data-access/dist/index.js";
|
|
8
|
+
import { useWidgetConfig as n } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
9
|
+
import "../../../shared/feature/dist/index.js";
|
|
10
|
+
import { useCounterpartsQuery as r } from "../../../shared/counterpart-management/data-access/dist/index3.js";
|
|
11
|
+
import { useCreateCounterpartBankAccountMutation as ee, useUpdateCounterpartBankAccountMutation as te } from "../../../shared/counterpart-management/data-access/dist/index5.js";
|
|
12
|
+
import { usePayableSuggestionsQuery as i } from "../../data-access/dist/index17.js";
|
|
8
13
|
import "../../data-access/dist/index.js";
|
|
9
|
-
import { maskAccountNumber as
|
|
10
|
-
import { counterpartFormBankAccountToCreatePayload as
|
|
11
|
-
import { useCounterpartDetails as
|
|
14
|
+
import { maskAccountNumber as a } from "./index21.js";
|
|
15
|
+
import { counterpartFormBankAccountToCreatePayload as ne, counterpartFormBankAccountToUpdatePayload as re, getAchInstructions as ie, getCounterpartEmail as o, getCounterpartName as s, getPayableAchInstructions as c, hasAchFormValues as l, resolveCounterpartBankAccountWrite as ae, validateAchFormValues as oe } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
16
|
+
import { useCounterpartDetails as se } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js";
|
|
12
17
|
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
13
|
-
import { VENDOR_SECTION_PROPS_LABELS_EN as
|
|
14
|
-
import { buildVendorPrefill as
|
|
15
|
-
import { VendorInlineForm as
|
|
16
|
-
import { useCallback as
|
|
17
|
-
import { jsx as
|
|
18
|
+
import { VENDOR_SECTION_PROPS_LABELS_EN as ce } from "./index43.js";
|
|
19
|
+
import { buildVendorPrefill as le } from "./index45.js";
|
|
20
|
+
import { VendorInlineForm as ue } from "./index46.js";
|
|
21
|
+
import { useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
22
|
+
import { jsx as de } from "react/jsx-runtime";
|
|
18
23
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js
|
|
19
|
-
var
|
|
24
|
+
var fe = 10, h = 300, g = {
|
|
20
25
|
accountHolderName: "",
|
|
21
26
|
routingNumber: "",
|
|
22
27
|
accountNumber: ""
|
|
23
28
|
};
|
|
24
|
-
function _({ payableId: _, counterpartId: v, payableCounterpartId: y, payableCounterpartBankAccountId: b,
|
|
29
|
+
function _({ payableId: _, counterpartId: v, payableCounterpartId: y, payableCounterpartBankAccountId: b, isVendorKnown: x = !0, onCounterpartChange: S, requiredError: pe, extractedVendor: C, labels: me }) {
|
|
25
30
|
let w = {
|
|
26
|
-
...
|
|
27
|
-
...
|
|
28
|
-
},
|
|
31
|
+
...ce,
|
|
32
|
+
...me
|
|
33
|
+
}, { initResponse: T } = n(), he = e(T?.scopes, [t.CounterpartReadOrg]), [E, D] = m(""), [ge, _e] = m(""), [O, k] = m(), [ve, A] = m(!1), [j, M] = m(g), N = p(j);
|
|
29
34
|
N.current = j;
|
|
30
|
-
let [
|
|
35
|
+
let [P, F] = m(!1), I = l(j) || P, [ye, L] = m(), [R, z] = m(), B = p(v), [V, be] = m(!1), H = u(() => {
|
|
31
36
|
A(!1), M(g), L(void 0), z(void 0);
|
|
32
|
-
}, []), U =
|
|
33
|
-
|
|
34
|
-
}, [
|
|
35
|
-
|
|
37
|
+
}, []), U = u((e) => {
|
|
38
|
+
be(!0), S(e);
|
|
39
|
+
}, [S]), W = i(_, { enabled: !!_ && !v && !y }).data?.suggested_counterpart?.id;
|
|
40
|
+
d(() => {
|
|
36
41
|
!V && !v && !y && W && U(W);
|
|
37
42
|
}, [
|
|
38
43
|
v,
|
|
@@ -40,40 +45,40 @@ function _({ payableId: _, counterpartId: v, payableCounterpartId: y, payableCou
|
|
|
40
45
|
V,
|
|
41
46
|
W,
|
|
42
47
|
U
|
|
43
|
-
]),
|
|
48
|
+
]), d(() => {
|
|
44
49
|
B.current !== v && (B.current = v, H());
|
|
45
|
-
}, [v, H]),
|
|
50
|
+
}, [v, H]), d(() => {
|
|
46
51
|
let e = setTimeout(() => {
|
|
47
|
-
|
|
48
|
-
},
|
|
52
|
+
_e(E.trim());
|
|
53
|
+
}, h);
|
|
49
54
|
return () => clearTimeout(e);
|
|
50
|
-
}, [
|
|
51
|
-
let G =
|
|
55
|
+
}, [E]);
|
|
56
|
+
let G = r({
|
|
52
57
|
sort: "counterpart_name",
|
|
53
58
|
order: "asc",
|
|
54
|
-
limit:
|
|
55
|
-
counterpart_name__icontains:
|
|
59
|
+
limit: fe,
|
|
60
|
+
counterpart_name__icontains: ge || void 0,
|
|
56
61
|
is_vendor: !0,
|
|
57
|
-
enabled:
|
|
58
|
-
}), K =
|
|
62
|
+
enabled: !O && !v && x && he
|
|
63
|
+
}), K = se({ selectedId: v }), q = ee(), J = te(), Y = f(() => {
|
|
59
64
|
let e = K.counterpart;
|
|
60
65
|
if (!e) return;
|
|
61
66
|
if (K.isBankAccountsLoading) return {
|
|
62
|
-
name:
|
|
63
|
-
email:
|
|
67
|
+
name: s(e),
|
|
68
|
+
email: o(e),
|
|
64
69
|
methodLabel: w.paymentMethodLoading,
|
|
65
70
|
fields: []
|
|
66
71
|
};
|
|
67
72
|
if (K.isBankAccountsError) return {
|
|
68
|
-
name:
|
|
69
|
-
email:
|
|
73
|
+
name: s(e),
|
|
74
|
+
email: o(e),
|
|
70
75
|
methodLabel: w.paymentMethodUnavailable,
|
|
71
76
|
fields: []
|
|
72
77
|
};
|
|
73
|
-
let t =
|
|
78
|
+
let t = c(K.bankAccounts);
|
|
74
79
|
return {
|
|
75
|
-
name:
|
|
76
|
-
email:
|
|
80
|
+
name: s(e),
|
|
81
|
+
email: o(e),
|
|
77
82
|
methodLabel: t ? w.achMethod : w.noMethod,
|
|
78
83
|
fields: t ? [
|
|
79
84
|
{
|
|
@@ -87,7 +92,7 @@ function _({ payableId: _, counterpartId: v, payableCounterpartId: y, payableCou
|
|
|
87
92
|
{
|
|
88
93
|
label: w.accountNumber,
|
|
89
94
|
value: t.account_number ?? "",
|
|
90
|
-
maskedValue: t.account_number ?
|
|
95
|
+
maskedValue: t.account_number ? a(t.account_number) : ""
|
|
91
96
|
}
|
|
92
97
|
] : []
|
|
93
98
|
};
|
|
@@ -97,10 +102,10 @@ function _({ payableId: _, counterpartId: v, payableCounterpartId: y, payableCou
|
|
|
97
102
|
K.isBankAccountsError,
|
|
98
103
|
K.isBankAccountsLoading,
|
|
99
104
|
w
|
|
100
|
-
]), X =
|
|
105
|
+
]), X = f(() => ie(K.bankAccounts), [K.bankAccounts]), Z = f(() => c(K.bankAccounts)?.id, [K.bankAccounts]), Q = u(async () => {
|
|
101
106
|
let e = N.current;
|
|
102
107
|
if (!v) return { ok: !0 };
|
|
103
|
-
if (!
|
|
108
|
+
if (!l(e)) return b && v === y ? {
|
|
104
109
|
ok: !0,
|
|
105
110
|
counterpartBankAccountId: b
|
|
106
111
|
} : K.isBankAccountsLoading || K.isBankAccountsFetching || K.isBankAccountsError ? { ok: !1 } : {
|
|
@@ -108,23 +113,23 @@ function _({ payableId: _, counterpartId: v, payableCounterpartId: y, payableCou
|
|
|
108
113
|
counterpartBankAccountId: Z
|
|
109
114
|
};
|
|
110
115
|
if (K.isBankAccountsLoading || K.isBankAccountsFetching || K.isBankAccountsError) return { ok: !1 };
|
|
111
|
-
let t =
|
|
116
|
+
let t = oe(e);
|
|
112
117
|
if (Object.keys(t).length > 0) return L(t), A(!0), { ok: !1 };
|
|
113
118
|
L(void 0);
|
|
114
|
-
let n =
|
|
119
|
+
let n = ae(K.bankAccounts, R ?? X?.id);
|
|
115
120
|
if (n.kind === "update") return await J.mutateAsync({
|
|
116
121
|
path: {
|
|
117
122
|
counterpart_id: v,
|
|
118
123
|
bank_account_id: n.bankAccountId
|
|
119
124
|
},
|
|
120
|
-
body:
|
|
125
|
+
body: re(e, { includeAchDefaults: n.includeAchDefaults })
|
|
121
126
|
}), z(n.bankAccountId), {
|
|
122
127
|
ok: !0,
|
|
123
128
|
counterpartBankAccountId: n.bankAccountId
|
|
124
129
|
};
|
|
125
130
|
let r = await q.mutateAsync({
|
|
126
131
|
path: { counterpart_id: v },
|
|
127
|
-
body:
|
|
132
|
+
body: ne(e, { isDefaultForCurrency: n.isDefaultForCurrency })
|
|
128
133
|
});
|
|
129
134
|
return z(r?.id), {
|
|
130
135
|
ok: !0,
|
|
@@ -143,32 +148,32 @@ function _({ payableId: _, counterpartId: v, payableCounterpartId: y, payableCou
|
|
|
143
148
|
b,
|
|
144
149
|
y,
|
|
145
150
|
J
|
|
146
|
-
]),
|
|
147
|
-
name:
|
|
148
|
-
email:
|
|
151
|
+
]), xe = f(() => (G.data?.data ?? []).map((e) => ({
|
|
152
|
+
name: s(e),
|
|
153
|
+
email: o(e),
|
|
149
154
|
onSelect: () => U(e.id)
|
|
150
|
-
})), [G.data, U]),
|
|
151
|
-
k(void 0),
|
|
152
|
-
}, []),
|
|
153
|
-
k(void 0),
|
|
155
|
+
})), [G.data, U]), Se = f(() => le(C), [C]), $ = u(() => {
|
|
156
|
+
k(void 0), F(!1);
|
|
157
|
+
}, []), Ce = u((e) => {
|
|
158
|
+
k(void 0), F(!1), U(e);
|
|
154
159
|
}, [U]);
|
|
155
160
|
if (O) return {
|
|
156
161
|
mode: "creating",
|
|
157
|
-
newVendorForm: /* @__PURE__ */
|
|
162
|
+
newVendorForm: /* @__PURE__ */ de(ue, {
|
|
158
163
|
mode: O,
|
|
159
164
|
counterpart: O === "edit" ? K.counterpart : void 0,
|
|
160
165
|
primaryAddress: O === "edit" ? K.primaryAddress : void 0,
|
|
161
166
|
bankAccounts: O === "edit" ? K.bankAccounts : void 0,
|
|
162
167
|
isBankAccountsLoading: O === "edit" ? K.isBankAccountsLoading : void 0,
|
|
163
168
|
isBankAccountsError: O === "edit" ? K.isBankAccountsError : void 0,
|
|
164
|
-
initialName: O === "create" ?
|
|
165
|
-
initialValues: O === "create" ?
|
|
166
|
-
onSaved:
|
|
169
|
+
initialName: O === "create" ? E : void 0,
|
|
170
|
+
initialValues: O === "create" ? Se : void 0,
|
|
171
|
+
onSaved: Ce,
|
|
167
172
|
onCancel: $,
|
|
168
|
-
onDirtyChange:
|
|
173
|
+
onDirtyChange: F
|
|
169
174
|
}),
|
|
170
175
|
onClear: $,
|
|
171
|
-
hasUnsavedVendorChanges:
|
|
176
|
+
hasUnsavedVendorChanges: I
|
|
172
177
|
};
|
|
173
178
|
if (Y) {
|
|
174
179
|
let e = K.isBankAccountsLoading || K.isBankAccountsFetching || K.isBankAccountsError;
|
|
@@ -178,9 +183,9 @@ function _({ payableId: _, counterpartId: v, payableCounterpartId: y, payableCou
|
|
|
178
183
|
onEdit: e ? void 0 : () => k("edit"),
|
|
179
184
|
onClear: () => U(void 0),
|
|
180
185
|
paymentInstructions: e ? void 0 : {
|
|
181
|
-
isOpen:
|
|
186
|
+
isOpen: ve,
|
|
182
187
|
values: j,
|
|
183
|
-
errors:
|
|
188
|
+
errors: ye,
|
|
184
189
|
onOpen: () => {
|
|
185
190
|
A(!0), X && (M({
|
|
186
191
|
accountHolderName: X.account_holder_name ?? "",
|
|
@@ -196,21 +201,22 @@ function _({ payableId: _, counterpartId: v, payableCounterpartId: y, payableCou
|
|
|
196
201
|
}
|
|
197
202
|
},
|
|
198
203
|
savePaymentInstructions: Q,
|
|
199
|
-
hasUnsavedVendorChanges:
|
|
204
|
+
hasUnsavedVendorChanges: I
|
|
200
205
|
};
|
|
201
206
|
}
|
|
207
|
+
let we = !x || !T || !!v && K.isLoading;
|
|
202
208
|
return {
|
|
203
209
|
mode: "selecting",
|
|
204
|
-
error: G.isError ? w.searchFailed : K.isError ? w.vendorDetailsFailed :
|
|
210
|
+
error: G.isError ? w.searchFailed : K.isError ? w.vendorDetailsFailed : pe,
|
|
205
211
|
search: {
|
|
206
|
-
query:
|
|
207
|
-
onQueryChange:
|
|
208
|
-
isLoading: G.
|
|
212
|
+
query: E,
|
|
213
|
+
onQueryChange: D,
|
|
214
|
+
isLoading: we || G.isFetching,
|
|
209
215
|
onAddVendor: () => k("create"),
|
|
210
|
-
results:
|
|
216
|
+
results: xe
|
|
211
217
|
},
|
|
212
218
|
savePaymentInstructions: Q,
|
|
213
|
-
hasUnsavedVendorChanges:
|
|
219
|
+
hasUnsavedVendorChanges: I
|
|
214
220
|
};
|
|
215
221
|
}
|
|
216
222
|
//#endregion
|
|
@@ -50,101 +50,102 @@ import { useVendorSectionProps as Fe } from "./index47.js";
|
|
|
50
50
|
import { usePaymentInstructionsForm as Ie } from "./index48.js";
|
|
51
51
|
import { billCreateTestIds as r } from "./index55.js";
|
|
52
52
|
import { useCallback as i, useEffect as Le, useMemo as a, useRef as Re, useState as o } from "react";
|
|
53
|
-
import { Fragment as ze, jsx as s, jsxs as
|
|
54
|
-
import { Trash2Icon as
|
|
53
|
+
import { Fragment as ze, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
54
|
+
import { Trash2Icon as Be } from "lucide-react";
|
|
55
55
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js
|
|
56
|
-
function
|
|
57
|
-
let
|
|
58
|
-
payable:
|
|
59
|
-
lineItems:
|
|
60
|
-
}),
|
|
56
|
+
function l({ open: l, onOpenChange: u, payableId: Ve, readOnly: d = !1, copy: He, onCollapse: Ue, poweredByBankName: We }) {
|
|
57
|
+
let f = a(() => Se(He), [He]), [p, Ge] = o(), [m, Ke] = o(!1), [qe, Je] = o(!1), [Ye, h] = o(!1), [Xe, Ze] = o(), g = Ve ?? Xe, _ = oe(g, { pollWhileOcrProcessing: !0 }), v = ae(g), { initResponse: y } = re(), Qe = !!y, b = e(y?.scopes, [t.AccountingConfigReadOrg]), x = ee({ enabled: b }), S = _.data, C = !g || !!S, w = !d && C && !!g && S?.status !== "draft", $e = !d && !!S && !Ae(S?.status), T = d || $e, E = we({
|
|
58
|
+
payable: S,
|
|
59
|
+
lineItems: v.lineItems
|
|
60
|
+
}), D = S?.counterpart_id;
|
|
61
61
|
Le(() => {
|
|
62
|
-
|
|
63
|
-
}, [
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
}, []),
|
|
67
|
-
payableId: d ? void 0 :
|
|
68
|
-
counterpartId: d ? void 0 :
|
|
69
|
-
payableCounterpartId:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
62
|
+
m || D && (Ge(D), Ke(!0));
|
|
63
|
+
}, [m, D]);
|
|
64
|
+
let et = i((e) => {
|
|
65
|
+
Ke(!0), Ge(e);
|
|
66
|
+
}, []), O = Fe({
|
|
67
|
+
payableId: d ? void 0 : g,
|
|
68
|
+
counterpartId: d ? void 0 : p,
|
|
69
|
+
payableCounterpartId: D,
|
|
70
|
+
isVendorKnown: !d && C,
|
|
71
|
+
onCounterpartChange: et,
|
|
72
|
+
requiredError: E.errors?.vendor,
|
|
73
|
+
payableCounterpartBankAccountId: S?.counterpart_bank_account_id ?? void 0,
|
|
74
|
+
extractedVendor: S?.counterpart_raw_data ?? void 0
|
|
75
|
+
}), tt = !!(g && m) && !p, k = _.refetch, nt = i(async () => {
|
|
76
|
+
let { data: e } = await k();
|
|
76
77
|
return e?.status ?? void 0;
|
|
77
|
-
}, [
|
|
78
|
-
payableId:
|
|
79
|
-
form:
|
|
80
|
-
labels:
|
|
81
|
-
counterpartId:
|
|
82
|
-
clearCounterpart:
|
|
83
|
-
prepareVendorForSave:
|
|
84
|
-
onPayableCreated:
|
|
85
|
-
onSaved:
|
|
86
|
-
onDraftSaved: () =>
|
|
87
|
-
onFinalized: () =>
|
|
88
|
-
readSavedStatus:
|
|
89
|
-
}),
|
|
78
|
+
}, [k]), rt = a(() => w ? { draftSaved: xe.submittedSaved } : void 0, [w]), A = Ce({
|
|
79
|
+
payableId: Ve,
|
|
80
|
+
form: E,
|
|
81
|
+
labels: rt,
|
|
82
|
+
counterpartId: p,
|
|
83
|
+
clearCounterpart: tt,
|
|
84
|
+
prepareVendorForSave: O.savePaymentInstructions,
|
|
85
|
+
onPayableCreated: Ze,
|
|
86
|
+
onSaved: Ze,
|
|
87
|
+
onDraftSaved: () => u(!1),
|
|
88
|
+
onFinalized: () => u(!1),
|
|
89
|
+
readSavedStatus: w ? nt : void 0
|
|
90
|
+
}), j = !!(A.isSavingDraft || A.isFinalizing), M = d ? g : void 0, N = De({
|
|
90
91
|
payableId: M,
|
|
91
|
-
status:
|
|
92
|
-
}),
|
|
93
|
-
payableId:
|
|
94
|
-
scheduledPaymentDate:
|
|
95
|
-
enabled: d ||
|
|
96
|
-
}),
|
|
97
|
-
counterpartId: d ?
|
|
98
|
-
currency:
|
|
99
|
-
currentBankAccountId: d ?
|
|
100
|
-
enabled:
|
|
101
|
-
}),
|
|
92
|
+
status: S?.status
|
|
93
|
+
}), it = Re(null), P = ke({
|
|
94
|
+
payableId: g,
|
|
95
|
+
scheduledPaymentDate: S?.scheduled_payment_date,
|
|
96
|
+
enabled: d || w
|
|
97
|
+
}), at = ce(S), F = ge(y?.scopes), I = ve({
|
|
98
|
+
counterpartId: d ? D : void 0,
|
|
99
|
+
currency: S?.currency,
|
|
100
|
+
currentBankAccountId: d ? S?.counterpart_bank_account_id ?? void 0 : void 0,
|
|
101
|
+
enabled: F && d
|
|
102
|
+
}), L = Ie({
|
|
102
103
|
payableId: M,
|
|
103
|
-
counterpartId: d ?
|
|
104
|
-
currentBankAccountId:
|
|
105
|
-
canReadCounterpartBankAccounts:
|
|
106
|
-
saveErrorMessage:
|
|
107
|
-
linkErrorMessage:
|
|
108
|
-
}),
|
|
104
|
+
counterpartId: d ? D : void 0,
|
|
105
|
+
currentBankAccountId: S?.counterpart_bank_account_id ?? void 0,
|
|
106
|
+
canReadCounterpartBankAccounts: F,
|
|
107
|
+
saveErrorMessage: f.detail.paymentInstructionsSaveError,
|
|
108
|
+
linkErrorMessage: f.detail.paymentInstructionsLinkError
|
|
109
|
+
}), ot = e(y?.scopes, [t.PayableWriteOrg]), R = e(y?.scopes, [t.CounterpartWriteOrg]) && ot, st = R && se(S?.status) && !P.hasScheduledPayment && !P.isResolving, z = be({
|
|
109
110
|
payableId: M,
|
|
110
|
-
amountDueMinorUnits: _e(
|
|
111
|
-
amountToPayMinorUnits:
|
|
112
|
-
currencyCode:
|
|
113
|
-
dueDate:
|
|
114
|
-
hasScheduledPayment:
|
|
115
|
-
labels:
|
|
111
|
+
amountDueMinorUnits: _e(S) ?? 0,
|
|
112
|
+
amountToPayMinorUnits: S?.amount_to_pay ?? void 0,
|
|
113
|
+
currencyCode: S?.currency ?? void 0,
|
|
114
|
+
dueDate: S?.due_date,
|
|
115
|
+
hasScheduledPayment: P.hasScheduledPayment,
|
|
116
|
+
labels: f.markAsPaid
|
|
116
117
|
}), B = Ee({
|
|
117
118
|
payableId: M,
|
|
118
|
-
approvalPolicyId:
|
|
119
|
+
approvalPolicyId: S?.approval_policy_id,
|
|
119
120
|
enabled: d,
|
|
120
|
-
copy:
|
|
121
|
+
copy: f.approvalPolicyCopy
|
|
121
122
|
}), ct = he({
|
|
122
|
-
status:
|
|
123
|
-
scopes:
|
|
123
|
+
status: S?.status,
|
|
124
|
+
scopes: y?.scopes,
|
|
124
125
|
hasWaitingRequest: N.hasWaitingRequest,
|
|
125
126
|
arePendingApproversUnknown: B.isLoading
|
|
126
127
|
}), { actions: V, decisionDialog: lt, isActionPending: ut } = Oe({
|
|
127
|
-
payableId: d ||
|
|
128
|
-
status:
|
|
128
|
+
payableId: d || w ? g : void 0,
|
|
129
|
+
status: S?.status,
|
|
129
130
|
currentApprovalRequestId: N.id,
|
|
130
131
|
hasWaitingRequest: N.hasWaitingRequest,
|
|
131
132
|
arePendingApproversUnknown: B.isLoading,
|
|
132
|
-
hasScheduledPayment:
|
|
133
|
-
scheduledPaymentIntentId:
|
|
134
|
-
isScheduledPaymentUnknown:
|
|
133
|
+
hasScheduledPayment: P.hasScheduledPayment,
|
|
134
|
+
scheduledPaymentIntentId: P.scheduledPaymentIntentId,
|
|
135
|
+
isScheduledPaymentUnknown: P.isResolving,
|
|
135
136
|
pendingApprovers: B.pendingApprovers,
|
|
136
|
-
labels:
|
|
137
|
+
labels: f.actions,
|
|
137
138
|
isMarkAsPaidPending: z.isPending,
|
|
138
139
|
onMarkAsPaidSelect: z.open,
|
|
139
|
-
onPayBillSelect: () =>
|
|
140
|
-
onActionSucceeded:
|
|
140
|
+
onPayBillSelect: () => it.current?.open(),
|
|
141
|
+
onActionSucceeded: w ? () => u(!1) : void 0
|
|
141
142
|
}), H = je({
|
|
142
|
-
payableId:
|
|
143
|
-
status:
|
|
143
|
+
payableId: g,
|
|
144
|
+
status: S?.status,
|
|
144
145
|
enabled: !d,
|
|
145
|
-
labels:
|
|
146
|
-
onDeleted: () =>
|
|
147
|
-
}), U =
|
|
146
|
+
labels: f.deleteDraft,
|
|
147
|
+
onDeleted: () => u(!1)
|
|
148
|
+
}), U = j || ut, W = _.isLoading || v.isResolving || x.isResolving || I.isLoading, G = _.isError || v.isError || x.isError, dt = a(() => [...H.menuItems, ...w || d && !W && !G ? V.menu.map((e) => ({
|
|
148
149
|
id: e.id,
|
|
149
150
|
label: e.label,
|
|
150
151
|
onSelect: e.onSelect,
|
|
@@ -154,194 +155,195 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
154
155
|
})) : []], [
|
|
155
156
|
V.menu,
|
|
156
157
|
H.menuItems,
|
|
157
|
-
|
|
158
|
+
w,
|
|
158
159
|
d,
|
|
159
160
|
W,
|
|
160
161
|
G
|
|
161
|
-
]), K = a(() => (
|
|
162
|
+
]), K = a(() => (x.data?.data ?? []).map((e) => ({
|
|
162
163
|
value: e.id,
|
|
163
164
|
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
164
|
-
})), [
|
|
165
|
-
|
|
166
|
-
let ft = !
|
|
165
|
+
})), [x.data]), q;
|
|
166
|
+
Qe && (b ? x.isError ? q = f.lineItemsGlCodeUnavailable.loadError : !x.isResolving && K.length === 0 && (q = f.lineItemsGlCodeUnavailable.empty) : q = f.lineItemsGlCodeUnavailable.noAccess);
|
|
167
|
+
let ft = !Qe || !!q || x.isResolving, pt = b && !x.isResolving && !x.isError, J = ie(M), mt = e(y?.scopes, [t.UserReadOrg]), ht = te({ enabled: d && mt }), gt = a(() => Ne(J.data?.data ?? [], ht.data?.data ?? [], f.history), [
|
|
167
168
|
J.data,
|
|
168
169
|
ht.data,
|
|
169
|
-
|
|
170
|
+
f.history
|
|
170
171
|
]), _t = a(() => Te({
|
|
171
|
-
records:
|
|
172
|
+
records: P.paymentRecords,
|
|
172
173
|
events: J.data?.data ?? [],
|
|
173
|
-
currencyCode:
|
|
174
|
-
labels:
|
|
174
|
+
currencyCode: S?.currency,
|
|
175
|
+
labels: f.detail
|
|
175
176
|
}), [
|
|
176
|
-
|
|
177
|
+
P.paymentRecords,
|
|
177
178
|
J.data,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
]), vt = a(() => d &&
|
|
181
|
-
payable:
|
|
182
|
-
lineItems:
|
|
179
|
+
S?.currency,
|
|
180
|
+
f.detail
|
|
181
|
+
]), vt = a(() => d && S ? Me({
|
|
182
|
+
payable: S,
|
|
183
|
+
lineItems: v.lineItems,
|
|
183
184
|
glCodeOptions: K,
|
|
184
185
|
glCodeRosterAvailable: pt,
|
|
185
186
|
history: gt,
|
|
186
187
|
paymentHistory: _t,
|
|
187
188
|
approvalPolicy: B.view,
|
|
188
|
-
labels:
|
|
189
|
-
hasScheduledPayment:
|
|
190
|
-
payableAchInstructions:
|
|
191
|
-
payableAchInstructionsReadable:
|
|
189
|
+
labels: f.detail,
|
|
190
|
+
hasScheduledPayment: P.hasScheduledPayment,
|
|
191
|
+
payableAchInstructions: I.achInstructions,
|
|
192
|
+
payableAchInstructionsReadable: F && !I.isError
|
|
192
193
|
}) : void 0, [
|
|
193
|
-
|
|
194
|
+
P.hasScheduledPayment,
|
|
194
195
|
B.view,
|
|
195
|
-
|
|
196
|
-
|
|
196
|
+
F,
|
|
197
|
+
f.detail,
|
|
197
198
|
K,
|
|
198
199
|
pt,
|
|
199
200
|
gt,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
v.lineItems,
|
|
202
|
+
S,
|
|
203
|
+
I.achInstructions,
|
|
204
|
+
I.isError,
|
|
204
205
|
_t,
|
|
205
206
|
d
|
|
206
|
-
]), Y =
|
|
207
|
-
let e =
|
|
208
|
-
if (!
|
|
209
|
-
|
|
207
|
+
]), Y = S?.source_of_payable_data === "ocr", X = at?.name, yt = d ? X ? f.viewTitle(X) : f.readOnlyTitle : X && (Y || w) ? f.extractedTitle(X) : f.newTitle, bt = d && S?.created_at ? f.addedOn(ne(S.created_at.slice(0, 10))) : void 0, Z = i(() => {
|
|
208
|
+
let e = E.isDirty || O.hasUnsavedVendorChanges || !!A.stagedFile || A.isFileDeletionPending;
|
|
209
|
+
if (!T && e) {
|
|
210
|
+
h(!0);
|
|
210
211
|
return;
|
|
211
212
|
}
|
|
212
|
-
|
|
213
|
+
u(!1);
|
|
213
214
|
}, [
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
215
|
+
A.isFileDeletionPending,
|
|
216
|
+
A.stagedFile,
|
|
217
|
+
E.isDirty,
|
|
218
|
+
T,
|
|
219
|
+
u,
|
|
220
|
+
O.hasUnsavedVendorChanges
|
|
220
221
|
]), xt = i(() => {
|
|
221
|
-
|
|
222
|
-
}, [
|
|
222
|
+
h(!1), u(!1);
|
|
223
|
+
}, [u]), Q = v.isResolving || O.mode === "creating", St = i(async () => {
|
|
223
224
|
if (Q) return;
|
|
224
|
-
let e = await
|
|
225
|
-
|
|
225
|
+
let e = await A.saveDraft();
|
|
226
|
+
h(!1), e && u(!1);
|
|
226
227
|
}, [
|
|
227
|
-
|
|
228
|
+
A,
|
|
228
229
|
Q,
|
|
229
|
-
|
|
230
|
+
u
|
|
230
231
|
]), $ = me({
|
|
231
|
-
payable:
|
|
232
|
-
onRemoved: () =>
|
|
233
|
-
canManage:
|
|
232
|
+
payable: S,
|
|
233
|
+
onRemoved: () => u(!1),
|
|
234
|
+
canManage: ot
|
|
234
235
|
}), Ct = i((e) => {
|
|
235
|
-
if (!(U || $.isBusy)) return e ?
|
|
236
|
+
if (!(U || $.isBusy)) return e ? u(!0) : Z();
|
|
236
237
|
}, [
|
|
237
238
|
$.isBusy,
|
|
238
239
|
U,
|
|
239
240
|
Z,
|
|
240
|
-
|
|
241
|
-
]), wt = $.isPossibleDuplicate, Tt = !d && Y && !
|
|
241
|
+
u
|
|
242
|
+
]), wt = $.isPossibleDuplicate, Tt = !d && Y && !qe, Et = wt || Tt ? /* @__PURE__ */ c(ze, { children: [wt ? /* @__PURE__ */ s(ue, {
|
|
242
243
|
onNotADuplicate: $.onNotADuplicate,
|
|
243
244
|
onRemoveBill: $.onRemoveBill,
|
|
244
245
|
isActionDisabled: $.isBusy,
|
|
245
246
|
labels: $.removeBillLabel ? { removeBillButton: $.removeBillLabel } : void 0,
|
|
246
247
|
testId: r.duplicateNotice
|
|
247
|
-
}) : null, Tt ? /* @__PURE__ */ s(de, { onDismiss: () =>
|
|
248
|
-
return /* @__PURE__ */
|
|
248
|
+
}) : null, Tt ? /* @__PURE__ */ s(de, { onDismiss: () => Je(!0) }) : null] }) : void 0;
|
|
249
|
+
return /* @__PURE__ */ c(ze, { children: [
|
|
249
250
|
/* @__PURE__ */ s(le, {
|
|
250
|
-
open:
|
|
251
|
+
open: l,
|
|
251
252
|
onOpenChange: Ct,
|
|
252
253
|
title: yt,
|
|
253
254
|
subtitle: bt,
|
|
254
255
|
notice: Et,
|
|
255
256
|
vendor: {
|
|
256
|
-
...
|
|
257
|
+
...O,
|
|
257
258
|
testId: r.vendorSection
|
|
258
259
|
},
|
|
259
|
-
values:
|
|
260
|
-
errors:
|
|
261
|
-
onChange:
|
|
260
|
+
values: E.values,
|
|
261
|
+
errors: E.errors,
|
|
262
|
+
onChange: E.onChange,
|
|
262
263
|
lineItems: {
|
|
263
|
-
items:
|
|
264
|
+
items: E.lineItemRows,
|
|
264
265
|
glCodeOptions: K,
|
|
265
266
|
glCodeDisabled: ft,
|
|
266
267
|
glCodeUnavailableMessage: q,
|
|
267
|
-
discount:
|
|
268
|
-
onDiscountChange:
|
|
269
|
-
tax:
|
|
270
|
-
onTaxChange:
|
|
271
|
-
total:
|
|
272
|
-
onTotalChange:
|
|
273
|
-
onAddLineItem:
|
|
274
|
-
errors:
|
|
275
|
-
totalsErrors:
|
|
268
|
+
discount: E.discount,
|
|
269
|
+
onDiscountChange: E.onDiscountChange,
|
|
270
|
+
tax: E.tax,
|
|
271
|
+
onTaxChange: E.onTaxChange,
|
|
272
|
+
total: E.total,
|
|
273
|
+
onTotalChange: E.onTotalChange,
|
|
274
|
+
onAddLineItem: E.onAddLineItem,
|
|
275
|
+
errors: E.lineItemErrors,
|
|
276
|
+
totalsErrors: E.totalsErrors,
|
|
276
277
|
testId: r.lineItems
|
|
277
278
|
},
|
|
278
279
|
documentPanel: /* @__PURE__ */ s(Pe, {
|
|
279
|
-
payableId:
|
|
280
|
-
readOnly:
|
|
281
|
-
isDocumentPending: !!
|
|
282
|
-
file:
|
|
283
|
-
id:
|
|
284
|
-
name:
|
|
285
|
-
url:
|
|
286
|
-
mimetype:
|
|
280
|
+
payableId: g,
|
|
281
|
+
readOnly: T,
|
|
282
|
+
isDocumentPending: !!g && !S?.file && (_.isLoading || S?.ocr_status === "processing"),
|
|
283
|
+
file: S?.file ? {
|
|
284
|
+
id: S.file.id,
|
|
285
|
+
name: S.file.name,
|
|
286
|
+
url: S.file.url,
|
|
287
|
+
mimetype: S.file.mimetype
|
|
287
288
|
} : void 0,
|
|
288
289
|
staging: {
|
|
289
|
-
stagedFile:
|
|
290
|
-
onFileStaged:
|
|
291
|
-
onClearStagedFile:
|
|
292
|
-
isSaving:
|
|
290
|
+
stagedFile: A.stagedFile,
|
|
291
|
+
onFileStaged: A.stageFile,
|
|
292
|
+
onClearStagedFile: A.clearStagedFile,
|
|
293
|
+
isSaving: j
|
|
293
294
|
},
|
|
294
295
|
deletion: {
|
|
295
|
-
isPending:
|
|
296
|
-
onRequest:
|
|
297
|
-
onDetachNow:
|
|
298
|
-
isDeleting:
|
|
299
|
-
hasFailed:
|
|
296
|
+
isPending: A.isFileDeletionPending,
|
|
297
|
+
onRequest: A.requestFileDeletion,
|
|
298
|
+
onDetachNow: A.detachFileNow,
|
|
299
|
+
isDeleting: A.isDeletingFile,
|
|
300
|
+
hasFailed: A.hasFileDeletionFailed
|
|
300
301
|
}
|
|
301
302
|
}),
|
|
302
303
|
menuItems: dt,
|
|
303
|
-
readOnly:
|
|
304
|
+
readOnly: T,
|
|
304
305
|
detail: d ? {
|
|
305
306
|
view: vt,
|
|
306
307
|
actions: V,
|
|
307
|
-
scheduledSummary:
|
|
308
|
+
scheduledSummary: P.hasScheduledPayment && P.scheduledDateLabel ? f.scheduledSummary(P.scheduledDateLabel) : void 0,
|
|
308
309
|
showApprovalOverrideNotice: ct,
|
|
309
|
-
onEditPaymentInstructions:
|
|
310
|
-
paymentInstructionsForm:
|
|
311
|
-
isOpen:
|
|
312
|
-
values:
|
|
313
|
-
errors:
|
|
314
|
-
isSaving:
|
|
315
|
-
onOpen:
|
|
316
|
-
onCancel:
|
|
317
|
-
onChange:
|
|
318
|
-
onSave:
|
|
310
|
+
onEditPaymentInstructions: D && st ? L.open : void 0,
|
|
311
|
+
paymentInstructionsForm: D && (st || R && S?.status === "rejected") ? {
|
|
312
|
+
isOpen: L.isOpen,
|
|
313
|
+
values: L.values,
|
|
314
|
+
errors: L.errors,
|
|
315
|
+
isSaving: L.isSaving,
|
|
316
|
+
onOpen: L.open,
|
|
317
|
+
onCancel: L.close,
|
|
318
|
+
onChange: L.onChange,
|
|
319
|
+
onSave: L.save
|
|
319
320
|
} : void 0,
|
|
321
|
+
hideMissingPaymentInstructions: S?.status === "paid" || S?.status === "canceled",
|
|
320
322
|
isLoading: W,
|
|
321
323
|
isError: G,
|
|
322
|
-
paymentHistoryError:
|
|
323
|
-
paymentHistoryLoading:
|
|
324
|
+
paymentHistoryError: P.isError || J.isError,
|
|
325
|
+
paymentHistoryLoading: P.isResolving || J.isLoading
|
|
324
326
|
} : void 0,
|
|
325
|
-
isLineItemsLoading:
|
|
327
|
+
isLineItemsLoading: v.isResolving,
|
|
326
328
|
isSaving: U,
|
|
327
|
-
isSavingDraft:
|
|
328
|
-
isSubmitting:
|
|
329
|
+
isSavingDraft: A.isSavingDraft,
|
|
330
|
+
isSubmitting: A.isFinalizing,
|
|
329
331
|
onCancel: Z,
|
|
330
|
-
onCollapse: d ?
|
|
331
|
-
onSaveDraft:
|
|
332
|
-
onFinalize:
|
|
333
|
-
scrollToErrorToken:
|
|
334
|
-
showSubmit: !
|
|
332
|
+
onCollapse: d ? Ue : void 0,
|
|
333
|
+
onSaveDraft: A.saveDraft,
|
|
334
|
+
onFinalize: A.finalize,
|
|
335
|
+
scrollToErrorToken: A.scrollToErrorToken,
|
|
336
|
+
showSubmit: !T && C,
|
|
335
337
|
testId: r.dialog
|
|
336
338
|
}),
|
|
337
339
|
/* @__PURE__ */ s(pe, {
|
|
338
|
-
open:
|
|
340
|
+
open: Ye,
|
|
339
341
|
onSaveDraft: St,
|
|
340
342
|
onDiscard: xt,
|
|
341
|
-
onCancel: () =>
|
|
342
|
-
isSaving:
|
|
343
|
+
onCancel: () => h(!1),
|
|
344
|
+
isSaving: A.isSavingDraft,
|
|
343
345
|
isSaveDraftDisabled: Q,
|
|
344
|
-
labels:
|
|
346
|
+
labels: f.unsavedChanges,
|
|
345
347
|
testId: r.unsavedDialog,
|
|
346
348
|
saveDraftTestId: r.unsavedSaveDraft,
|
|
347
349
|
discardTestId: r.unsavedDiscard,
|
|
@@ -349,14 +351,14 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
349
351
|
}),
|
|
350
352
|
/* @__PURE__ */ s(n, {
|
|
351
353
|
...lt,
|
|
352
|
-
labels: { cancelButton:
|
|
354
|
+
labels: { cancelButton: f.actions.decisionDialog.cancelButton },
|
|
353
355
|
testId: r.decisionDialog,
|
|
354
356
|
confirmTestId: r.decisionConfirm,
|
|
355
357
|
reasonTestId: r.decisionReason
|
|
356
358
|
}),
|
|
357
359
|
/* @__PURE__ */ s(n, {
|
|
358
360
|
...H.dialog,
|
|
359
|
-
labels: { cancelButton:
|
|
361
|
+
labels: { cancelButton: f.actions.decisionDialog.cancelButton },
|
|
360
362
|
testId: r.deleteDraftDialog,
|
|
361
363
|
confirmTestId: r.deleteDraftConfirm
|
|
362
364
|
}),
|
|
@@ -366,20 +368,20 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
366
368
|
onConfirm: $.removeConfirmation.onConfirm,
|
|
367
369
|
onCancel: $.removeConfirmation.onCancel,
|
|
368
370
|
isPending: $.removeConfirmation.isPending,
|
|
369
|
-
confirmIcon: /* @__PURE__ */ s(
|
|
371
|
+
confirmIcon: /* @__PURE__ */ s(Be, {}),
|
|
370
372
|
labels: { cancelButton: $.removeConfirmation.cancelButtonLabel },
|
|
371
373
|
testId: r.duplicateRemoveDialog,
|
|
372
374
|
confirmTestId: r.duplicateRemoveConfirm
|
|
373
375
|
}),
|
|
374
376
|
/* @__PURE__ */ s(fe, { ...z.dialogProps }),
|
|
375
|
-
d &&
|
|
376
|
-
ref:
|
|
377
|
-
payable:
|
|
378
|
-
onMissingAchInstructions:
|
|
379
|
-
poweredByBankName:
|
|
380
|
-
labels:
|
|
377
|
+
d && S ? /* @__PURE__ */ s(ye, {
|
|
378
|
+
ref: it,
|
|
379
|
+
payable: S,
|
|
380
|
+
onMissingAchInstructions: R ? L.open : void 0,
|
|
381
|
+
poweredByBankName: We,
|
|
382
|
+
labels: f.payBill
|
|
381
383
|
}) : null
|
|
382
384
|
] });
|
|
383
385
|
}
|
|
384
386
|
//#endregion
|
|
385
|
-
export {
|
|
387
|
+
export { l as BillCreateDialog, l as default };
|
|
@@ -18,16 +18,16 @@ import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
|
18
18
|
import { AlertTriangle as _ } from "lucide-react";
|
|
19
19
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js
|
|
20
20
|
var v = "ttw:text-base ttw:font-semibold", y = "ttw:px-3 ttw:py-2", b = "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0";
|
|
21
|
-
function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideNotice: w, paymentInstructionsForm: T,
|
|
22
|
-
let
|
|
23
|
-
...
|
|
24
|
-
payToHeading: x?.paidOnLabel ?
|
|
25
|
-
}), [
|
|
26
|
-
if (
|
|
27
|
-
title:
|
|
28
|
-
description:
|
|
21
|
+
function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideNotice: w, paymentInstructionsForm: T, hideMissingPaymentInstructions: E, onEditPaymentInstructions: D, paymentHistoryError: O, paymentHistoryLoading: k, isLoading: A, isError: j, labels: M }) {
|
|
22
|
+
let N = m(() => d(M), [M]), P = m(() => ({
|
|
23
|
+
...N.payToCard,
|
|
24
|
+
payToHeading: x?.paidOnLabel ? N.payToHeadingPaid : N.payToHeading
|
|
25
|
+
}), [N, x?.paidOnLabel]);
|
|
26
|
+
if (j) return /* @__PURE__ */ h(a, {
|
|
27
|
+
title: N.errorTitle,
|
|
28
|
+
description: N.errorDescription
|
|
29
29
|
});
|
|
30
|
-
if (
|
|
30
|
+
if (A || !x) return /* @__PURE__ */ g("div", {
|
|
31
31
|
"aria-hidden": !0,
|
|
32
32
|
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
33
33
|
children: [
|
|
@@ -36,24 +36,24 @@ function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideN
|
|
|
36
36
|
/* @__PURE__ */ h(n, { className: "ttw:h-24 ttw:w-full" })
|
|
37
37
|
]
|
|
38
38
|
});
|
|
39
|
-
let
|
|
39
|
+
let F = E || x.payTo.fields.length > 0 ? void 0 : T;
|
|
40
40
|
return /* @__PURE__ */ g("div", {
|
|
41
41
|
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
42
42
|
children: [
|
|
43
|
-
|
|
43
|
+
F ? /* @__PURE__ */ g("div", {
|
|
44
44
|
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-md ttw:border ttw:border-amber-200 ttw:bg-amber-50 ttw:px-3 ttw:py-2.5",
|
|
45
45
|
children: [
|
|
46
46
|
/* @__PURE__ */ h(_, { className: "ttw:size-4 ttw:shrink-0 ttw:text-amber-800" }),
|
|
47
47
|
/* @__PURE__ */ h("p", {
|
|
48
48
|
className: "ttw:flex-1 ttw:text-sm ttw:text-foreground",
|
|
49
|
-
children:
|
|
49
|
+
children: N.missingPaymentInstructionsBanner
|
|
50
50
|
}),
|
|
51
51
|
/* @__PURE__ */ h(t, {
|
|
52
52
|
type: "button",
|
|
53
53
|
variant: "outline",
|
|
54
54
|
size: "sm",
|
|
55
|
-
onClick:
|
|
56
|
-
children:
|
|
55
|
+
onClick: F.onOpen,
|
|
56
|
+
children: N.addPaymentInstructions
|
|
57
57
|
})
|
|
58
58
|
]
|
|
59
59
|
}) : null,
|
|
@@ -66,7 +66,7 @@ function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideN
|
|
|
66
66
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
67
67
|
children: [/* @__PURE__ */ h("span", {
|
|
68
68
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
69
|
-
children:
|
|
69
|
+
children: N.amountDueHeading
|
|
70
70
|
}), /* @__PURE__ */ h("span", {
|
|
71
71
|
className: "ttw:text-3xl ttw:font-semibold",
|
|
72
72
|
children: x.amountDue
|
|
@@ -75,7 +75,7 @@ function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideN
|
|
|
75
75
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
76
76
|
children: [/* @__PURE__ */ h("span", {
|
|
77
77
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
78
|
-
children:
|
|
78
|
+
children: N.amountPaidHeading
|
|
79
79
|
}), /* @__PURE__ */ h("span", {
|
|
80
80
|
className: "ttw:text-3xl ttw:font-semibold ttw:text-emerald-600",
|
|
81
81
|
children: x.amountPaid
|
|
@@ -85,7 +85,7 @@ function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideN
|
|
|
85
85
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
86
86
|
children: [/* @__PURE__ */ h("span", {
|
|
87
87
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
88
|
-
children:
|
|
88
|
+
children: N.amountDueHeading
|
|
89
89
|
}), /* @__PURE__ */ h("span", {
|
|
90
90
|
className: "ttw:text-3xl ttw:font-semibold",
|
|
91
91
|
children: x.amountDue
|
|
@@ -98,7 +98,7 @@ function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideN
|
|
|
98
98
|
}) : /* @__PURE__ */ h(s, {
|
|
99
99
|
status: x.status,
|
|
100
100
|
tone: x.statusTone,
|
|
101
|
-
labels:
|
|
101
|
+
labels: N.statusBadge
|
|
102
102
|
}) }),
|
|
103
103
|
/* @__PURE__ */ g("div", {
|
|
104
104
|
className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6",
|
|
@@ -106,7 +106,7 @@ function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideN
|
|
|
106
106
|
className: "ttw:flex ttw:flex-col",
|
|
107
107
|
children: [/* @__PURE__ */ h("span", {
|
|
108
108
|
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
109
|
-
children:
|
|
109
|
+
children: N.invoiceDateLabel
|
|
110
110
|
}), /* @__PURE__ */ h("span", {
|
|
111
111
|
className: "ttw:text-sm ttw:font-medium",
|
|
112
112
|
children: x.invoiceDateLabel
|
|
@@ -115,19 +115,19 @@ function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideN
|
|
|
115
115
|
className: "ttw:flex ttw:flex-col",
|
|
116
116
|
children: [/* @__PURE__ */ h("span", {
|
|
117
117
|
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
118
|
-
children:
|
|
118
|
+
children: N.dueDateLabel
|
|
119
119
|
}), /* @__PURE__ */ h(c, {
|
|
120
120
|
className: "ttw:text-sm ttw:font-medium",
|
|
121
121
|
value: x.dueDateLabel,
|
|
122
122
|
tone: x.dueDateTone,
|
|
123
|
-
labels:
|
|
123
|
+
labels: N.dueDate
|
|
124
124
|
})]
|
|
125
125
|
})]
|
|
126
126
|
}),
|
|
127
127
|
w ? /* @__PURE__ */ h(r, {
|
|
128
128
|
variant: "caption",
|
|
129
129
|
color: "muted",
|
|
130
|
-
children:
|
|
130
|
+
children: N.approvalOverrideNotice
|
|
131
131
|
}) : null,
|
|
132
132
|
C ? /* @__PURE__ */ h("div", { children: /* @__PURE__ */ h(e, {
|
|
133
133
|
variant: "outline",
|
|
@@ -141,9 +141,9 @@ function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideN
|
|
|
141
141
|
}),
|
|
142
142
|
/* @__PURE__ */ h(u, {
|
|
143
143
|
summary: x.payTo,
|
|
144
|
-
onEdit: E,
|
|
144
|
+
onEdit: E ? void 0 : D,
|
|
145
145
|
instructionsCollapsed: !0,
|
|
146
|
-
paymentInstructions: T ? {
|
|
146
|
+
paymentInstructions: T && !E ? {
|
|
147
147
|
isOpen: T.isOpen,
|
|
148
148
|
values: T.values,
|
|
149
149
|
errors: T.errors,
|
|
@@ -153,17 +153,17 @@ function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideN
|
|
|
153
153
|
onSave: T.onSave,
|
|
154
154
|
onCancel: T.onCancel
|
|
155
155
|
} : void 0,
|
|
156
|
-
labels:
|
|
156
|
+
labels: P
|
|
157
157
|
}),
|
|
158
|
-
x.paymentHistory.length ||
|
|
158
|
+
x.paymentHistory.length || O || k ? /* @__PURE__ */ g("section", {
|
|
159
159
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
160
160
|
children: [/* @__PURE__ */ h("h3", {
|
|
161
161
|
className: v,
|
|
162
|
-
children:
|
|
163
|
-
}),
|
|
162
|
+
children: N.paymentHistoryHeading
|
|
163
|
+
}), O ? /* @__PURE__ */ h("p", {
|
|
164
164
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
165
|
-
children:
|
|
166
|
-
}) :
|
|
165
|
+
children: N.paymentHistoryErrorDescription
|
|
166
|
+
}) : k ? /* @__PURE__ */ h(n, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ h(l, { records: x.paymentHistory })]
|
|
167
167
|
}) : null,
|
|
168
168
|
/* @__PURE__ */ h("dl", {
|
|
169
169
|
className: "ttw:flex ttw:flex-col",
|
|
@@ -185,15 +185,15 @@ function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideN
|
|
|
185
185
|
children: [
|
|
186
186
|
/* @__PURE__ */ h("th", {
|
|
187
187
|
className: i(y, "ttw:text-left ttw:font-normal"),
|
|
188
|
-
children:
|
|
188
|
+
children: N.descriptionAndGlCodeColumn
|
|
189
189
|
}),
|
|
190
190
|
/* @__PURE__ */ h("th", {
|
|
191
191
|
className: i(y, "ttw:text-right ttw:font-normal"),
|
|
192
|
-
children:
|
|
192
|
+
children: N.qtyPriceColumn
|
|
193
193
|
}),
|
|
194
194
|
/* @__PURE__ */ h("th", {
|
|
195
195
|
className: i(y, "ttw:text-right ttw:font-normal"),
|
|
196
|
-
children:
|
|
196
|
+
children: N.amountColumn
|
|
197
197
|
})
|
|
198
198
|
]
|
|
199
199
|
}) }), /* @__PURE__ */ g("tbody", { children: [x.lineItems.map((e) => /* @__PURE__ */ g("tr", {
|
|
@@ -232,13 +232,13 @@ function x({ view: x, actions: S = p, scheduledSummary: C, showApprovalOverrideN
|
|
|
232
232
|
}) }),
|
|
233
233
|
x.approvalPolicy ? /* @__PURE__ */ h(o, {
|
|
234
234
|
view: x.approvalPolicy,
|
|
235
|
-
labels:
|
|
235
|
+
labels: N.approvalPolicy
|
|
236
236
|
}) : null,
|
|
237
237
|
x.history.length ? /* @__PURE__ */ g("section", {
|
|
238
238
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
239
239
|
children: [/* @__PURE__ */ h("h3", {
|
|
240
240
|
className: v,
|
|
241
|
-
children:
|
|
241
|
+
children: N.historyHeading
|
|
242
242
|
}), /* @__PURE__ */ h("ul", {
|
|
243
243
|
className: "ttw:flex ttw:flex-col",
|
|
244
244
|
children: x.history.map((e) => /* @__PURE__ */ g("li", {
|
|
@@ -64,7 +64,7 @@ function x({ query: x, onQueryChange: S, results: C, isLoading: w, onAddVendor:
|
|
|
64
64
|
width: "30%"
|
|
65
65
|
})]
|
|
66
66
|
}, t))]
|
|
67
|
-
}) :
|
|
67
|
+
}) : C.length === 0 ? /* @__PURE__ */ h("div", {
|
|
68
68
|
className: d("ttw:flex ttw:items-center ttw:justify-center ttw:py-6 ttw:text-center ttw:text-sm", b),
|
|
69
69
|
children: O.emptyResults
|
|
70
70
|
}) : /* @__PURE__ */ h(t, { children: C.map((e, t) => /* @__PURE__ */ g(r, {
|
|
@@ -77,10 +77,7 @@ function x({ query: x, onQueryChange: S, results: C, isLoading: w, onAddVendor:
|
|
|
77
77
|
className: "ttw:ml-auto ttw:text-muted-foreground",
|
|
78
78
|
children: e.email
|
|
79
79
|
})]
|
|
80
|
-
}, `${e.name}:${e.email}:${t}`)) })
|
|
81
|
-
className: d("ttw:flex ttw:items-center ttw:justify-center ttw:py-6 ttw:text-center ttw:text-sm ttw:text-muted-foreground", b),
|
|
82
|
-
children: O.searchHint
|
|
83
|
-
}),
|
|
80
|
+
}, `${e.name}:${e.email}:${t}`)) }),
|
|
84
81
|
/* @__PURE__ */ h(a, {}),
|
|
85
82
|
/* @__PURE__ */ g(r, {
|
|
86
83
|
value: "__add_vendor__",
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.4.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.4.21", n = "0da2780209174236718609ef642af344a370e56c", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|