@tesouro/embedded-components-react 0.4.19 → 0.4.20
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.css +11 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +23 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +49 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +254 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +71 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +5 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +1 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +142 -137
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +52 -47
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -25,122 +25,126 @@ import { UnsavedBillDialog as pe } from "../../ui/dist/index102.js";
|
|
|
25
25
|
import "../../ui/dist/index.js";
|
|
26
26
|
import { usePayableDuplicateReview as me } from "./index12.js";
|
|
27
27
|
import "./index13.js";
|
|
28
|
-
import {
|
|
29
|
-
import { resolveAmountDueMinorUnits as
|
|
30
|
-
import { usePayableAchInstructions as
|
|
28
|
+
import { canOverrideApprovalPolicy as he, canReadCounterpartBankAccounts as ge } from "./index18.js";
|
|
29
|
+
import { resolveAmountDueMinorUnits as _e } from "./index19.js";
|
|
30
|
+
import { usePayableAchInstructions as ve } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
|
|
31
31
|
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
32
|
-
import { PayBillFlow as
|
|
32
|
+
import { PayBillFlow as ye } from "./index25.js";
|
|
33
33
|
import "./index26.js";
|
|
34
|
-
import { useMarkAsPaidFlow as
|
|
34
|
+
import { useMarkAsPaidFlow as be } from "./index16.js";
|
|
35
35
|
import "./index17.js";
|
|
36
|
-
import { BILL_CREATE_MESSAGE_LABELS_EN as
|
|
37
|
-
import { useBillCreateController as
|
|
38
|
-
import { useBillForm as
|
|
39
|
-
import { buildPaymentHistory as
|
|
40
|
-
import { useApprovalPolicyCardView as
|
|
41
|
-
import { useCurrentApprovalRequestId as
|
|
42
|
-
import { usePayableDetailActions as
|
|
43
|
-
import { useScheduledPayment as
|
|
44
|
-
import { isEditablePayableStatus as
|
|
45
|
-
import { useDraftDelete as
|
|
46
|
-
import { buildBillDetailView as
|
|
47
|
-
import { buildBillHistory as
|
|
48
|
-
import { SourceDocumentContainer as
|
|
49
|
-
import { useVendorSectionProps as
|
|
50
|
-
import { usePaymentInstructionsForm as
|
|
36
|
+
import { BILL_CREATE_MESSAGE_LABELS_EN as xe, mergeBillCreateScreenCopy as Se } from "./index43.js";
|
|
37
|
+
import { useBillCreateController as Ce } from "./index52.js";
|
|
38
|
+
import { useBillForm as we } from "./index54.js";
|
|
39
|
+
import { buildPaymentHistory as Te } from "./index3.js";
|
|
40
|
+
import { useApprovalPolicyCardView as Ee } from "./index32.js";
|
|
41
|
+
import { useCurrentApprovalRequestId as De } from "./index33.js";
|
|
42
|
+
import { usePayableDetailActions as Oe } from "./index34.js";
|
|
43
|
+
import { useScheduledPayment as ke } from "./index35.js";
|
|
44
|
+
import { isEditablePayableStatus as Ae } from "./index36.js";
|
|
45
|
+
import { useDraftDelete as je } from "./index37.js";
|
|
46
|
+
import { buildBillDetailView as Me } from "./index39.js";
|
|
47
|
+
import { buildBillHistory as Ne } from "./index40.js";
|
|
48
|
+
import { SourceDocumentContainer as Pe } from "./index44.js";
|
|
49
|
+
import { useVendorSectionProps as Fe } from "./index47.js";
|
|
50
|
+
import { usePaymentInstructionsForm as Ie } from "./index48.js";
|
|
51
51
|
import { billCreateTestIds as r } from "./index55.js";
|
|
52
|
-
import { useCallback as i, useEffect as
|
|
53
|
-
import { Fragment as
|
|
54
|
-
import { Trash2Icon as
|
|
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 Be } from "react/jsx-runtime";
|
|
54
|
+
import { Trash2Icon as Ve } from "lucide-react";
|
|
55
55
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js
|
|
56
|
-
function
|
|
57
|
-
let p = a(() =>
|
|
58
|
-
payable:
|
|
59
|
-
lineItems:
|
|
60
|
-
}),
|
|
61
|
-
|
|
62
|
-
h ||
|
|
63
|
-
}, [h,
|
|
64
|
-
let
|
|
65
|
-
g(!0),
|
|
66
|
-
}, []),
|
|
67
|
-
payableId: d ? void 0 :
|
|
56
|
+
function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f, onCollapse: He, poweredByBankName: Ue }) {
|
|
57
|
+
let p = a(() => Se(f), [f]), [m, We] = o(), [h, g] = o(!1), [Ge, Ke] = o(!1), [qe, _] = o(!1), [Je, Ye] = o(), v = u ?? Je, y = oe(v, { pollWhileOcrProcessing: !0 }), b = ae(v), { initResponse: x } = re(), Xe = !!x, S = e(x?.scopes, [t.AccountingConfigReadOrg]), C = ee({ enabled: S }), w = y.data, Ze = !v || !!w, T = !d && Ze && !!v && w?.status !== "draft", Qe = !d && !!w && !Ae(w?.status), E = d || Qe, D = we({
|
|
58
|
+
payable: w,
|
|
59
|
+
lineItems: b.lineItems
|
|
60
|
+
}), O = w?.counterpart_id;
|
|
61
|
+
Le(() => {
|
|
62
|
+
h || O && (We(O), g(!0));
|
|
63
|
+
}, [h, O]);
|
|
64
|
+
let $e = i((e) => {
|
|
65
|
+
g(!0), We(e);
|
|
66
|
+
}, []), k = Fe({
|
|
67
|
+
payableId: d ? void 0 : v,
|
|
68
68
|
counterpartId: d ? void 0 : m,
|
|
69
|
-
payableCounterpartId:
|
|
70
|
-
onCounterpartChange:
|
|
71
|
-
requiredError:
|
|
72
|
-
payableCounterpartBankAccountId:
|
|
73
|
-
extractedVendor:
|
|
74
|
-
}),
|
|
75
|
-
let { data: e } = await
|
|
69
|
+
payableCounterpartId: O,
|
|
70
|
+
onCounterpartChange: $e,
|
|
71
|
+
requiredError: D.errors?.vendor,
|
|
72
|
+
payableCounterpartBankAccountId: w?.counterpart_bank_account_id ?? void 0,
|
|
73
|
+
extractedVendor: w?.counterpart_raw_data ?? void 0
|
|
74
|
+
}), et = !!(v && h) && !m, A = y.refetch, tt = i(async () => {
|
|
75
|
+
let { data: e } = await A();
|
|
76
76
|
return e?.status ?? void 0;
|
|
77
|
-
}, [
|
|
78
|
-
payableId:
|
|
79
|
-
form:
|
|
80
|
-
labels:
|
|
77
|
+
}, [A]), nt = a(() => T ? { draftSaved: xe.submittedSaved } : void 0, [T]), j = Ce({
|
|
78
|
+
payableId: u,
|
|
79
|
+
form: D,
|
|
80
|
+
labels: nt,
|
|
81
81
|
counterpartId: m,
|
|
82
|
-
clearCounterpart:
|
|
83
|
-
prepareVendorForSave:
|
|
84
|
-
onPayableCreated:
|
|
85
|
-
onSaved:
|
|
86
|
-
onDraftSaved: () =>
|
|
87
|
-
onFinalized: () =>
|
|
88
|
-
readSavedStatus:
|
|
89
|
-
}),
|
|
90
|
-
payableId:
|
|
91
|
-
status:
|
|
92
|
-
}),
|
|
93
|
-
payableId:
|
|
94
|
-
scheduledPaymentDate:
|
|
95
|
-
enabled: d ||
|
|
96
|
-
}),
|
|
97
|
-
counterpartId: d ?
|
|
98
|
-
currency:
|
|
99
|
-
currentBankAccountId: d ?
|
|
100
|
-
enabled:
|
|
101
|
-
}),
|
|
102
|
-
payableId:
|
|
103
|
-
counterpartId: d ?
|
|
104
|
-
currentBankAccountId:
|
|
105
|
-
canReadCounterpartBankAccounts:
|
|
82
|
+
clearCounterpart: et,
|
|
83
|
+
prepareVendorForSave: k.savePaymentInstructions,
|
|
84
|
+
onPayableCreated: Ye,
|
|
85
|
+
onSaved: Ye,
|
|
86
|
+
onDraftSaved: () => l(!1),
|
|
87
|
+
onFinalized: () => l(!1),
|
|
88
|
+
readSavedStatus: T ? tt : void 0
|
|
89
|
+
}), rt = !!(j.isSavingDraft || j.isFinalizing), M = d ? v : void 0, N = De({
|
|
90
|
+
payableId: M,
|
|
91
|
+
status: w?.status
|
|
92
|
+
}), P = Re(null), F = ke({
|
|
93
|
+
payableId: v,
|
|
94
|
+
scheduledPaymentDate: w?.scheduled_payment_date,
|
|
95
|
+
enabled: d || T
|
|
96
|
+
}), it = ce(w), I = ge(x?.scopes), L = ve({
|
|
97
|
+
counterpartId: d ? O : void 0,
|
|
98
|
+
currency: w?.currency,
|
|
99
|
+
currentBankAccountId: d ? w?.counterpart_bank_account_id ?? void 0 : void 0,
|
|
100
|
+
enabled: I && d
|
|
101
|
+
}), R = Ie({
|
|
102
|
+
payableId: M,
|
|
103
|
+
counterpartId: d ? O : void 0,
|
|
104
|
+
currentBankAccountId: w?.counterpart_bank_account_id ?? void 0,
|
|
105
|
+
canReadCounterpartBankAccounts: I,
|
|
106
106
|
saveErrorMessage: p.detail.paymentInstructionsSaveError,
|
|
107
107
|
linkErrorMessage: p.detail.paymentInstructionsLinkError
|
|
108
|
-
}),
|
|
109
|
-
payableId:
|
|
110
|
-
amountDueMinorUnits:
|
|
111
|
-
amountToPayMinorUnits:
|
|
112
|
-
currencyCode:
|
|
113
|
-
dueDate:
|
|
114
|
-
hasScheduledPayment:
|
|
108
|
+
}), at = e(x?.scopes, [t.PayableWriteOrg]), ot = e(x?.scopes, [t.CounterpartWriteOrg]) && at, st = ot && se(w?.status) && !F.hasScheduledPayment && !F.isResolving, z = be({
|
|
109
|
+
payableId: M,
|
|
110
|
+
amountDueMinorUnits: _e(w) ?? 0,
|
|
111
|
+
amountToPayMinorUnits: w?.amount_to_pay ?? void 0,
|
|
112
|
+
currencyCode: w?.currency ?? void 0,
|
|
113
|
+
dueDate: w?.due_date,
|
|
114
|
+
hasScheduledPayment: F.hasScheduledPayment,
|
|
115
115
|
labels: p.markAsPaid
|
|
116
|
-
}),
|
|
117
|
-
payableId:
|
|
118
|
-
approvalPolicyId:
|
|
116
|
+
}), B = Ee({
|
|
117
|
+
payableId: M,
|
|
118
|
+
approvalPolicyId: w?.approval_policy_id,
|
|
119
119
|
enabled: d,
|
|
120
120
|
copy: p.approvalPolicyCopy
|
|
121
|
-
}),
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
121
|
+
}), ct = he({
|
|
122
|
+
status: w?.status,
|
|
123
|
+
scopes: x?.scopes,
|
|
124
|
+
hasWaitingRequest: N.hasWaitingRequest,
|
|
125
|
+
arePendingApproversUnknown: B.isLoading
|
|
126
|
+
}), { actions: V, decisionDialog: lt, isActionPending: ut } = Oe({
|
|
127
|
+
payableId: d || T ? v : void 0,
|
|
128
|
+
status: w?.status,
|
|
129
|
+
currentApprovalRequestId: N.id,
|
|
130
|
+
hasWaitingRequest: N.hasWaitingRequest,
|
|
131
|
+
arePendingApproversUnknown: B.isLoading,
|
|
132
|
+
hasScheduledPayment: F.hasScheduledPayment,
|
|
133
|
+
scheduledPaymentIntentId: F.scheduledPaymentIntentId,
|
|
134
|
+
isScheduledPaymentUnknown: F.isResolving,
|
|
135
|
+
pendingApprovers: B.pendingApprovers,
|
|
132
136
|
labels: p.actions,
|
|
133
|
-
isMarkAsPaidPending:
|
|
134
|
-
onMarkAsPaidSelect:
|
|
135
|
-
onPayBillSelect: () =>
|
|
136
|
-
onActionSucceeded:
|
|
137
|
-
}),
|
|
138
|
-
payableId:
|
|
139
|
-
status:
|
|
137
|
+
isMarkAsPaidPending: z.isPending,
|
|
138
|
+
onMarkAsPaidSelect: z.open,
|
|
139
|
+
onPayBillSelect: () => P.current?.open(),
|
|
140
|
+
onActionSucceeded: T ? () => l(!1) : void 0
|
|
141
|
+
}), H = je({
|
|
142
|
+
payableId: v,
|
|
143
|
+
status: w?.status,
|
|
140
144
|
enabled: !d,
|
|
141
145
|
labels: p.deleteDraft,
|
|
142
|
-
onDeleted: () =>
|
|
143
|
-
}),
|
|
146
|
+
onDeleted: () => l(!1)
|
|
147
|
+
}), U = rt || ut, W = y.isLoading || b.isResolving || C.isResolving || L.isLoading, G = y.isError || b.isError || C.isError, dt = a(() => [...H.menuItems, ...T || d && !W && !G ? V.menu.map((e) => ({
|
|
144
148
|
id: e.id,
|
|
145
149
|
label: e.label,
|
|
146
150
|
onSelect: e.onSelect,
|
|
@@ -148,194 +152,194 @@ function l({ open: l, onOpenChange: u, payableId: Be, readOnly: d = !1, copy: f,
|
|
|
148
152
|
icon: e.icon,
|
|
149
153
|
sectionHeading: e.sectionHeading
|
|
150
154
|
})) : []], [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
155
|
+
V.menu,
|
|
156
|
+
H.menuItems,
|
|
157
|
+
T,
|
|
154
158
|
d,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
]),
|
|
159
|
+
W,
|
|
160
|
+
G
|
|
161
|
+
]), K = a(() => (C.data?.data ?? []).map((e) => ({
|
|
158
162
|
value: e.id,
|
|
159
163
|
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
160
|
-
})), [
|
|
161
|
-
|
|
162
|
-
let
|
|
163
|
-
|
|
164
|
-
|
|
164
|
+
})), [C.data]), q;
|
|
165
|
+
Xe && (S ? C.isError ? q = p.lineItemsGlCodeUnavailable.loadError : !C.isResolving && K.length === 0 && (q = p.lineItemsGlCodeUnavailable.empty) : q = p.lineItemsGlCodeUnavailable.noAccess);
|
|
166
|
+
let ft = !Xe || !!q || C.isResolving, pt = S && !C.isResolving && !C.isError, J = ie(M), mt = e(x?.scopes, [t.UserReadOrg]), ht = te({ enabled: d && mt }), gt = a(() => Ne(J.data?.data ?? [], ht.data?.data ?? [], p.history), [
|
|
167
|
+
J.data,
|
|
168
|
+
ht.data,
|
|
165
169
|
p.history
|
|
166
|
-
]),
|
|
167
|
-
records:
|
|
168
|
-
events:
|
|
169
|
-
currencyCode:
|
|
170
|
+
]), _t = a(() => Te({
|
|
171
|
+
records: F.paymentRecords,
|
|
172
|
+
events: J.data?.data ?? [],
|
|
173
|
+
currencyCode: w?.currency,
|
|
170
174
|
labels: p.detail
|
|
171
175
|
}), [
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
176
|
+
F.paymentRecords,
|
|
177
|
+
J.data,
|
|
178
|
+
w?.currency,
|
|
175
179
|
p.detail
|
|
176
|
-
]),
|
|
177
|
-
payable:
|
|
178
|
-
lineItems:
|
|
179
|
-
glCodeOptions:
|
|
180
|
-
glCodeRosterAvailable:
|
|
181
|
-
history:
|
|
182
|
-
paymentHistory:
|
|
183
|
-
approvalPolicy:
|
|
180
|
+
]), vt = a(() => d && w ? Me({
|
|
181
|
+
payable: w,
|
|
182
|
+
lineItems: b.lineItems,
|
|
183
|
+
glCodeOptions: K,
|
|
184
|
+
glCodeRosterAvailable: pt,
|
|
185
|
+
history: gt,
|
|
186
|
+
paymentHistory: _t,
|
|
187
|
+
approvalPolicy: B.view,
|
|
184
188
|
labels: p.detail,
|
|
185
|
-
hasScheduledPayment:
|
|
186
|
-
payableAchInstructions:
|
|
187
|
-
payableAchInstructionsReadable:
|
|
189
|
+
hasScheduledPayment: F.hasScheduledPayment,
|
|
190
|
+
payableAchInstructions: L.achInstructions,
|
|
191
|
+
payableAchInstructionsReadable: I && !L.isError
|
|
188
192
|
}) : void 0, [
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
193
|
+
F.hasScheduledPayment,
|
|
194
|
+
B.view,
|
|
195
|
+
I,
|
|
192
196
|
p.detail,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
K,
|
|
198
|
+
pt,
|
|
199
|
+
gt,
|
|
200
|
+
b.lineItems,
|
|
201
|
+
w,
|
|
202
|
+
L.achInstructions,
|
|
203
|
+
L.isError,
|
|
204
|
+
_t,
|
|
201
205
|
d
|
|
202
|
-
]),
|
|
203
|
-
let e =
|
|
204
|
-
if (!
|
|
206
|
+
]), Y = w?.source_of_payable_data === "ocr", X = it?.name, yt = d ? X ? p.viewTitle(X) : p.readOnlyTitle : X && (Y || T) ? p.extractedTitle(X) : p.newTitle, bt = d && w?.created_at ? p.addedOn(ne(w.created_at.slice(0, 10))) : void 0, Z = i(() => {
|
|
207
|
+
let e = D.isDirty || k.hasUnsavedVendorChanges || !!j.stagedFile || j.isFileDeletionPending;
|
|
208
|
+
if (!E && e) {
|
|
205
209
|
_(!0);
|
|
206
210
|
return;
|
|
207
211
|
}
|
|
208
|
-
|
|
212
|
+
l(!1);
|
|
209
213
|
}, [
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
]),
|
|
217
|
-
_(!1),
|
|
218
|
-
}, [
|
|
214
|
+
j.isFileDeletionPending,
|
|
215
|
+
j.stagedFile,
|
|
216
|
+
D.isDirty,
|
|
217
|
+
E,
|
|
218
|
+
l,
|
|
219
|
+
k.hasUnsavedVendorChanges
|
|
220
|
+
]), xt = i(() => {
|
|
221
|
+
_(!1), l(!1);
|
|
222
|
+
}, [l]), Q = b.isResolving || k.mode === "creating", St = i(async () => {
|
|
219
223
|
if (Q) return;
|
|
220
|
-
let e = await
|
|
221
|
-
_(!1), e &&
|
|
224
|
+
let e = await j.saveDraft();
|
|
225
|
+
_(!1), e && l(!1);
|
|
222
226
|
}, [
|
|
223
|
-
|
|
227
|
+
j,
|
|
224
228
|
Q,
|
|
225
|
-
|
|
229
|
+
l
|
|
226
230
|
]), $ = me({
|
|
227
|
-
payable:
|
|
228
|
-
onRemoved: () =>
|
|
229
|
-
canManage:
|
|
230
|
-
}),
|
|
231
|
-
if (!(
|
|
231
|
+
payable: w,
|
|
232
|
+
onRemoved: () => l(!1),
|
|
233
|
+
canManage: at
|
|
234
|
+
}), Ct = i((e) => {
|
|
235
|
+
if (!(U || $.isBusy)) return e ? l(!0) : Z();
|
|
232
236
|
}, [
|
|
233
237
|
$.isBusy,
|
|
234
|
-
|
|
238
|
+
U,
|
|
235
239
|
Z,
|
|
236
|
-
|
|
237
|
-
]),
|
|
240
|
+
l
|
|
241
|
+
]), wt = $.isPossibleDuplicate, Tt = !d && Y && !Ge, Et = wt || Tt ? /* @__PURE__ */ Be(ze, { children: [wt ? /* @__PURE__ */ s(ue, {
|
|
238
242
|
onNotADuplicate: $.onNotADuplicate,
|
|
239
243
|
onRemoveBill: $.onRemoveBill,
|
|
240
244
|
isActionDisabled: $.isBusy,
|
|
241
245
|
labels: $.removeBillLabel ? { removeBillButton: $.removeBillLabel } : void 0,
|
|
242
246
|
testId: r.duplicateNotice
|
|
243
|
-
}) : null,
|
|
244
|
-
return /* @__PURE__ */
|
|
247
|
+
}) : null, Tt ? /* @__PURE__ */ s(de, { onDismiss: () => Ke(!0) }) : null] }) : void 0;
|
|
248
|
+
return /* @__PURE__ */ Be(ze, { children: [
|
|
245
249
|
/* @__PURE__ */ s(le, {
|
|
246
|
-
open:
|
|
247
|
-
onOpenChange:
|
|
248
|
-
title:
|
|
249
|
-
subtitle:
|
|
250
|
-
notice:
|
|
250
|
+
open: c,
|
|
251
|
+
onOpenChange: Ct,
|
|
252
|
+
title: yt,
|
|
253
|
+
subtitle: bt,
|
|
254
|
+
notice: Et,
|
|
251
255
|
vendor: {
|
|
252
|
-
...
|
|
256
|
+
...k,
|
|
253
257
|
testId: r.vendorSection
|
|
254
258
|
},
|
|
255
|
-
values:
|
|
256
|
-
errors:
|
|
257
|
-
onChange:
|
|
259
|
+
values: D.values,
|
|
260
|
+
errors: D.errors,
|
|
261
|
+
onChange: D.onChange,
|
|
258
262
|
lineItems: {
|
|
259
|
-
items:
|
|
260
|
-
glCodeOptions:
|
|
261
|
-
glCodeDisabled:
|
|
262
|
-
glCodeUnavailableMessage:
|
|
263
|
-
discount:
|
|
264
|
-
onDiscountChange:
|
|
265
|
-
tax:
|
|
266
|
-
onTaxChange:
|
|
267
|
-
total:
|
|
268
|
-
onTotalChange:
|
|
269
|
-
onAddLineItem:
|
|
270
|
-
errors:
|
|
271
|
-
totalsErrors:
|
|
263
|
+
items: D.lineItemRows,
|
|
264
|
+
glCodeOptions: K,
|
|
265
|
+
glCodeDisabled: ft,
|
|
266
|
+
glCodeUnavailableMessage: q,
|
|
267
|
+
discount: D.discount,
|
|
268
|
+
onDiscountChange: D.onDiscountChange,
|
|
269
|
+
tax: D.tax,
|
|
270
|
+
onTaxChange: D.onTaxChange,
|
|
271
|
+
total: D.total,
|
|
272
|
+
onTotalChange: D.onTotalChange,
|
|
273
|
+
onAddLineItem: D.onAddLineItem,
|
|
274
|
+
errors: D.lineItemErrors,
|
|
275
|
+
totalsErrors: D.totalsErrors,
|
|
272
276
|
testId: r.lineItems
|
|
273
277
|
},
|
|
274
|
-
documentPanel: /* @__PURE__ */ s(
|
|
275
|
-
payableId:
|
|
276
|
-
readOnly:
|
|
277
|
-
isDocumentPending: !!
|
|
278
|
-
file:
|
|
279
|
-
id:
|
|
280
|
-
name:
|
|
281
|
-
url:
|
|
282
|
-
mimetype:
|
|
278
|
+
documentPanel: /* @__PURE__ */ s(Pe, {
|
|
279
|
+
payableId: v,
|
|
280
|
+
readOnly: E,
|
|
281
|
+
isDocumentPending: !!v && !w?.file && (y.isLoading || w?.ocr_status === "processing"),
|
|
282
|
+
file: w?.file ? {
|
|
283
|
+
id: w.file.id,
|
|
284
|
+
name: w.file.name,
|
|
285
|
+
url: w.file.url,
|
|
286
|
+
mimetype: w.file.mimetype
|
|
283
287
|
} : void 0,
|
|
284
288
|
staging: {
|
|
285
|
-
stagedFile:
|
|
286
|
-
onFileStaged:
|
|
287
|
-
onClearStagedFile:
|
|
288
|
-
isSaving:
|
|
289
|
+
stagedFile: j.stagedFile,
|
|
290
|
+
onFileStaged: j.stageFile,
|
|
291
|
+
onClearStagedFile: j.clearStagedFile,
|
|
292
|
+
isSaving: rt
|
|
289
293
|
},
|
|
290
294
|
deletion: {
|
|
291
|
-
isPending:
|
|
292
|
-
onRequest:
|
|
293
|
-
onDetachNow:
|
|
294
|
-
isDeleting:
|
|
295
|
-
hasFailed:
|
|
295
|
+
isPending: j.isFileDeletionPending,
|
|
296
|
+
onRequest: j.requestFileDeletion,
|
|
297
|
+
onDetachNow: j.detachFileNow,
|
|
298
|
+
isDeleting: j.isDeletingFile,
|
|
299
|
+
hasFailed: j.hasFileDeletionFailed
|
|
296
300
|
}
|
|
297
301
|
}),
|
|
298
|
-
menuItems:
|
|
299
|
-
readOnly:
|
|
302
|
+
menuItems: dt,
|
|
303
|
+
readOnly: E,
|
|
300
304
|
detail: d ? {
|
|
301
|
-
view:
|
|
302
|
-
actions:
|
|
303
|
-
scheduledSummary:
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
305
|
+
view: vt,
|
|
306
|
+
actions: V,
|
|
307
|
+
scheduledSummary: F.hasScheduledPayment && F.scheduledDateLabel ? p.scheduledSummary(F.scheduledDateLabel) : void 0,
|
|
308
|
+
showApprovalOverrideNotice: ct,
|
|
309
|
+
onEditPaymentInstructions: O && st ? R.open : void 0,
|
|
310
|
+
paymentInstructionsForm: O && st ? {
|
|
311
|
+
isOpen: R.isOpen,
|
|
312
|
+
values: R.values,
|
|
313
|
+
errors: R.errors,
|
|
314
|
+
isSaving: R.isSaving,
|
|
315
|
+
onOpen: R.open,
|
|
316
|
+
onCancel: R.close,
|
|
317
|
+
onChange: R.onChange,
|
|
318
|
+
onSave: R.save
|
|
314
319
|
} : void 0,
|
|
315
|
-
isLoading:
|
|
316
|
-
isError:
|
|
317
|
-
paymentHistoryError:
|
|
318
|
-
paymentHistoryLoading:
|
|
320
|
+
isLoading: W,
|
|
321
|
+
isError: G,
|
|
322
|
+
paymentHistoryError: F.isError || J.isError,
|
|
323
|
+
paymentHistoryLoading: F.isResolving || J.isLoading
|
|
319
324
|
} : void 0,
|
|
320
|
-
isLineItemsLoading:
|
|
321
|
-
isSaving:
|
|
322
|
-
isSavingDraft:
|
|
323
|
-
|
|
325
|
+
isLineItemsLoading: b.isResolving,
|
|
326
|
+
isSaving: U,
|
|
327
|
+
isSavingDraft: j.isSavingDraft,
|
|
328
|
+
isSubmitting: j.isFinalizing,
|
|
324
329
|
onCancel: Z,
|
|
325
|
-
onCollapse: d ?
|
|
326
|
-
onSaveDraft:
|
|
327
|
-
onFinalize:
|
|
328
|
-
scrollToErrorToken:
|
|
329
|
-
|
|
330
|
-
labels: Qe,
|
|
330
|
+
onCollapse: d ? He : void 0,
|
|
331
|
+
onSaveDraft: j.saveDraft,
|
|
332
|
+
onFinalize: j.finalize,
|
|
333
|
+
scrollToErrorToken: j.scrollToErrorToken,
|
|
334
|
+
showSubmit: !E && Ze,
|
|
331
335
|
testId: r.dialog
|
|
332
336
|
}),
|
|
333
337
|
/* @__PURE__ */ s(pe, {
|
|
334
|
-
open:
|
|
335
|
-
onSaveDraft:
|
|
336
|
-
onDiscard:
|
|
338
|
+
open: qe,
|
|
339
|
+
onSaveDraft: St,
|
|
340
|
+
onDiscard: xt,
|
|
337
341
|
onCancel: () => _(!1),
|
|
338
|
-
isSaving:
|
|
342
|
+
isSaving: j.isSavingDraft,
|
|
339
343
|
isSaveDraftDisabled: Q,
|
|
340
344
|
labels: p.unsavedChanges,
|
|
341
345
|
testId: r.unsavedDialog,
|
|
@@ -344,14 +348,14 @@ function l({ open: l, onOpenChange: u, payableId: Be, readOnly: d = !1, copy: f,
|
|
|
344
348
|
closeTestId: r.unsavedClose
|
|
345
349
|
}),
|
|
346
350
|
/* @__PURE__ */ s(n, {
|
|
347
|
-
...
|
|
351
|
+
...lt,
|
|
348
352
|
labels: { cancelButton: p.actions.decisionDialog.cancelButton },
|
|
349
353
|
testId: r.decisionDialog,
|
|
350
354
|
confirmTestId: r.decisionConfirm,
|
|
351
355
|
reasonTestId: r.decisionReason
|
|
352
356
|
}),
|
|
353
357
|
/* @__PURE__ */ s(n, {
|
|
354
|
-
...
|
|
358
|
+
...H.dialog,
|
|
355
359
|
labels: { cancelButton: p.actions.decisionDialog.cancelButton },
|
|
356
360
|
testId: r.deleteDraftDialog,
|
|
357
361
|
confirmTestId: r.deleteDraftConfirm
|
|
@@ -362,20 +366,20 @@ function l({ open: l, onOpenChange: u, payableId: Be, readOnly: d = !1, copy: f,
|
|
|
362
366
|
onConfirm: $.removeConfirmation.onConfirm,
|
|
363
367
|
onCancel: $.removeConfirmation.onCancel,
|
|
364
368
|
isPending: $.removeConfirmation.isPending,
|
|
365
|
-
confirmIcon: /* @__PURE__ */ s(
|
|
369
|
+
confirmIcon: /* @__PURE__ */ s(Ve, {}),
|
|
366
370
|
labels: { cancelButton: $.removeConfirmation.cancelButtonLabel },
|
|
367
371
|
testId: r.duplicateRemoveDialog,
|
|
368
372
|
confirmTestId: r.duplicateRemoveConfirm
|
|
369
373
|
}),
|
|
370
|
-
/* @__PURE__ */ s(fe, { ...
|
|
371
|
-
d &&
|
|
372
|
-
ref:
|
|
373
|
-
payable:
|
|
374
|
-
onMissingAchInstructions:
|
|
375
|
-
poweredByBankName:
|
|
374
|
+
/* @__PURE__ */ s(fe, { ...z.dialogProps }),
|
|
375
|
+
d && w ? /* @__PURE__ */ s(ye, {
|
|
376
|
+
ref: P,
|
|
377
|
+
payable: w,
|
|
378
|
+
onMissingAchInstructions: ot ? R.open : void 0,
|
|
379
|
+
poweredByBankName: Ue,
|
|
376
380
|
labels: p.payBill
|
|
377
381
|
}) : null
|
|
378
382
|
] });
|
|
379
383
|
}
|
|
380
384
|
//#endregion
|
|
381
|
-
export {
|
|
385
|
+
export { c as BillCreateDialog, c as default };
|