@tesouro/embedded-components-react 0.4.19 → 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/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/index47.js +73 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +265 -259
- 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/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/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,127 @@ 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 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 l({ open: l, onOpenChange: u, payableId:
|
|
57
|
-
let
|
|
58
|
-
payable:
|
|
59
|
-
lineItems:
|
|
60
|
-
}),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}, [
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
}, []),
|
|
67
|
-
payableId: d ? void 0 :
|
|
68
|
-
counterpartId: d ? void 0 :
|
|
69
|
-
payableCounterpartId:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
+
Le(() => {
|
|
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:
|
|
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,
|
|
86
87
|
onDraftSaved: () => u(!1),
|
|
87
88
|
onFinalized: () => u(!1),
|
|
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:
|
|
106
|
-
saveErrorMessage:
|
|
107
|
-
linkErrorMessage:
|
|
108
|
-
}),
|
|
109
|
-
payableId:
|
|
110
|
-
amountDueMinorUnits:
|
|
111
|
-
amountToPayMinorUnits:
|
|
112
|
-
currencyCode:
|
|
113
|
-
dueDate:
|
|
114
|
-
hasScheduledPayment:
|
|
115
|
-
labels:
|
|
116
|
-
}),
|
|
117
|
-
payableId:
|
|
118
|
-
approvalPolicyId:
|
|
89
|
+
readSavedStatus: w ? nt : void 0
|
|
90
|
+
}), j = !!(A.isSavingDraft || A.isFinalizing), M = d ? g : void 0, N = De({
|
|
91
|
+
payableId: M,
|
|
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({
|
|
103
|
+
payableId: M,
|
|
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({
|
|
110
|
+
payableId: M,
|
|
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
|
|
117
|
+
}), B = Ee({
|
|
118
|
+
payableId: M,
|
|
119
|
+
approvalPolicyId: S?.approval_policy_id,
|
|
119
120
|
enabled: d,
|
|
120
|
-
copy:
|
|
121
|
-
}),
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
121
|
+
copy: f.approvalPolicyCopy
|
|
122
|
+
}), ct = he({
|
|
123
|
+
status: S?.status,
|
|
124
|
+
scopes: y?.scopes,
|
|
125
|
+
hasWaitingRequest: N.hasWaitingRequest,
|
|
126
|
+
arePendingApproversUnknown: B.isLoading
|
|
127
|
+
}), { actions: V, decisionDialog: lt, isActionPending: ut } = Oe({
|
|
128
|
+
payableId: d || w ? g : void 0,
|
|
129
|
+
status: S?.status,
|
|
130
|
+
currentApprovalRequestId: N.id,
|
|
131
|
+
hasWaitingRequest: N.hasWaitingRequest,
|
|
132
|
+
arePendingApproversUnknown: B.isLoading,
|
|
133
|
+
hasScheduledPayment: P.hasScheduledPayment,
|
|
134
|
+
scheduledPaymentIntentId: P.scheduledPaymentIntentId,
|
|
135
|
+
isScheduledPaymentUnknown: P.isResolving,
|
|
136
|
+
pendingApprovers: B.pendingApprovers,
|
|
137
|
+
labels: f.actions,
|
|
138
|
+
isMarkAsPaidPending: z.isPending,
|
|
139
|
+
onMarkAsPaidSelect: z.open,
|
|
140
|
+
onPayBillSelect: () => it.current?.open(),
|
|
141
|
+
onActionSucceeded: w ? () => u(!1) : void 0
|
|
142
|
+
}), H = je({
|
|
143
|
+
payableId: g,
|
|
144
|
+
status: S?.status,
|
|
140
145
|
enabled: !d,
|
|
141
|
-
labels:
|
|
146
|
+
labels: f.deleteDraft,
|
|
142
147
|
onDeleted: () => u(!1)
|
|
143
|
-
}),
|
|
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) => ({
|
|
144
149
|
id: e.id,
|
|
145
150
|
label: e.label,
|
|
146
151
|
onSelect: e.onSelect,
|
|
@@ -148,211 +153,212 @@ function l({ open: l, onOpenChange: u, payableId: Be, readOnly: d = !1, copy: f,
|
|
|
148
153
|
icon: e.icon,
|
|
149
154
|
sectionHeading: e.sectionHeading
|
|
150
155
|
})) : []], [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
156
|
+
V.menu,
|
|
157
|
+
H.menuItems,
|
|
158
|
+
w,
|
|
154
159
|
d,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
]),
|
|
160
|
+
W,
|
|
161
|
+
G
|
|
162
|
+
]), K = a(() => (x.data?.data ?? []).map((e) => ({
|
|
158
163
|
value: e.id,
|
|
159
164
|
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
160
|
-
})), [
|
|
161
|
-
|
|
162
|
-
let
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
]),
|
|
167
|
-
records:
|
|
168
|
-
events:
|
|
169
|
-
currencyCode:
|
|
170
|
-
labels:
|
|
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), [
|
|
168
|
+
J.data,
|
|
169
|
+
ht.data,
|
|
170
|
+
f.history
|
|
171
|
+
]), _t = a(() => Te({
|
|
172
|
+
records: P.paymentRecords,
|
|
173
|
+
events: J.data?.data ?? [],
|
|
174
|
+
currencyCode: S?.currency,
|
|
175
|
+
labels: f.detail
|
|
171
176
|
}), [
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
]),
|
|
177
|
-
payable:
|
|
178
|
-
lineItems:
|
|
179
|
-
glCodeOptions:
|
|
180
|
-
glCodeRosterAvailable:
|
|
181
|
-
history:
|
|
182
|
-
paymentHistory:
|
|
183
|
-
approvalPolicy:
|
|
184
|
-
labels:
|
|
185
|
-
hasScheduledPayment:
|
|
186
|
-
payableAchInstructions:
|
|
187
|
-
payableAchInstructionsReadable:
|
|
177
|
+
P.paymentRecords,
|
|
178
|
+
J.data,
|
|
179
|
+
S?.currency,
|
|
180
|
+
f.detail
|
|
181
|
+
]), vt = a(() => d && S ? Me({
|
|
182
|
+
payable: S,
|
|
183
|
+
lineItems: v.lineItems,
|
|
184
|
+
glCodeOptions: K,
|
|
185
|
+
glCodeRosterAvailable: pt,
|
|
186
|
+
history: gt,
|
|
187
|
+
paymentHistory: _t,
|
|
188
|
+
approvalPolicy: B.view,
|
|
189
|
+
labels: f.detail,
|
|
190
|
+
hasScheduledPayment: P.hasScheduledPayment,
|
|
191
|
+
payableAchInstructions: I.achInstructions,
|
|
192
|
+
payableAchInstructionsReadable: F && !I.isError
|
|
188
193
|
}) : void 0, [
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
194
|
+
P.hasScheduledPayment,
|
|
195
|
+
B.view,
|
|
196
|
+
F,
|
|
197
|
+
f.detail,
|
|
198
|
+
K,
|
|
199
|
+
pt,
|
|
200
|
+
gt,
|
|
201
|
+
v.lineItems,
|
|
202
|
+
S,
|
|
203
|
+
I.achInstructions,
|
|
204
|
+
I.isError,
|
|
205
|
+
_t,
|
|
201
206
|
d
|
|
202
|
-
]),
|
|
203
|
-
let e =
|
|
204
|
-
if (!
|
|
205
|
-
|
|
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);
|
|
206
211
|
return;
|
|
207
212
|
}
|
|
208
213
|
u(!1);
|
|
209
214
|
}, [
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
215
|
+
A.isFileDeletionPending,
|
|
216
|
+
A.stagedFile,
|
|
217
|
+
E.isDirty,
|
|
218
|
+
T,
|
|
214
219
|
u,
|
|
215
|
-
|
|
216
|
-
]),
|
|
217
|
-
|
|
218
|
-
}, [u]), Q =
|
|
220
|
+
O.hasUnsavedVendorChanges
|
|
221
|
+
]), xt = i(() => {
|
|
222
|
+
h(!1), u(!1);
|
|
223
|
+
}, [u]), Q = v.isResolving || O.mode === "creating", St = i(async () => {
|
|
219
224
|
if (Q) return;
|
|
220
|
-
let e = await
|
|
221
|
-
|
|
225
|
+
let e = await A.saveDraft();
|
|
226
|
+
h(!1), e && u(!1);
|
|
222
227
|
}, [
|
|
223
|
-
|
|
228
|
+
A,
|
|
224
229
|
Q,
|
|
225
230
|
u
|
|
226
231
|
]), $ = me({
|
|
227
|
-
payable:
|
|
232
|
+
payable: S,
|
|
228
233
|
onRemoved: () => u(!1),
|
|
229
|
-
canManage:
|
|
230
|
-
}),
|
|
231
|
-
if (!(
|
|
234
|
+
canManage: ot
|
|
235
|
+
}), Ct = i((e) => {
|
|
236
|
+
if (!(U || $.isBusy)) return e ? u(!0) : Z();
|
|
232
237
|
}, [
|
|
233
238
|
$.isBusy,
|
|
234
|
-
|
|
239
|
+
U,
|
|
235
240
|
Z,
|
|
236
241
|
u
|
|
237
|
-
]),
|
|
242
|
+
]), wt = $.isPossibleDuplicate, Tt = !d && Y && !qe, Et = wt || Tt ? /* @__PURE__ */ c(ze, { children: [wt ? /* @__PURE__ */ s(ue, {
|
|
238
243
|
onNotADuplicate: $.onNotADuplicate,
|
|
239
244
|
onRemoveBill: $.onRemoveBill,
|
|
240
245
|
isActionDisabled: $.isBusy,
|
|
241
246
|
labels: $.removeBillLabel ? { removeBillButton: $.removeBillLabel } : void 0,
|
|
242
247
|
testId: r.duplicateNotice
|
|
243
|
-
}) : null,
|
|
244
|
-
return /* @__PURE__ */ c(
|
|
248
|
+
}) : null, Tt ? /* @__PURE__ */ s(de, { onDismiss: () => Je(!0) }) : null] }) : void 0;
|
|
249
|
+
return /* @__PURE__ */ c(ze, { children: [
|
|
245
250
|
/* @__PURE__ */ s(le, {
|
|
246
251
|
open: l,
|
|
247
|
-
onOpenChange:
|
|
248
|
-
title:
|
|
249
|
-
subtitle:
|
|
250
|
-
notice:
|
|
252
|
+
onOpenChange: Ct,
|
|
253
|
+
title: yt,
|
|
254
|
+
subtitle: bt,
|
|
255
|
+
notice: Et,
|
|
251
256
|
vendor: {
|
|
252
|
-
...
|
|
257
|
+
...O,
|
|
253
258
|
testId: r.vendorSection
|
|
254
259
|
},
|
|
255
|
-
values:
|
|
256
|
-
errors:
|
|
257
|
-
onChange:
|
|
260
|
+
values: E.values,
|
|
261
|
+
errors: E.errors,
|
|
262
|
+
onChange: E.onChange,
|
|
258
263
|
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:
|
|
264
|
+
items: E.lineItemRows,
|
|
265
|
+
glCodeOptions: K,
|
|
266
|
+
glCodeDisabled: ft,
|
|
267
|
+
glCodeUnavailableMessage: q,
|
|
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,
|
|
272
277
|
testId: r.lineItems
|
|
273
278
|
},
|
|
274
|
-
documentPanel: /* @__PURE__ */ s(
|
|
275
|
-
payableId:
|
|
276
|
-
readOnly:
|
|
277
|
-
isDocumentPending: !!
|
|
278
|
-
file:
|
|
279
|
-
id:
|
|
280
|
-
name:
|
|
281
|
-
url:
|
|
282
|
-
mimetype:
|
|
279
|
+
documentPanel: /* @__PURE__ */ s(Pe, {
|
|
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
|
|
283
288
|
} : void 0,
|
|
284
289
|
staging: {
|
|
285
|
-
stagedFile:
|
|
286
|
-
onFileStaged:
|
|
287
|
-
onClearStagedFile:
|
|
288
|
-
isSaving:
|
|
290
|
+
stagedFile: A.stagedFile,
|
|
291
|
+
onFileStaged: A.stageFile,
|
|
292
|
+
onClearStagedFile: A.clearStagedFile,
|
|
293
|
+
isSaving: j
|
|
289
294
|
},
|
|
290
295
|
deletion: {
|
|
291
|
-
isPending:
|
|
292
|
-
onRequest:
|
|
293
|
-
onDetachNow:
|
|
294
|
-
isDeleting:
|
|
295
|
-
hasFailed:
|
|
296
|
+
isPending: A.isFileDeletionPending,
|
|
297
|
+
onRequest: A.requestFileDeletion,
|
|
298
|
+
onDetachNow: A.detachFileNow,
|
|
299
|
+
isDeleting: A.isDeletingFile,
|
|
300
|
+
hasFailed: A.hasFileDeletionFailed
|
|
296
301
|
}
|
|
297
302
|
}),
|
|
298
|
-
menuItems:
|
|
299
|
-
readOnly:
|
|
303
|
+
menuItems: dt,
|
|
304
|
+
readOnly: T,
|
|
300
305
|
detail: d ? {
|
|
301
|
-
view:
|
|
302
|
-
actions:
|
|
303
|
-
scheduledSummary:
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
306
|
+
view: vt,
|
|
307
|
+
actions: V,
|
|
308
|
+
scheduledSummary: P.hasScheduledPayment && P.scheduledDateLabel ? f.scheduledSummary(P.scheduledDateLabel) : void 0,
|
|
309
|
+
showApprovalOverrideNotice: ct,
|
|
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
|
|
314
320
|
} : void 0,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
321
|
+
hideMissingPaymentInstructions: S?.status === "paid" || S?.status === "canceled",
|
|
322
|
+
isLoading: W,
|
|
323
|
+
isError: G,
|
|
324
|
+
paymentHistoryError: P.isError || J.isError,
|
|
325
|
+
paymentHistoryLoading: P.isResolving || J.isLoading
|
|
319
326
|
} : void 0,
|
|
320
|
-
isLineItemsLoading:
|
|
321
|
-
isSaving:
|
|
322
|
-
isSavingDraft:
|
|
323
|
-
|
|
327
|
+
isLineItemsLoading: v.isResolving,
|
|
328
|
+
isSaving: U,
|
|
329
|
+
isSavingDraft: A.isSavingDraft,
|
|
330
|
+
isSubmitting: A.isFinalizing,
|
|
324
331
|
onCancel: Z,
|
|
325
|
-
onCollapse: d ?
|
|
326
|
-
onSaveDraft:
|
|
327
|
-
onFinalize:
|
|
328
|
-
scrollToErrorToken:
|
|
329
|
-
|
|
330
|
-
labels: Qe,
|
|
332
|
+
onCollapse: d ? Ue : void 0,
|
|
333
|
+
onSaveDraft: A.saveDraft,
|
|
334
|
+
onFinalize: A.finalize,
|
|
335
|
+
scrollToErrorToken: A.scrollToErrorToken,
|
|
336
|
+
showSubmit: !T && C,
|
|
331
337
|
testId: r.dialog
|
|
332
338
|
}),
|
|
333
339
|
/* @__PURE__ */ s(pe, {
|
|
334
|
-
open:
|
|
335
|
-
onSaveDraft:
|
|
336
|
-
onDiscard:
|
|
337
|
-
onCancel: () =>
|
|
338
|
-
isSaving:
|
|
340
|
+
open: Ye,
|
|
341
|
+
onSaveDraft: St,
|
|
342
|
+
onDiscard: xt,
|
|
343
|
+
onCancel: () => h(!1),
|
|
344
|
+
isSaving: A.isSavingDraft,
|
|
339
345
|
isSaveDraftDisabled: Q,
|
|
340
|
-
labels:
|
|
346
|
+
labels: f.unsavedChanges,
|
|
341
347
|
testId: r.unsavedDialog,
|
|
342
348
|
saveDraftTestId: r.unsavedSaveDraft,
|
|
343
349
|
discardTestId: r.unsavedDiscard,
|
|
344
350
|
closeTestId: r.unsavedClose
|
|
345
351
|
}),
|
|
346
352
|
/* @__PURE__ */ s(n, {
|
|
347
|
-
...
|
|
348
|
-
labels: { cancelButton:
|
|
353
|
+
...lt,
|
|
354
|
+
labels: { cancelButton: f.actions.decisionDialog.cancelButton },
|
|
349
355
|
testId: r.decisionDialog,
|
|
350
356
|
confirmTestId: r.decisionConfirm,
|
|
351
357
|
reasonTestId: r.decisionReason
|
|
352
358
|
}),
|
|
353
359
|
/* @__PURE__ */ s(n, {
|
|
354
|
-
...
|
|
355
|
-
labels: { cancelButton:
|
|
360
|
+
...H.dialog,
|
|
361
|
+
labels: { cancelButton: f.actions.decisionDialog.cancelButton },
|
|
356
362
|
testId: r.deleteDraftDialog,
|
|
357
363
|
confirmTestId: r.deleteDraftConfirm
|
|
358
364
|
}),
|
|
@@ -362,18 +368,18 @@ function l({ open: l, onOpenChange: u, payableId: Be, readOnly: d = !1, copy: f,
|
|
|
362
368
|
onConfirm: $.removeConfirmation.onConfirm,
|
|
363
369
|
onCancel: $.removeConfirmation.onCancel,
|
|
364
370
|
isPending: $.removeConfirmation.isPending,
|
|
365
|
-
confirmIcon: /* @__PURE__ */ s(
|
|
371
|
+
confirmIcon: /* @__PURE__ */ s(Be, {}),
|
|
366
372
|
labels: { cancelButton: $.removeConfirmation.cancelButtonLabel },
|
|
367
373
|
testId: r.duplicateRemoveDialog,
|
|
368
374
|
confirmTestId: r.duplicateRemoveConfirm
|
|
369
375
|
}),
|
|
370
|
-
/* @__PURE__ */ s(fe, { ...
|
|
371
|
-
d &&
|
|
372
|
-
ref:
|
|
373
|
-
payable:
|
|
374
|
-
onMissingAchInstructions:
|
|
375
|
-
poweredByBankName:
|
|
376
|
-
labels:
|
|
376
|
+
/* @__PURE__ */ s(fe, { ...z.dialogProps }),
|
|
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
|
|
377
383
|
}) : null
|
|
378
384
|
] });
|
|
379
385
|
}
|