@tesouro/embedded-components-react 0.11.234 → 0.11.236
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/README.md +53 -2
- package/dist/index.css +30 -0
- package/dist/index.d.ts +24 -0
- package/dist/lib/ReceivablesWidget.d.ts +24 -0
- package/dist/lib/WidgetSuite.d.ts +24 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +198 -118
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +76 -194
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +67 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +111 -69
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +459 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +101 -449
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +9 -117
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +85 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +67 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +246 -71
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +40 -251
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +237 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +21 -244
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +529 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +4 -530
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +44 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +242 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +3 -245
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +5 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index50.js +63 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index51.js +1 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +386 -354
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +1 -1
- 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/useReceivableForm.js +260 -258
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +219 -179
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +26 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +15 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +31 -40
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +40 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +30 -63
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +463 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +15 -29
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +19 -30
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +15 -66
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +66 -391
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +148 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +173 -43
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +3 -71
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +37 -432
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +66 -188
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +455 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +191 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +23 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +5 -265
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +261 -125
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +2 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +122 -230
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +27 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +216 -224
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +3 -30
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +228 -168
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +29 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +152 -109
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +22 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +140 -43
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index65.js +47 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/document-preview.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/document/documentPreview.js +122 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/WidgetFrame/WidgetFrame.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +4584 -4551
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index52.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +0 -2
|
@@ -1,530 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { formatCalendarDate as e } from "../../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
6
|
-
import "../../../../shared/util/dist/index.js";
|
|
7
|
-
import { hasAnyScope as t } from "../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
8
|
-
import { Scope as n } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
9
|
-
import { useAllLedgerAccountsQuery as ee } from "../../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
|
|
10
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
11
|
-
import { useWidgetConfig as te } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
12
|
-
import { useOrganizationUserNames as ne } from "../../../../shared/feature/dist/lib/user/useOrganizationUserNames.js";
|
|
13
|
-
import { useLocalCalendarDay as re } from "../../../../shared/feature/dist/lib/calendar/useLocalCalendarDay.js";
|
|
14
|
-
import "../../../../shared/feature/dist/index.js";
|
|
15
|
-
import { isEditablePayableStatus as ie } from "../../../util/dist/lib/isEditablePayableStatus.js";
|
|
16
|
-
import { resolveVendor as ae } from "../../../util/dist/lib/resolveVendor.js";
|
|
17
|
-
import "../../../util/dist/index.js";
|
|
18
|
-
import { BillDecisionDialog as r } from "../../../ui/dist/index4.js";
|
|
19
|
-
import "../../../ui/dist/index.js";
|
|
20
|
-
import { hasUnpaidBalance as oe } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
|
|
21
|
-
import { usePayableAchInstructions as se } from "../../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
|
|
22
|
-
import "../../../../shared/counterpart-management/feature/dist/index.js";
|
|
23
|
-
import { formatGlCodeLabel as ce, resolveGlCodeAvailability as le } from "./index16.js";
|
|
24
|
-
import { BillDialogScreen as ue } from "../../ui/dist/index31.js";
|
|
25
|
-
import { BillDuplicateNotice as de } from "../../ui/dist/index37.js";
|
|
26
|
-
import { BillRejectedBanner as fe } from "../../ui/dist/index40.js";
|
|
27
|
-
import { DiscardChangesDialog as pe } from "../../ui/dist/index43.js";
|
|
28
|
-
import { ExtractionNotice as me } from "../../ui/dist/index46.js";
|
|
29
|
-
import { UnsavedBillDialog as he } from "../../ui/dist/index52.js";
|
|
30
|
-
import "../../ui/dist/index.js";
|
|
31
|
-
import { BILL_CREATE_MESSAGE_LABELS_EN as ge, mergeBillDialogCopy as _e } from "./index32.js";
|
|
32
|
-
import { useAllPayableLineItemsQuery as ve } from "../../data-access/dist/index6.js";
|
|
33
|
-
import { usePayableQuery as ye } from "../../data-access/dist/index24.js";
|
|
34
|
-
import "../../data-access/dist/index.js";
|
|
35
|
-
import { useBillCreateController as be } from "./index41.js";
|
|
36
|
-
import { useBillForm as xe } from "./index43.js";
|
|
37
|
-
import { buildPaymentHistory as Se } from "./index2.js";
|
|
38
|
-
import { usePayableDuplicateReview as Ce } from "./index4.js";
|
|
39
|
-
import { canOverrideApprovalPolicy as we, canReadCounterpartBankAccounts as Te } from "./index5.js";
|
|
40
|
-
import { useApprovalPolicyCardView as Ee } from "./index15.js";
|
|
41
|
-
import { resolveApprovalNotices as De } from "./index17.js";
|
|
42
|
-
import { resolvePaymentInstructionsGestures as Oe } from "./index18.js";
|
|
43
|
-
import { useBillRejectionNotice as ke } from "./index20.js";
|
|
44
|
-
import { useCurrentApprovalRequestId as Ae } from "./index21.js";
|
|
45
|
-
import { usePayableAuditHistory as je } from "./index22.js";
|
|
46
|
-
import { usePayableDetailActions as Me } from "./index23.js";
|
|
47
|
-
import { useScheduledDateLabel as Ne } from "./index24.js";
|
|
48
|
-
import { useScheduledPayment as Pe } from "./index25.js";
|
|
49
|
-
import { useDraftDelete as Fe } from "./index26.js";
|
|
50
|
-
import { buildBillDetailView as Ie } from "./index28.js";
|
|
51
|
-
import { resolveEditorDismissal as Le } from "./index29.js";
|
|
52
|
-
import { SourceDocumentContainer as Re } from "./index33.js";
|
|
53
|
-
import { useVendorSectionProps as ze } from "./index36.js";
|
|
54
|
-
import { usePayToSave as Be } from "./index37.js";
|
|
55
|
-
import { billDialogTestIds as i } from "./index44.js";
|
|
56
|
-
import { useCallback as a, useEffect as Ve, useMemo as o, useRef as He, useState as s } from "react";
|
|
57
|
-
import { Fragment as Ue, jsx as c, jsxs as We } from "react/jsx-runtime";
|
|
58
|
-
import { Trash2Icon as Ge } from "lucide-react";
|
|
59
|
-
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js
|
|
60
|
-
function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je, readOnly: u = !1, copy: d, onCollapse: Ye, onEdit: Xe, onOpenBill: f, renderPaymentFlows: Ze }) {
|
|
61
|
-
let p = o(() => _e(d), [d]), m = d?.messages, h = o(() => ({
|
|
62
|
-
...ge,
|
|
63
|
-
...m
|
|
64
|
-
}), [m]), Qe = qe ? void 0 : Je, [g, $e] = s(Qe), [_, et] = s(!!Qe), [tt, nt] = s(!1), [v, y] = s(!1), [rt, b] = s(), x = a((e) => {
|
|
65
|
-
b(() => e);
|
|
66
|
-
}, []), [it, at] = s(), S = qe ?? it, C = ye(S, {
|
|
67
|
-
pollWhileOcrProcessing: !0,
|
|
68
|
-
pollWhilePolicyAssignmentUnsettled: !0
|
|
69
|
-
}), w = ve(S), { initResponse: T } = te(), ot = !!T, st = t(T?.scopes, [n.AccountingConfigReadOrg]), E = ee({ enabled: st }), D = C.data, O = !S || !!D, k = !u && O && !!S && D?.status !== "draft", ct = !u && !!D && !ie(D?.status), A = u || ct, j = xe({
|
|
70
|
-
payable: D,
|
|
71
|
-
lineItems: w.lineItems,
|
|
72
|
-
labels: h
|
|
73
|
-
}), M = D?.counterpart_id ?? void 0;
|
|
74
|
-
Ve(() => {
|
|
75
|
-
_ || M && ($e(M), et(!0));
|
|
76
|
-
}, [_, M]);
|
|
77
|
-
let lt = a((e) => {
|
|
78
|
-
et(!0), $e(e);
|
|
79
|
-
}, []), N = Pe({
|
|
80
|
-
payableId: S,
|
|
81
|
-
scheduledPaymentDate: D?.scheduled_payment_date,
|
|
82
|
-
enabled: u || k
|
|
83
|
-
}), P = Ne({
|
|
84
|
-
hasScheduledPayment: N.hasScheduledPayment,
|
|
85
|
-
scheduledDate: N.scheduledDate,
|
|
86
|
-
labels: p.scheduledRelativeDay
|
|
87
|
-
}), F = Te(T?.scopes), ut = t(T?.scopes, [n.PayableWriteOrg]), I = t(T?.scopes, [n.CounterpartWriteOrg]) && ut, L = I && oe(D?.status) && !N.hasScheduledPayment && !N.isResolving, dt = L && F, ft = L || I && D?.status === "rejected", pt = !u && O && (!S || D?.status === "draft") && !N.hasScheduledPayment && !N.isResolving, R = ze({
|
|
88
|
-
payableId: S,
|
|
89
|
-
counterpartId: u ? M : g,
|
|
90
|
-
payableCounterpartId: M,
|
|
91
|
-
isVendorKnown: u ? !!D : O,
|
|
92
|
-
onCounterpartChange: lt,
|
|
93
|
-
requiredError: j.errors?.vendor,
|
|
94
|
-
payableCounterpartBankAccountId: D?.counterpart_bank_account_id ?? void 0,
|
|
95
|
-
extractedVendor: D?.counterpart_raw_data ?? void 0,
|
|
96
|
-
readOnly: u,
|
|
97
|
-
canEditVendor: !u || dt,
|
|
98
|
-
canEditPaymentInstructions: !u || L,
|
|
99
|
-
canAddPaymentInstructions: !u || ft,
|
|
100
|
-
confirmDiscard: x,
|
|
101
|
-
labels: d?.vendorSection
|
|
102
|
-
}), mt = R.activePayToOperation === "missingInstructions" ? pt || ft : R.activePayToOperation === "existingInstructions" ? pt || L : R.activePayToOperation === "vendor" && u ? dt : !1, ht = !!(S && _) && !g, z = C.refetch, gt = a(async () => {
|
|
103
|
-
let { data: e } = await z();
|
|
104
|
-
return e?.status ?? void 0;
|
|
105
|
-
}, [z]), { vendorWithInlineSave: B, isSavingPayToEdits: _t } = Be({
|
|
106
|
-
vendor: R,
|
|
107
|
-
payableId: S,
|
|
108
|
-
linkedCounterpartId: D?.counterpart_id,
|
|
109
|
-
linkedBankAccountId: D?.counterpart_bank_account_id,
|
|
110
|
-
canSavePayToEdits: mt,
|
|
111
|
-
readOnly: u,
|
|
112
|
-
refreshPayable: z,
|
|
113
|
-
labels: p.detail
|
|
114
|
-
}), vt = o(() => k ? {
|
|
115
|
-
...m,
|
|
116
|
-
draftSaved: h.submittedSaved
|
|
117
|
-
} : m, [
|
|
118
|
-
k,
|
|
119
|
-
m,
|
|
120
|
-
h.submittedSaved
|
|
121
|
-
]), V = be({
|
|
122
|
-
payableId: qe,
|
|
123
|
-
form: j,
|
|
124
|
-
labels: vt,
|
|
125
|
-
counterpartId: g,
|
|
126
|
-
isVendorPending: R.mode === "creating" || R.isPendingVendor,
|
|
127
|
-
onVendorIncomplete: R.revealIncompleteVendor,
|
|
128
|
-
clearCounterpart: ht,
|
|
129
|
-
prepareVendorForSave: R.prepareVendorForSave,
|
|
130
|
-
onPayableCreated: at,
|
|
131
|
-
onSaved: at,
|
|
132
|
-
onDraftSaved: () => l(!1),
|
|
133
|
-
onFinalized: () => l(!1),
|
|
134
|
-
readSavedStatus: k ? gt : void 0
|
|
135
|
-
}), yt = !!(V.isSavingDraft || V.isFinalizing || R.isVendorSavePending), H = u ? S : void 0, U = Ae({
|
|
136
|
-
payableId: H,
|
|
137
|
-
status: D?.status
|
|
138
|
-
}), W = He(null), [bt, xt] = s(!1), St = ae(D), G = se({
|
|
139
|
-
counterpartId: u ? M : void 0,
|
|
140
|
-
currency: D?.currency,
|
|
141
|
-
currentBankAccountId: u ? D?.counterpart_bank_account_id ?? void 0 : void 0,
|
|
142
|
-
enabled: F && u
|
|
143
|
-
}), K = Ee({
|
|
144
|
-
payableId: H,
|
|
145
|
-
approvalPolicyId: D?.approval_policy_id,
|
|
146
|
-
status: D?.status,
|
|
147
|
-
updatedAt: D?.updated_at,
|
|
148
|
-
payableFetchedAt: C.dataUpdatedAt,
|
|
149
|
-
enabled: u,
|
|
150
|
-
copy: p.approvalPolicyCopy
|
|
151
|
-
}), Ct = we({
|
|
152
|
-
status: D?.status,
|
|
153
|
-
scopes: T?.scopes,
|
|
154
|
-
arePendingApproversUnknown: K.isLoading,
|
|
155
|
-
hasApprovalPolicy: !!D?.approval_policy_id,
|
|
156
|
-
hasWaitingRequest: U.hasWaitingRequest
|
|
157
|
-
}), wt = De({
|
|
158
|
-
isCapabilityUnknown: U.isLoading || K.isLoading,
|
|
159
|
-
canApproveNow: !!U.id,
|
|
160
|
-
canOverridePolicy: Ct,
|
|
161
|
-
status: D?.status,
|
|
162
|
-
hasApprovalPolicy: !!D?.approval_policy_id,
|
|
163
|
-
pendingApproverNames: K.pendingApprovers.flatMap((e) => e.names),
|
|
164
|
-
labels: p
|
|
165
|
-
}), Tt = u || k ? S : void 0, Et = u ? Xe : void 0, q = a((e) => {
|
|
166
|
-
let t = () => {
|
|
167
|
-
R.discardPayToEdits(), e?.();
|
|
168
|
-
};
|
|
169
|
-
R.hasUnsavedVendorChanges ? x(t) : t();
|
|
170
|
-
}, [x, R]), { actions: Dt, decisionDialog: Ot, isActionPending: kt } = Me({
|
|
171
|
-
payableId: Tt,
|
|
172
|
-
status: D?.status,
|
|
173
|
-
currentApprovalRequestId: U.id,
|
|
174
|
-
arePendingApproversUnknown: K.isLoading,
|
|
175
|
-
hasScheduledPayment: N.hasScheduledPayment,
|
|
176
|
-
scheduledPaymentIntentId: N.scheduledPaymentIntentId,
|
|
177
|
-
isScheduledPaymentUnknown: N.isResolving,
|
|
178
|
-
isPayabilityUnknown: G.isLoading,
|
|
179
|
-
hasApprovalPolicy: !!D?.approval_policy_id,
|
|
180
|
-
hasWaitingRequest: U.hasWaitingRequest,
|
|
181
|
-
pendingApprovers: K.pendingApprovers,
|
|
182
|
-
labels: p.actions,
|
|
183
|
-
isMarkAsPaidPending: bt,
|
|
184
|
-
onMarkAsPaidSelect: () => W.current?.openMarkAsPaid(),
|
|
185
|
-
onPayBillSelect: () => q(() => W.current?.openPayBill()),
|
|
186
|
-
onEditSelect: Et,
|
|
187
|
-
onActionSucceeded: (e) => {
|
|
188
|
-
e === "reopen" ? Et?.() : k && l(!1);
|
|
189
|
-
}
|
|
190
|
-
}), At = Fe({
|
|
191
|
-
payableId: S,
|
|
192
|
-
status: D?.status,
|
|
193
|
-
enabled: !u,
|
|
194
|
-
labels: p.deleteDraft,
|
|
195
|
-
onDeleted: () => l(!1)
|
|
196
|
-
}), jt = yt || kt, Mt = D?.ocr_status === "processing", Nt = C.isLoading || w.isResolving || Mt, Pt = C.isLoading || w.isResolving || E.isResolving || G.isLoading, Ft = C.isError || w.isError || E.isError, It = o(() => [...At.menuItems, ...k || u && !Pt && !Ft ? Dt.menu.map((e) => ({
|
|
197
|
-
id: e.id,
|
|
198
|
-
label: e.label,
|
|
199
|
-
onSelect: e.onSelect,
|
|
200
|
-
disabled: e.disabled,
|
|
201
|
-
icon: e.icon,
|
|
202
|
-
sectionHeading: e.sectionHeading
|
|
203
|
-
})) : []], [
|
|
204
|
-
Dt.menu,
|
|
205
|
-
At.menuItems,
|
|
206
|
-
k,
|
|
207
|
-
u,
|
|
208
|
-
Pt,
|
|
209
|
-
Ft
|
|
210
|
-
]), J = o(() => (E.data?.data ?? []).map((e) => ({
|
|
211
|
-
value: e.id,
|
|
212
|
-
label: ce(e)
|
|
213
|
-
})), [E.data]), { unavailableMessage: Lt, disabled: Rt, rosterAvailable: zt } = le({
|
|
214
|
-
isInitResolved: ot,
|
|
215
|
-
canReadGlCodes: st,
|
|
216
|
-
isResolving: E.isResolving,
|
|
217
|
-
isError: E.isError,
|
|
218
|
-
optionCount: J.length,
|
|
219
|
-
labels: p.lineItemsGlCodeUnavailable
|
|
220
|
-
}), Bt = D?.status === "rejected" || !u && k, Vt = t(T?.scopes, [n.ApprovalRequestReadOrg]), Ht = Bt && Vt, Ut = t(T?.scopes, [n.UserReadOrg]), { userNames: Wt, isError: Gt, isResolving: Kt } = ne({ enabled: (u || Bt) && Ut }), { historyQuery: Y, rows: qt, namesError: Jt } = je({
|
|
221
|
-
payableId: H,
|
|
222
|
-
userNames: Wt,
|
|
223
|
-
isRosterError: Ut && Gt,
|
|
224
|
-
labels: p.history
|
|
225
|
-
}), X = ke({
|
|
226
|
-
payableId: S,
|
|
227
|
-
payableStatus: D?.status,
|
|
228
|
-
payableUpdatedAt: D?.updated_at,
|
|
229
|
-
enabled: Ht,
|
|
230
|
-
userNames: Wt,
|
|
231
|
-
labels: p.detail
|
|
232
|
-
}), Yt = o(() => Se({
|
|
233
|
-
records: N.paymentRecords,
|
|
234
|
-
events: Y.data?.data ?? [],
|
|
235
|
-
currencyCode: D?.currency,
|
|
236
|
-
labels: p.detail
|
|
237
|
-
}), [
|
|
238
|
-
N.paymentRecords,
|
|
239
|
-
Y.data,
|
|
240
|
-
D?.currency,
|
|
241
|
-
p.detail
|
|
242
|
-
]), Xt = re(), Zt = o(() => {
|
|
243
|
-
if (!u || !D) return;
|
|
244
|
-
let e = Ie({
|
|
245
|
-
payable: D,
|
|
246
|
-
lineItems: w.lineItems,
|
|
247
|
-
glCodeOptions: J,
|
|
248
|
-
glCodeRosterAvailable: zt,
|
|
249
|
-
history: qt,
|
|
250
|
-
paymentHistory: Yt,
|
|
251
|
-
approvalPolicy: K.view,
|
|
252
|
-
labels: p.detail,
|
|
253
|
-
dueDateLabels: p.dueDate,
|
|
254
|
-
today: Xt,
|
|
255
|
-
hasScheduledPayment: N.hasScheduledPayment,
|
|
256
|
-
rejection: X,
|
|
257
|
-
payableAchInstructions: G.achInstructions,
|
|
258
|
-
payableAchInstructionsReadable: F && !G.isError
|
|
259
|
-
});
|
|
260
|
-
return R.mode === "resolved" && R.summary ? {
|
|
261
|
-
...e,
|
|
262
|
-
payTo: R.summary
|
|
263
|
-
} : e;
|
|
264
|
-
}, [
|
|
265
|
-
N.hasScheduledPayment,
|
|
266
|
-
K.view,
|
|
267
|
-
Xt,
|
|
268
|
-
F,
|
|
269
|
-
p.detail,
|
|
270
|
-
p.dueDate,
|
|
271
|
-
J,
|
|
272
|
-
zt,
|
|
273
|
-
qt,
|
|
274
|
-
w.lineItems,
|
|
275
|
-
D,
|
|
276
|
-
G.achInstructions,
|
|
277
|
-
G.isError,
|
|
278
|
-
Yt,
|
|
279
|
-
u,
|
|
280
|
-
X,
|
|
281
|
-
R.mode,
|
|
282
|
-
R.summary
|
|
283
|
-
]), Qt = D?.source_of_payable_data === "ocr", Z = St?.name, $t = u ? Z ? p.viewTitle(Z) : p.readOnlyTitle : Z && (Qt || k) ? p.extractedTitle(Z) : p.newTitle, en = u && D?.created_at ? p.addedOn(e(D.created_at.slice(0, 10))) : void 0, Q = j.isDirty || R.hasUnsavedVendorChanges || !!V.stagedFile || V.isFileDeletionPending, tn = a(() => {
|
|
284
|
-
if (u && R.isEditingPayTo) q(() => l(!1));
|
|
285
|
-
else switch (Le({
|
|
286
|
-
isUnsavedPromptOpen: v,
|
|
287
|
-
isLocked: A,
|
|
288
|
-
isDirty: Q
|
|
289
|
-
})) {
|
|
290
|
-
case "dismiss-prompt":
|
|
291
|
-
y(!1);
|
|
292
|
-
return;
|
|
293
|
-
case "prompt":
|
|
294
|
-
y(!0);
|
|
295
|
-
return;
|
|
296
|
-
default: l(!1);
|
|
297
|
-
}
|
|
298
|
-
}, [
|
|
299
|
-
Q,
|
|
300
|
-
A,
|
|
301
|
-
v,
|
|
302
|
-
q,
|
|
303
|
-
l,
|
|
304
|
-
u,
|
|
305
|
-
R.isEditingPayTo
|
|
306
|
-
]), nn = a((e, t) => {
|
|
307
|
-
if (!f) return;
|
|
308
|
-
let n = () => f(e, t);
|
|
309
|
-
u && R.isEditingPayTo ? q(n) : !A && Q ? x(n) : n();
|
|
310
|
-
}, [
|
|
311
|
-
x,
|
|
312
|
-
Q,
|
|
313
|
-
A,
|
|
314
|
-
q,
|
|
315
|
-
f,
|
|
316
|
-
u,
|
|
317
|
-
R.isEditingPayTo
|
|
318
|
-
]), rn = a(() => {
|
|
319
|
-
R.isEditingPayTo ? q(Ye) : Ye?.();
|
|
320
|
-
}, [
|
|
321
|
-
q,
|
|
322
|
-
Ye,
|
|
323
|
-
R.isEditingPayTo
|
|
324
|
-
]), an = a(() => {
|
|
325
|
-
y(!1), l(!1);
|
|
326
|
-
}, [l]), on = Nt || R.mode === "creating", sn = a(async () => {
|
|
327
|
-
if (on) return;
|
|
328
|
-
let e = await V.saveDraft();
|
|
329
|
-
y(!1), e && l(!1);
|
|
330
|
-
}, [
|
|
331
|
-
V,
|
|
332
|
-
on,
|
|
333
|
-
l
|
|
334
|
-
]), $ = Ce({
|
|
335
|
-
payable: D,
|
|
336
|
-
onOpenPayable: f ? nn : void 0,
|
|
337
|
-
onRemoved: () => l(!1),
|
|
338
|
-
canManage: ut
|
|
339
|
-
}), cn = a((e) => {
|
|
340
|
-
if (!(jt || $.isBusy)) return e ? l(!0) : tn();
|
|
341
|
-
}, [
|
|
342
|
-
$.isBusy,
|
|
343
|
-
jt,
|
|
344
|
-
tn,
|
|
345
|
-
l
|
|
346
|
-
]), ln = $.isPossibleDuplicate, un = !u && Qt && !tt, dn = !u && !!X, fn = dn || ln || un ? /* @__PURE__ */ We(Ue, { children: [
|
|
347
|
-
dn && X ? /* @__PURE__ */ c(fe, {
|
|
348
|
-
...X,
|
|
349
|
-
labels: p.rejectedBanner
|
|
350
|
-
}) : null,
|
|
351
|
-
ln ? /* @__PURE__ */ c(de, {
|
|
352
|
-
title: $.title,
|
|
353
|
-
meta: $.meta,
|
|
354
|
-
onNotADuplicate: $.onNotADuplicate,
|
|
355
|
-
onRemoveBill: $.onRemoveBill,
|
|
356
|
-
isActionDisabled: $.isBusy,
|
|
357
|
-
rows: $.rows,
|
|
358
|
-
isLoading: $.isLoadingRows,
|
|
359
|
-
loadingRowCount: $.loadingRowCount,
|
|
360
|
-
collapse: $.collapse,
|
|
361
|
-
labels: $.removeBillLabel ? { removeBillButton: $.removeBillLabel } : void 0,
|
|
362
|
-
testId: i.duplicateNotice
|
|
363
|
-
}) : null,
|
|
364
|
-
un ? /* @__PURE__ */ c(me, {
|
|
365
|
-
onDismiss: () => nt(!0),
|
|
366
|
-
labels: d?.extractionNotice
|
|
367
|
-
}) : null
|
|
368
|
-
] }) : void 0;
|
|
369
|
-
return /* @__PURE__ */ We(Ue, { children: [
|
|
370
|
-
/* @__PURE__ */ c(ue, {
|
|
371
|
-
open: Ke,
|
|
372
|
-
onOpenChange: cn,
|
|
373
|
-
title: $t,
|
|
374
|
-
subtitle: en,
|
|
375
|
-
notice: fn,
|
|
376
|
-
vendor: {
|
|
377
|
-
...B,
|
|
378
|
-
testId: i.vendorSection
|
|
379
|
-
},
|
|
380
|
-
values: j.values,
|
|
381
|
-
errors: j.errors,
|
|
382
|
-
onChange: j.onChange,
|
|
383
|
-
lineItems: {
|
|
384
|
-
items: j.lineItemRows,
|
|
385
|
-
glCodeOptions: J,
|
|
386
|
-
glCodeDisabled: Rt,
|
|
387
|
-
glCodeUnavailableMessage: Lt,
|
|
388
|
-
discount: j.discount,
|
|
389
|
-
onDiscountChange: j.onDiscountChange,
|
|
390
|
-
onDiscountBlur: j.onDiscountBlur,
|
|
391
|
-
tax: j.tax,
|
|
392
|
-
onTaxChange: j.onTaxChange,
|
|
393
|
-
onTaxBlur: j.onTaxBlur,
|
|
394
|
-
total: j.total,
|
|
395
|
-
onTotalChange: j.onTotalChange,
|
|
396
|
-
onTotalBlur: j.onTotalBlur,
|
|
397
|
-
onAddLineItem: j.onAddLineItem,
|
|
398
|
-
errors: j.lineItemErrors,
|
|
399
|
-
totalsErrors: j.totalsErrors,
|
|
400
|
-
testId: i.lineItems
|
|
401
|
-
},
|
|
402
|
-
documentPanel: /* @__PURE__ */ c(Re, {
|
|
403
|
-
payableId: S,
|
|
404
|
-
readOnly: A,
|
|
405
|
-
isDocumentPending: !!S && !D?.file && (C.isLoading || D?.ocr_status === "processing"),
|
|
406
|
-
file: D?.file ? {
|
|
407
|
-
id: D.file.id,
|
|
408
|
-
name: D.file.name,
|
|
409
|
-
url: D.file.url,
|
|
410
|
-
mimetype: D.file.mimetype
|
|
411
|
-
} : void 0,
|
|
412
|
-
staging: {
|
|
413
|
-
stagedFile: V.stagedFile,
|
|
414
|
-
onFileStaged: V.stageFile,
|
|
415
|
-
onClearStagedFile: V.clearStagedFile,
|
|
416
|
-
isSaving: yt
|
|
417
|
-
},
|
|
418
|
-
deletion: {
|
|
419
|
-
isPending: V.isFileDeletionPending,
|
|
420
|
-
onRequest: V.requestFileDeletion,
|
|
421
|
-
onDetachNow: V.detachFileNow,
|
|
422
|
-
isDeleting: V.isDeletingFile,
|
|
423
|
-
hasFailed: V.hasFileDeletionFailed
|
|
424
|
-
},
|
|
425
|
-
labels: d?.sourceDocument
|
|
426
|
-
}),
|
|
427
|
-
menuItems: It,
|
|
428
|
-
readOnly: A,
|
|
429
|
-
detail: u ? {
|
|
430
|
-
view: Zt,
|
|
431
|
-
actions: Dt,
|
|
432
|
-
scheduledSummary: P ? p.scheduledSummary(P.label) : void 0,
|
|
433
|
-
scheduledSummaryDate: P?.absoluteLabel,
|
|
434
|
-
scheduledStatusLabel: P ? p.scheduledStatusBadge(P.label) : void 0,
|
|
435
|
-
...wt,
|
|
436
|
-
payTo: {
|
|
437
|
-
onEdit: B.mode === "resolved" ? B.onEdit : void 0,
|
|
438
|
-
paymentInstructions: D?.status === "paid" || D?.status === "canceled" ? void 0 : Oe(B.paymentInstructionsEditor, !!Zt?.payTo.hasPaymentInstructions),
|
|
439
|
-
detailsWarning: B.detailsWarning,
|
|
440
|
-
editForm: B.mode === "creating" ? B.newVendorForm : void 0
|
|
441
|
-
},
|
|
442
|
-
isLoading: Pt,
|
|
443
|
-
isError: Ft,
|
|
444
|
-
paymentHistoryError: N.isError || Y.isError,
|
|
445
|
-
paymentHistoryLoading: N.isResolving || Y.isLoading,
|
|
446
|
-
historyError: Y.isError,
|
|
447
|
-
historyLoading: Y.isLoading || Kt,
|
|
448
|
-
historyNamesError: Jt
|
|
449
|
-
} : void 0,
|
|
450
|
-
isLineItemsLoading: Nt,
|
|
451
|
-
isSaving: jt || _t,
|
|
452
|
-
isSavingDraft: V.isSavingDraft,
|
|
453
|
-
isSubmitting: V.isFinalizing,
|
|
454
|
-
onCancel: tn,
|
|
455
|
-
onCollapse: u ? rn : void 0,
|
|
456
|
-
onSaveDraft: V.saveDraft,
|
|
457
|
-
onFinalize: V.finalize,
|
|
458
|
-
scrollToErrorToken: V.scrollToErrorToken,
|
|
459
|
-
showSubmit: !A && O,
|
|
460
|
-
testId: i.dialog,
|
|
461
|
-
labels: d?.screen
|
|
462
|
-
}),
|
|
463
|
-
/* @__PURE__ */ c(he, {
|
|
464
|
-
open: v,
|
|
465
|
-
onSaveDraft: sn,
|
|
466
|
-
onDiscard: an,
|
|
467
|
-
onCancel: () => y(!1),
|
|
468
|
-
isSaving: V.isSavingDraft,
|
|
469
|
-
isSaveDraftDisabled: on,
|
|
470
|
-
labels: p.unsavedChanges,
|
|
471
|
-
testId: i.unsavedDialog,
|
|
472
|
-
saveDraftTestId: i.unsavedSaveDraft,
|
|
473
|
-
discardTestId: i.unsavedDiscard,
|
|
474
|
-
closeTestId: i.unsavedClose
|
|
475
|
-
}),
|
|
476
|
-
/* @__PURE__ */ c(pe, {
|
|
477
|
-
open: !!rt,
|
|
478
|
-
onDiscard: () => {
|
|
479
|
-
let e = rt;
|
|
480
|
-
b(void 0), e?.();
|
|
481
|
-
},
|
|
482
|
-
onKeepEditing: () => b(void 0),
|
|
483
|
-
labels: p.discardChanges,
|
|
484
|
-
testId: i.discardDialog,
|
|
485
|
-
discardTestId: i.discardConfirm
|
|
486
|
-
}),
|
|
487
|
-
/* @__PURE__ */ c(r, {
|
|
488
|
-
...Ot,
|
|
489
|
-
labels: { cancelButton: p.actions.decisionDialog.cancelButton },
|
|
490
|
-
testId: i.decisionDialog,
|
|
491
|
-
confirmTestId: i.decisionConfirm,
|
|
492
|
-
reasonTestId: i.decisionReason
|
|
493
|
-
}),
|
|
494
|
-
/* @__PURE__ */ c(r, {
|
|
495
|
-
...At.dialog,
|
|
496
|
-
labels: { cancelButton: p.actions.decisionDialog.cancelButton },
|
|
497
|
-
testId: i.deleteDraftDialog,
|
|
498
|
-
confirmTestId: i.deleteDraftConfirm
|
|
499
|
-
}),
|
|
500
|
-
/* @__PURE__ */ c(r, {
|
|
501
|
-
open: $.removeConfirmation.open,
|
|
502
|
-
copy: $.removeConfirmation.copy,
|
|
503
|
-
onConfirm: $.removeConfirmation.onConfirm,
|
|
504
|
-
onCancel: $.removeConfirmation.onCancel,
|
|
505
|
-
isPending: $.removeConfirmation.isPending,
|
|
506
|
-
confirmIcon: $.isRemoveBillDestructive ? /* @__PURE__ */ c(Ge, {}) : void 0,
|
|
507
|
-
labels: { cancelButton: $.removeConfirmation.cancelButtonLabel },
|
|
508
|
-
testId: i.duplicateRemoveDialog,
|
|
509
|
-
confirmTestId: i.duplicateRemoveConfirm
|
|
510
|
-
}),
|
|
511
|
-
/* @__PURE__ */ c(r, {
|
|
512
|
-
open: $.keepRowConfirmation.open,
|
|
513
|
-
copy: $.keepRowConfirmation.copy,
|
|
514
|
-
onConfirm: $.keepRowConfirmation.onConfirm,
|
|
515
|
-
onCancel: $.keepRowConfirmation.onCancel,
|
|
516
|
-
isPending: $.keepRowConfirmation.isPending,
|
|
517
|
-
labels: { cancelButton: $.keepRowConfirmation.cancelButtonLabel }
|
|
518
|
-
}),
|
|
519
|
-
Ze?.({
|
|
520
|
-
ref: W,
|
|
521
|
-
payable: D,
|
|
522
|
-
payableId: H,
|
|
523
|
-
isPayBillEnabled: u,
|
|
524
|
-
hasScheduledPayment: N.hasScheduledPayment,
|
|
525
|
-
onMissingAchInstructions: I ? R.openPaymentInstructions : void 0,
|
|
526
|
-
onMarkAsPaidPendingChange: xt
|
|
527
|
-
})
|
|
528
|
-
] });
|
|
529
|
-
}
|
|
530
|
-
export { Ke as BillDialog, Ke as default };
|
|
1
|
+
import "./index31.js";
|
|
2
|
+
import "./index40.js";
|
|
3
|
+
import "./index42.js";
|
|
4
|
+
import "./index44.js";
|
|
@@ -1,4 +1,44 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "./
|
|
1
|
+
import { AWAITING_APPROVAL_LABEL_EN as e, AWAITING_APPROVAL_UNKNOWN_LABEL_EN as t, BILL_DETAIL_ACTIONS_LABELS_EN as n, PAYMENT_HISTORY_LABELS_EN as r, SCHEDULED_RELATIVE_DAY_LABELS_EN as i, SCHEDULED_STATUS_BADGE_LABEL_EN as a, SCHEDULED_SUMMARY_LABEL_EN as o } from "../../../util/dist/lib/billDetailLabels.js";
|
|
2
|
+
import { BILL_DUE_DATE_LABELS_EN as s } from "../../../util/dist/lib/resolveBillDueDate.js";
|
|
3
|
+
import "../../../util/dist/index.js";
|
|
4
|
+
import { APPROVAL_POLICY_RULE_COPY_EN as c } from "./index10.js";
|
|
5
|
+
import { PAYABLE_AUDIT_HISTORY_LABELS_EN as l } from "./index30.js";
|
|
6
|
+
import { BILL_DETAILS_SHEET_LABELS_EN as u } from "../../ui/dist/index33.js";
|
|
7
|
+
import "../../ui/dist/index.js";
|
|
8
|
+
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js
|
|
9
|
+
var d = {
|
|
10
|
+
subtitle: "Accounts payable",
|
|
11
|
+
vendorRow: "Vendor",
|
|
12
|
+
bankAccountRow: "ACH bank account",
|
|
13
|
+
bankAccountValue: (e) => `Account ending in ${e}`,
|
|
14
|
+
...r,
|
|
15
|
+
invoiceNumberRow: "Number",
|
|
16
|
+
issueDateRow: "Issue date",
|
|
17
|
+
dueDateRow: "Due date",
|
|
18
|
+
poNumberRow: "PO number",
|
|
19
|
+
notProvided: "Not provided",
|
|
20
|
+
glCodeMissing: "GL code not specified",
|
|
21
|
+
quantityValue: (e, t) => `${e} x ${t}`,
|
|
22
|
+
quantityOnlyValue: (e) => e,
|
|
23
|
+
subtotalRow: "Subtotal",
|
|
24
|
+
discountsRow: "Discounts",
|
|
25
|
+
taxRow: "Tax",
|
|
26
|
+
totalRow: "Total",
|
|
27
|
+
actionError: n.actionError,
|
|
28
|
+
actionSuccess: n.actionSuccess,
|
|
29
|
+
scheduledRelativeDay: i,
|
|
30
|
+
dueDate: s,
|
|
31
|
+
scheduledSummary: o,
|
|
32
|
+
scheduledStatusBadge: a,
|
|
33
|
+
awaitingApprovalNotice: e,
|
|
34
|
+
awaitingApprovalUnknownNotice: t,
|
|
35
|
+
paidOnLabel: (e) => `Paid on ${e}`,
|
|
36
|
+
rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
|
|
37
|
+
rejectedOn: (e) => `Rejected on ${e}`,
|
|
38
|
+
rejectionMessage: (e) => `"${e}"`,
|
|
39
|
+
sheet: u,
|
|
40
|
+
history: l,
|
|
41
|
+
decisionDialog: n.decisionDialog,
|
|
42
|
+
approvalPolicyCopy: c
|
|
43
|
+
};
|
|
44
|
+
export { d as BILL_DETAILS_LABELS_EN };
|