@tesouro/embedded-components-react 0.2.333 → 0.2.337
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 +22 -0
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +10 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +43 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +12 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +46 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +26 -149
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +159 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +32 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +102 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +11 -212
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +226 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +4 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +27 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +75 -125
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +133 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +2 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +45 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +9 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +3 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +7 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +20 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +57 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +3 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +105 -157
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +11 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +40 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +100 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +171 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +34 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +1 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +38 -269
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +272 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +2 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +7 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +49 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +2 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +20 -284
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +286 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +13 -117
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +120 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +8 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +96 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +11 -56
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +57 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +1 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +51 -136
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +141 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +5 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +44 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -61
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +63 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +1 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +72 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +251 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +9 -252
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +1 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +6 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +43 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +278 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +8 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +91 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +15 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +101 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +3 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +28 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +2 -170
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +32 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +12 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +106 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +170 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +89 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -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/widget-suite/feature/dist/index7.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +1378 -1371
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +0 -34
|
@@ -1,4 +1,226 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
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 { useAllLedgerAccountsQuery as ee } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
|
|
8
|
+
import { useAllOrganizationUsersQuery as te } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
9
|
+
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { formatCalendarDate as ne } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
11
|
+
import { useWidgetConfig as re } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
12
|
+
import "../../../shared/feature/dist/index.js";
|
|
13
|
+
import { resolveVendor as n } from "./index3.js";
|
|
14
|
+
import { BillCreateScreen as ie } from "../../ui/dist/index41.js";
|
|
15
|
+
import { BillDecisionDialog as r } from "../../ui/dist/index47.js";
|
|
16
|
+
import { BillDuplicateNotice as ae } from "../../ui/dist/index57.js";
|
|
17
|
+
import { ExtractionNotice as oe } from "../../ui/dist/index70.js";
|
|
18
|
+
import "../../ui/dist/index.js";
|
|
19
|
+
import { usePayableHistoryQuery as se } from "../../data-access/dist/index6.js";
|
|
20
|
+
import { useAllPayableLineItemsQuery as ce } from "../../data-access/dist/index7.js";
|
|
21
|
+
import { usePayableQuery as le } from "../../data-access/dist/index13.js";
|
|
22
|
+
import "../../data-access/dist/index.js";
|
|
23
|
+
import { PayBillFlow as ue } from "./index10.js";
|
|
24
|
+
import "./index11.js";
|
|
25
|
+
import { mergeBillCreateScreenCopy as de } from "./index26.js";
|
|
26
|
+
import { useBillCreateController as fe } from "./index34.js";
|
|
27
|
+
import { useBillForm as pe } from "./index36.js";
|
|
28
|
+
import { useApprovalPolicyCardView as me } from "./index15.js";
|
|
29
|
+
import { useCurrentApprovalRequestId as i } from "./index16.js";
|
|
30
|
+
import { usePayableDetailActions as he } from "./index18.js";
|
|
31
|
+
import { useScheduledPayment as ge } from "./index19.js";
|
|
32
|
+
import { buildBillDetailView as _e } from "./index22.js";
|
|
33
|
+
import { buildBillHistory as ve } from "./index23.js";
|
|
34
|
+
import { SourceDocumentContainer as ye } from "./index27.js";
|
|
35
|
+
import { useVendorSectionProps as be } from "./index29.js";
|
|
36
|
+
import { usePaymentInstructionsForm as xe } from "./index30.js";
|
|
37
|
+
import { billCreateTestIds as a } from "./index37.js";
|
|
38
|
+
import { useCallback as o, useEffect as Se, useMemo as s, useRef as Ce, useState as c } from "react";
|
|
39
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
40
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js
|
|
41
|
+
function we(e) {
|
|
42
|
+
return !!(e?.bank_account?.account_holder_name && e.bank_account.routing_number && e.bank_account.account_number);
|
|
43
|
+
}
|
|
44
|
+
function f({ open: f, onOpenChange: p, payableId: m, readOnly: h = !1, copy: g, poweredByBankName: Te, isPossibleDuplicate: Ee }) {
|
|
45
|
+
let _ = s(() => de(g), [g]), [v, y] = c(), [b, x] = c(!1), [De, Oe] = c(!1), [S, C] = c(!1), [w, T] = c(), E = m ?? w, D = le(E, { pollWhileOcrProcessing: !0 }), O = ce(E), k = ee(), A = D.data, j = pe({
|
|
46
|
+
payable: A,
|
|
47
|
+
lineItems: O.lineItems
|
|
48
|
+
}), M = A?.counterpart_id;
|
|
49
|
+
Se(() => {
|
|
50
|
+
b || M && (y(M), x(!0));
|
|
51
|
+
}, [b, M]);
|
|
52
|
+
let ke = o((e) => {
|
|
53
|
+
x(!0), y(e);
|
|
54
|
+
}, []), N = be({
|
|
55
|
+
payableId: h ? void 0 : E,
|
|
56
|
+
counterpartId: h ? void 0 : v,
|
|
57
|
+
payableCounterpartId: M,
|
|
58
|
+
onCounterpartChange: ke,
|
|
59
|
+
requiredError: j.errors?.vendor
|
|
60
|
+
}), P = fe({
|
|
61
|
+
payableId: m,
|
|
62
|
+
form: j,
|
|
63
|
+
counterpartId: v,
|
|
64
|
+
clearCounterpart: !!(E && b) && !v,
|
|
65
|
+
prepareVendorForSave: N.savePaymentInstructions,
|
|
66
|
+
onPayableCreated: T,
|
|
67
|
+
onSaved: T,
|
|
68
|
+
onDraftSaved: () => p(!1),
|
|
69
|
+
onFinalized: () => p(!1)
|
|
70
|
+
}), F = !!(P.isSavingDraft || P.isFinalizing), I = h ? E : void 0, L = i({
|
|
71
|
+
payableId: I,
|
|
72
|
+
status: A?.status
|
|
73
|
+
}), R = Ce(null), z = ge({
|
|
74
|
+
payableId: E,
|
|
75
|
+
scheduledPaymentDate: A?.scheduled_payment_date,
|
|
76
|
+
enabled: h
|
|
77
|
+
}), B = n(A), V = xe({
|
|
78
|
+
payableId: I,
|
|
79
|
+
counterpartId: h ? M : void 0,
|
|
80
|
+
saveErrorMessage: _.detail.paymentInstructionsSaveError
|
|
81
|
+
}), { initResponse: H } = re(), U = e(H?.scopes, [t.CounterpartWriteOrg]) && e(H?.scopes, [t.PayableWriteOrg]), { actions: Ae, decisionDialog: je } = he({
|
|
82
|
+
payableId: I,
|
|
83
|
+
status: A?.status,
|
|
84
|
+
currentApprovalRequestId: L.id,
|
|
85
|
+
isPolicyApprover: L.isPolicyApprover,
|
|
86
|
+
hasWaitingRequest: L.hasWaitingRequest,
|
|
87
|
+
hasScheduledPayment: z.hasScheduledPayment,
|
|
88
|
+
isScheduledPaymentUnknown: z.isResolving,
|
|
89
|
+
labels: _.actions,
|
|
90
|
+
onPayBillSelect: () => we(B) || !U ? R.current?.open() : V.open()
|
|
91
|
+
}), W = s(() => (k.data?.data ?? []).map((e) => ({
|
|
92
|
+
value: e.id,
|
|
93
|
+
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
94
|
+
})), [k.data]), G = se(I), Me = e(H?.scopes, [t.UserReadOrg]), K = te({ enabled: h && Me }), q = s(() => ve(G.data?.data ?? [], K.data?.data ?? [], _.history), [
|
|
95
|
+
G.data,
|
|
96
|
+
K.data,
|
|
97
|
+
_.history
|
|
98
|
+
]), J = me({
|
|
99
|
+
payableId: I,
|
|
100
|
+
approvalPolicyId: A?.approval_policy_id,
|
|
101
|
+
enabled: h,
|
|
102
|
+
copy: _.approvalPolicyCopy
|
|
103
|
+
}), Ne = s(() => h && A ? _e({
|
|
104
|
+
payable: A,
|
|
105
|
+
lineItems: O.lineItems,
|
|
106
|
+
glCodeOptions: W,
|
|
107
|
+
history: q,
|
|
108
|
+
approvalPolicy: J.view,
|
|
109
|
+
labels: _.detail
|
|
110
|
+
}) : void 0, [
|
|
111
|
+
J.view,
|
|
112
|
+
_.detail,
|
|
113
|
+
W,
|
|
114
|
+
q,
|
|
115
|
+
O.lineItems,
|
|
116
|
+
A,
|
|
117
|
+
h
|
|
118
|
+
]), Y = A?.source_of_payable_data === "ocr", X = B?.name, Pe = h ? X ? _.viewTitle(X) : _.readOnlyTitle : Y && X ? _.extractedTitle(X) : _.newTitle, Fe = h && A?.created_at ? _.addedOn(ne(A.created_at.slice(0, 10))) : void 0, Z = o(() => {
|
|
119
|
+
let e = j.isDirty || N.hasUnsavedVendorChanges || !!P.stagedFile;
|
|
120
|
+
!h && e && !window.confirm(_.discardConfirm) || p(!1);
|
|
121
|
+
}, [
|
|
122
|
+
P.stagedFile,
|
|
123
|
+
_.discardConfirm,
|
|
124
|
+
j.isDirty,
|
|
125
|
+
p,
|
|
126
|
+
h,
|
|
127
|
+
N.hasUnsavedVendorChanges
|
|
128
|
+
]), Ie = o((e) => {
|
|
129
|
+
if (!F) return e ? p(!0) : Z();
|
|
130
|
+
}, [
|
|
131
|
+
Z,
|
|
132
|
+
F,
|
|
133
|
+
p
|
|
134
|
+
]), Q = !!Ee && !S, $ = !h && Y && !De, Le = Q || $ ? /* @__PURE__ */ d(l, { children: [Q ? /* @__PURE__ */ u(ae, {
|
|
135
|
+
onNotADuplicate: h ? void 0 : () => C(!0),
|
|
136
|
+
onRemoveBill: h ? void 0 : () => C(!0),
|
|
137
|
+
testId: a.duplicateNotice
|
|
138
|
+
}) : null, $ ? /* @__PURE__ */ u(oe, { onDismiss: () => Oe(!0) }) : null] }) : void 0;
|
|
139
|
+
return /* @__PURE__ */ d(l, { children: [
|
|
140
|
+
/* @__PURE__ */ u(ie, {
|
|
141
|
+
open: f,
|
|
142
|
+
onOpenChange: Ie,
|
|
143
|
+
title: Pe,
|
|
144
|
+
subtitle: Fe,
|
|
145
|
+
notice: Le,
|
|
146
|
+
vendor: {
|
|
147
|
+
...N,
|
|
148
|
+
testId: a.vendorSection
|
|
149
|
+
},
|
|
150
|
+
values: j.values,
|
|
151
|
+
errors: j.errors,
|
|
152
|
+
onChange: j.onChange,
|
|
153
|
+
lineItems: {
|
|
154
|
+
items: j.lineItemRows,
|
|
155
|
+
glCodeOptions: W,
|
|
156
|
+
discount: j.discount,
|
|
157
|
+
onDiscountChange: j.onDiscountChange,
|
|
158
|
+
tax: j.tax,
|
|
159
|
+
onTaxChange: j.onTaxChange,
|
|
160
|
+
total: j.total,
|
|
161
|
+
onTotalChange: j.onTotalChange,
|
|
162
|
+
onAddLineItem: j.onAddLineItem,
|
|
163
|
+
errors: j.lineItemErrors,
|
|
164
|
+
testId: a.lineItems
|
|
165
|
+
},
|
|
166
|
+
documentPanel: /* @__PURE__ */ u(ye, {
|
|
167
|
+
payableId: E,
|
|
168
|
+
readOnly: h,
|
|
169
|
+
isDocumentPending: !!E && !A?.file && (D.isLoading || A?.ocr_status === "processing"),
|
|
170
|
+
file: A?.file ? {
|
|
171
|
+
id: A.file.id,
|
|
172
|
+
name: A.file.name,
|
|
173
|
+
url: A.file.url,
|
|
174
|
+
mimetype: A.file.mimetype
|
|
175
|
+
} : void 0,
|
|
176
|
+
staging: {
|
|
177
|
+
stagedFile: P.stagedFile,
|
|
178
|
+
onFileStaged: P.stageFile,
|
|
179
|
+
onClearStagedFile: P.clearStagedFile,
|
|
180
|
+
isSaving: F
|
|
181
|
+
}
|
|
182
|
+
}),
|
|
183
|
+
readOnly: h,
|
|
184
|
+
detail: h ? {
|
|
185
|
+
view: Ne,
|
|
186
|
+
actions: Ae,
|
|
187
|
+
scheduledSummary: z.hasScheduledPayment && z.scheduledDateLabel ? _.scheduledSummary(z.scheduledDateLabel) : void 0,
|
|
188
|
+
paymentInstructionsForm: M && U ? {
|
|
189
|
+
isOpen: V.isOpen,
|
|
190
|
+
values: V.values,
|
|
191
|
+
errors: V.errors,
|
|
192
|
+
isSaving: V.isSaving,
|
|
193
|
+
onOpen: V.open,
|
|
194
|
+
onCancel: V.close,
|
|
195
|
+
onChange: V.onChange,
|
|
196
|
+
onSave: V.save
|
|
197
|
+
} : void 0,
|
|
198
|
+
isLoading: D.isLoading || O.isResolving || k.isResolving,
|
|
199
|
+
isError: D.isError || O.isError || k.isError
|
|
200
|
+
} : void 0,
|
|
201
|
+
isLineItemsLoading: O.isResolving,
|
|
202
|
+
isSaving: F,
|
|
203
|
+
isSavingDraft: P.isSavingDraft,
|
|
204
|
+
isFinalizing: P.isFinalizing,
|
|
205
|
+
onCancel: Z,
|
|
206
|
+
onSaveDraft: P.saveDraft,
|
|
207
|
+
onFinalize: P.finalize,
|
|
208
|
+
testId: a.dialog
|
|
209
|
+
}),
|
|
210
|
+
/* @__PURE__ */ u(r, {
|
|
211
|
+
...je,
|
|
212
|
+
labels: { cancelButton: _.actions.decisionDialog.cancelButton },
|
|
213
|
+
testId: a.decisionDialog,
|
|
214
|
+
confirmTestId: a.decisionConfirm,
|
|
215
|
+
reasonTestId: a.decisionReason
|
|
216
|
+
}),
|
|
217
|
+
h && A ? /* @__PURE__ */ u(ue, {
|
|
218
|
+
ref: R,
|
|
219
|
+
payable: A,
|
|
220
|
+
poweredByBankName: Te,
|
|
221
|
+
labels: _.payBill
|
|
222
|
+
}) : null
|
|
223
|
+
] });
|
|
224
|
+
}
|
|
225
|
+
//#endregion
|
|
226
|
+
export { f as BillCreateDialog, f as default };
|
|
@@ -1,29 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js
|
|
6
|
-
var i = {
|
|
7
|
-
subtitle: "Accounts payable",
|
|
8
|
-
vendorRow: "Vendor",
|
|
9
|
-
bankAccountRow: "ACH bank account",
|
|
10
|
-
bankAccountValue: (e) => `Account ending in ${e}`,
|
|
11
|
-
invoiceNumberRow: "Number",
|
|
12
|
-
issueDateRow: "Issue date",
|
|
13
|
-
dueDateRow: "Due date",
|
|
14
|
-
poNumberRow: "PO number",
|
|
15
|
-
notProvided: "Not provided",
|
|
16
|
-
glCodeMissing: "GL code not specified",
|
|
17
|
-
quantityValue: (e, t) => `${e} x ${t}`,
|
|
18
|
-
subtotalRow: "Subtotal",
|
|
19
|
-
discountsRow: "Discounts",
|
|
20
|
-
taxRow: "Tax",
|
|
21
|
-
totalRow: "Total",
|
|
22
|
-
actionError: n.actionError,
|
|
23
|
-
scheduledSummary: r,
|
|
24
|
-
sheet: e,
|
|
25
|
-
decisionDialog: n.decisionDialog,
|
|
26
|
-
approvalPolicyCopy: t
|
|
27
|
-
};
|
|
28
|
-
//#endregion
|
|
29
|
-
export { i as BILL_DETAILS_LABELS_EN };
|
|
1
|
+
import "./index26.js";
|
|
2
|
+
import "./index34.js";
|
|
3
|
+
import "./index36.js";
|
|
4
|
+
import "./index38.js";
|
|
@@ -1,82 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { BILL_DETAILS_SHEET_LABELS_EN as e } from "../../ui/dist/index52.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
3
|
+
import { APPROVAL_POLICY_RULE_COPY_EN as t } from "./index12.js";
|
|
4
|
+
import { BILL_DETAIL_ACTIONS_LABELS_EN as n, SCHEDULED_SUMMARY_LABEL_EN as r } from "./index24.js";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
label: c.dueDateRow,
|
|
31
|
-
value: h
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
label: c.poNumberRow,
|
|
35
|
-
value: c.notProvided
|
|
36
|
-
}
|
|
37
|
-
], y = new Map(s.map((e) => [e.id, [e.nominal_code, e.name].filter(Boolean).join(" — ")])), b = o.map((e) => {
|
|
38
|
-
let t = u(e.unit_price);
|
|
39
|
-
return {
|
|
40
|
-
id: e.id,
|
|
41
|
-
description: e.name ?? e.description ?? "",
|
|
42
|
-
glCodeLabel: (e.ledger_account_id ? y.get(e.ledger_account_id) : void 0) || c.glCodeMissing,
|
|
43
|
-
quantityLabel: e.quantity != null && t ? c.quantityValue(String(e.quantity), t) : "",
|
|
44
|
-
amountLabel: u(e.subtotal) ?? ""
|
|
45
|
-
};
|
|
46
|
-
}), x = [
|
|
47
|
-
{
|
|
48
|
-
label: c.subtotalRow,
|
|
49
|
-
value: a.subtotal
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
label: c.discountsRow,
|
|
53
|
-
value: a.discount
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
label: c.taxRow,
|
|
57
|
-
value: a.tax_amount
|
|
58
|
-
}
|
|
59
|
-
].map(({ label: e, value: t }) => ({
|
|
60
|
-
label: e,
|
|
61
|
-
value: u(t)
|
|
62
|
-
})).filter((e) => !!e.value), S = u(a.total_amount);
|
|
63
|
-
return S && x.push({
|
|
64
|
-
label: c.totalRow,
|
|
65
|
-
value: S,
|
|
66
|
-
emphasis: !0
|
|
67
|
-
}), {
|
|
68
|
-
title: p,
|
|
69
|
-
subtitle: c.subtitle,
|
|
70
|
-
status: d.status,
|
|
71
|
-
statusTone: d.tone,
|
|
72
|
-
amountDueLabel: u(a.amount_due) ?? u(a.total_amount) ?? "",
|
|
73
|
-
invoiceDateLabel: m,
|
|
74
|
-
dueDateLabel: h,
|
|
75
|
-
payToItems: g,
|
|
76
|
-
invoiceItems: v,
|
|
77
|
-
lineItems: b,
|
|
78
|
-
totals: x
|
|
79
|
-
};
|
|
80
|
-
}
|
|
6
|
+
var i = {
|
|
7
|
+
subtitle: "Accounts payable",
|
|
8
|
+
vendorRow: "Vendor",
|
|
9
|
+
bankAccountRow: "ACH bank account",
|
|
10
|
+
bankAccountValue: (e) => `Account ending in ${e}`,
|
|
11
|
+
invoiceNumberRow: "Number",
|
|
12
|
+
issueDateRow: "Issue date",
|
|
13
|
+
dueDateRow: "Due date",
|
|
14
|
+
poNumberRow: "PO number",
|
|
15
|
+
notProvided: "Not provided",
|
|
16
|
+
glCodeMissing: "GL code not specified",
|
|
17
|
+
quantityValue: (e, t) => `${e} x ${t}`,
|
|
18
|
+
subtotalRow: "Subtotal",
|
|
19
|
+
discountsRow: "Discounts",
|
|
20
|
+
taxRow: "Tax",
|
|
21
|
+
totalRow: "Total",
|
|
22
|
+
actionError: n.actionError,
|
|
23
|
+
scheduledSummary: r,
|
|
24
|
+
sheet: e,
|
|
25
|
+
decisionDialog: n.decisionDialog,
|
|
26
|
+
approvalPolicyCopy: t
|
|
27
|
+
};
|
|
81
28
|
//#endregion
|
|
82
|
-
export {
|
|
29
|
+
export { i as BILL_DETAILS_LABELS_EN };
|
|
@@ -1,132 +1,82 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { useAllLedgerAccountsQuery as e } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
|
|
6
|
-
import "../../../shared/data-access/dist/index.js";
|
|
7
|
-
import { resolveVendor as t } from "./index3.js";
|
|
8
|
-
import { BillDecisionDialog as n } from "../../ui/dist/index46.js";
|
|
9
|
-
import { BillDetailsSheet as r } from "../../ui/dist/index52.js";
|
|
10
|
-
import "../../ui/dist/index.js";
|
|
11
|
-
import { useAllPayableLineItemsQuery as i } from "../../data-access/dist/index7.js";
|
|
12
|
-
import { usePayableQuery as a } from "../../data-access/dist/index13.js";
|
|
13
|
-
import "../../data-access/dist/index.js";
|
|
14
|
-
import { PayBillFlow as o } from "./index10.js";
|
|
15
|
-
import "./index11.js";
|
|
16
|
-
import { mergeDecisionDialogCopy as s } from "./index24.js";
|
|
17
|
-
import { useApprovalPolicyCardView as c } from "./index15.js";
|
|
18
|
-
import { useCurrentApprovalRequestId as l } from "./index16.js";
|
|
19
|
-
import { usePayableDetailActions as u } from "./index18.js";
|
|
20
|
-
import { useScheduledPayment as d } from "./index19.js";
|
|
21
|
-
import { BILL_DETAILS_LABELS_EN as f } from "./index39.js";
|
|
22
|
-
import { mapPayableToBillDetails as p } from "./index40.js";
|
|
23
|
-
import { useMemo as m, useRef as h } from "react";
|
|
24
|
-
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
1
|
+
import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
2
|
+
import { resolveVendor as t, resolveVendorName as n } from "./index3.js";
|
|
3
|
+
import { derivePayableStatus as r } from "./index20.js";
|
|
4
|
+
import { formatBillMoney as i } from "./index21.js";
|
|
25
5
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
6
|
+
function a({ payable: a, lineItems: o, ledgerAccounts: s, labels: c }) {
|
|
7
|
+
let l = a.currency, u = (e) => i(e, l), d = r({
|
|
8
|
+
apiStatus: a.status,
|
|
9
|
+
dueDate: a.due_date,
|
|
10
|
+
scheduledPaymentDate: a.scheduled_payment_date
|
|
11
|
+
}), f = t(a), p = n(a), m = e(a.issued_at) || c.notProvided, h = e(a.due_date) || c.notProvided, g = [{
|
|
12
|
+
label: c.vendorRow,
|
|
13
|
+
value: p || c.notProvided,
|
|
14
|
+
secondaryValue: f?.email ?? void 0
|
|
15
|
+
}], _ = f?.bank_account?.account_number;
|
|
16
|
+
_ && g.push({
|
|
17
|
+
label: c.bankAccountRow,
|
|
18
|
+
value: c.bankAccountValue(_.slice(-4))
|
|
19
|
+
});
|
|
20
|
+
let v = [
|
|
21
|
+
{
|
|
22
|
+
label: c.invoiceNumberRow,
|
|
23
|
+
value: a.document_id || c.notProvided
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: c.issueDateRow,
|
|
27
|
+
value: m
|
|
44
28
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
29
|
+
{
|
|
30
|
+
label: c.dueDateRow,
|
|
31
|
+
value: h
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: c.poNumberRow,
|
|
35
|
+
value: c.notProvided
|
|
49
36
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
isScheduledPaymentUnknown: I.isResolving,
|
|
68
|
-
labels: {
|
|
69
|
-
payBill: O.sheet.payButton,
|
|
70
|
-
markAsPaid: O.sheet.markAsPaidButton,
|
|
71
|
-
reject: O.sheet.rejectButton,
|
|
72
|
-
approve: O.sheet.approveButton,
|
|
73
|
-
cancel: O.sheet.cancelButton,
|
|
74
|
-
reopen: O.sheet.reopenButton,
|
|
75
|
-
forceApprove: O.sheet.forceApproveButton,
|
|
76
|
-
forceReject: O.sheet.forceRejectButton,
|
|
77
|
-
decisionDialog: O.decisionDialog,
|
|
78
|
-
actionError: O.actionError
|
|
37
|
+
], y = new Map(s.map((e) => [e.id, [e.nominal_code, e.name].filter(Boolean).join(" — ")])), b = o.map((e) => {
|
|
38
|
+
let t = u(e.unit_price);
|
|
39
|
+
return {
|
|
40
|
+
id: e.id,
|
|
41
|
+
description: e.name ?? e.description ?? "",
|
|
42
|
+
glCodeLabel: (e.ledger_account_id ? y.get(e.ledger_account_id) : void 0) || c.glCodeMissing,
|
|
43
|
+
quantityLabel: e.quantity != null && t ? c.quantityValue(String(e.quantity), t) : "",
|
|
44
|
+
amountLabel: u(e.subtotal) ?? ""
|
|
45
|
+
};
|
|
46
|
+
}), x = [
|
|
47
|
+
{
|
|
48
|
+
label: c.subtotalRow,
|
|
49
|
+
value: a.subtotal
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: c.discountsRow,
|
|
53
|
+
value: a.discount
|
|
79
54
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
N.current?.open();
|
|
55
|
+
{
|
|
56
|
+
label: c.taxRow,
|
|
57
|
+
value: a.tax_amount
|
|
86
58
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
isLoading: V,
|
|
109
|
-
isError: H,
|
|
110
|
-
notice: z,
|
|
111
|
-
onClose: C,
|
|
112
|
-
onExpand: w,
|
|
113
|
-
testId: T,
|
|
114
|
-
labels: O.sheet
|
|
115
|
-
}),
|
|
116
|
-
/* @__PURE__ */ _(n, {
|
|
117
|
-
...R,
|
|
118
|
-
labels: { cancelButton: O.decisionDialog.cancelButton },
|
|
119
|
-
testId: T ? `${T}-decision-dialog` : void 0,
|
|
120
|
-
confirmTestId: T ? `${T}-decision-confirm` : void 0,
|
|
121
|
-
reasonTestId: T ? `${T}-decision-reason` : void 0,
|
|
122
|
-
reasonFieldId: T ? `${T}-decision-reason-field` : void 0
|
|
123
|
-
}),
|
|
124
|
-
M ? /* @__PURE__ */ _(o, {
|
|
125
|
-
ref: N,
|
|
126
|
-
payable: M,
|
|
127
|
-
poweredByBankName: D
|
|
128
|
-
}) : null
|
|
129
|
-
] });
|
|
59
|
+
].map(({ label: e, value: t }) => ({
|
|
60
|
+
label: e,
|
|
61
|
+
value: u(t)
|
|
62
|
+
})).filter((e) => !!e.value), S = u(a.total_amount);
|
|
63
|
+
return S && x.push({
|
|
64
|
+
label: c.totalRow,
|
|
65
|
+
value: S,
|
|
66
|
+
emphasis: !0
|
|
67
|
+
}), {
|
|
68
|
+
title: p,
|
|
69
|
+
subtitle: c.subtitle,
|
|
70
|
+
status: d.status,
|
|
71
|
+
statusTone: d.tone,
|
|
72
|
+
amountDueLabel: u(a.amount_due) ?? u(a.total_amount) ?? "",
|
|
73
|
+
invoiceDateLabel: m,
|
|
74
|
+
dueDateLabel: h,
|
|
75
|
+
payToItems: g,
|
|
76
|
+
invoiceItems: v,
|
|
77
|
+
lineItems: b,
|
|
78
|
+
totals: x
|
|
79
|
+
};
|
|
130
80
|
}
|
|
131
81
|
//#endregion
|
|
132
|
-
export {
|
|
82
|
+
export { a as mapPayableToBillDetails };
|