@tesouro/embedded-components-react 0.11.170 → 0.11.172
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.d.ts +6 -0
- package/dist/lib/ReceivablesWidget.d.ts +6 -0
- package/dist/lib/WidgetSuite.d.ts +6 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +75 -66
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +62 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +44 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +331 -326
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +10 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +190 -187
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +12 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +25 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +4 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +23 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +196 -187
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +6 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index8.js +20 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +11 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +157 -161
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +5 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +32 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/index.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/resolveBillDueDate.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +116 -98
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +99 -92
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +7 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurringSeries.js +15 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +59 -69
- 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/ui/dist/index.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/DateDisclosure/DateDisclosure.js +28 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/DueDateText/DueDateText.js +19 -0
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +28 -27
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/dueDateDisplay.js +23 -0
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +0 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +0 -2
package/dist/index.d.ts
CHANGED
|
@@ -4802,11 +4802,17 @@ interface ReceivableMessageLabels {
|
|
|
4802
4802
|
detailsPeriodMonth: string;
|
|
4803
4803
|
detailsPeriodQuarter: string;
|
|
4804
4804
|
detailsPeriodYear: string;
|
|
4805
|
+
detailsPeriodEveryDays: string;
|
|
4806
|
+
detailsPeriodEveryWeeks: string;
|
|
4807
|
+
detailsPeriodEveryMonths: string;
|
|
4808
|
+
detailsPeriodEveryQuarters: string;
|
|
4809
|
+
detailsPeriodEveryYears: string;
|
|
4805
4810
|
/** `{name}` and `{frequency}` are replaced, e.g. "Acme - Monthly". */
|
|
4806
4811
|
detailsSeriesTitle: string;
|
|
4807
4812
|
detailsSeriesSubtitle: string;
|
|
4808
4813
|
/** `{frequency}` is replaced, e.g. "Monthly schedule". */
|
|
4809
4814
|
detailsScheduleTitle: string;
|
|
4815
|
+
detailsScheduleTitleEvery: string;
|
|
4810
4816
|
/** `{title}` is replaced with the series title. */
|
|
4811
4817
|
detailsSeriesBack: string;
|
|
4812
4818
|
/** `{number}` is replaced with the invoice number. */
|
|
@@ -1545,11 +1545,17 @@ interface ReceivableMessageLabels {
|
|
|
1545
1545
|
detailsPeriodMonth: string;
|
|
1546
1546
|
detailsPeriodQuarter: string;
|
|
1547
1547
|
detailsPeriodYear: string;
|
|
1548
|
+
detailsPeriodEveryDays: string;
|
|
1549
|
+
detailsPeriodEveryWeeks: string;
|
|
1550
|
+
detailsPeriodEveryMonths: string;
|
|
1551
|
+
detailsPeriodEveryQuarters: string;
|
|
1552
|
+
detailsPeriodEveryYears: string;
|
|
1548
1553
|
/** `{name}` and `{frequency}` are replaced, e.g. "Acme - Monthly". */
|
|
1549
1554
|
detailsSeriesTitle: string;
|
|
1550
1555
|
detailsSeriesSubtitle: string;
|
|
1551
1556
|
/** `{frequency}` is replaced, e.g. "Monthly schedule". */
|
|
1552
1557
|
detailsScheduleTitle: string;
|
|
1558
|
+
detailsScheduleTitleEvery: string;
|
|
1553
1559
|
/** `{title}` is replaced with the series title. */
|
|
1554
1560
|
detailsSeriesBack: string;
|
|
1555
1561
|
/** `{number}` is replaced with the invoice number. */
|
|
@@ -3700,11 +3700,17 @@ interface ReceivableMessageLabels {
|
|
|
3700
3700
|
detailsPeriodMonth: string;
|
|
3701
3701
|
detailsPeriodQuarter: string;
|
|
3702
3702
|
detailsPeriodYear: string;
|
|
3703
|
+
detailsPeriodEveryDays: string;
|
|
3704
|
+
detailsPeriodEveryWeeks: string;
|
|
3705
|
+
detailsPeriodEveryMonths: string;
|
|
3706
|
+
detailsPeriodEveryQuarters: string;
|
|
3707
|
+
detailsPeriodEveryYears: string;
|
|
3703
3708
|
/** `{name}` and `{frequency}` are replaced, e.g. "Acme - Monthly". */
|
|
3704
3709
|
detailsSeriesTitle: string;
|
|
3705
3710
|
detailsSeriesSubtitle: string;
|
|
3706
3711
|
/** `{frequency}` is replaced, e.g. "Monthly schedule". */
|
|
3707
3712
|
detailsScheduleTitle: string;
|
|
3713
|
+
detailsScheduleTitleEvery: string;
|
|
3708
3714
|
/** `{title}` is replaced with the series title. */
|
|
3709
3715
|
detailsSeriesBack: string;
|
|
3710
3716
|
/** `{number}` is replaced with the invoice number. */
|
|
@@ -1,103 +1,112 @@
|
|
|
1
1
|
import { formatCalendarDate as e } from "../../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
2
2
|
import "../../../../shared/util/dist/index.js";
|
|
3
3
|
import { formatBillMoney as t } from "../../../util/dist/lib/formatBillMoney.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { resolveBillDueDate as n } from "../../../util/dist/lib/resolveBillDueDate.js";
|
|
5
|
+
import { resolveLineItemAmountMinorUnits as r } from "../../../util/dist/lib/resolveLineItemAmount.js";
|
|
6
|
+
import { resolveLineItemQuantity as i } from "../../../util/dist/lib/resolveLineItemQuantity.js";
|
|
7
|
+
import { resolveVendor as a, resolveVendorName as o } from "../../../util/dist/lib/resolveVendor.js";
|
|
7
8
|
import "../../../util/dist/index.js";
|
|
8
|
-
import { formatGlCodeLabel as
|
|
9
|
-
import { derivePayableStatus as
|
|
9
|
+
import { formatGlCodeLabel as s } from "./index15.js";
|
|
10
|
+
import { derivePayableStatus as c } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
|
|
10
11
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js
|
|
11
|
-
function
|
|
12
|
+
function l(e) {
|
|
12
13
|
return e.total_amount ?? e.amount_due ?? void 0;
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
+
function u(e) {
|
|
15
16
|
return typeof e == "string" ? e : "";
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
-
let
|
|
19
|
-
apiStatus:
|
|
20
|
-
dueDate:
|
|
21
|
-
scheduledPaymentDate:
|
|
22
|
-
hasScheduledPayment:
|
|
23
|
-
now:
|
|
24
|
-
}),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
function d({ payable: d, lineItems: p, ledgerAccounts: m, labels: h, hasScheduledPayment: g, now: _, today: v, rejection: y, achInstructions: b, achInstructionsReadable: x = !1 }) {
|
|
19
|
+
let S = d.currency, C = (e) => t(e, S), w = c({
|
|
20
|
+
apiStatus: d.status,
|
|
21
|
+
dueDate: d.due_date,
|
|
22
|
+
scheduledPaymentDate: d.scheduled_payment_date,
|
|
23
|
+
hasScheduledPayment: g,
|
|
24
|
+
now: _
|
|
25
|
+
}), T = a(d), E = o(d), D = e(d.issued_at) || h.notProvided, O = e(d.due_date) || h.notProvided, k = n({
|
|
26
|
+
status: d.status,
|
|
27
|
+
dueDate: d.due_date,
|
|
28
|
+
today: v,
|
|
29
|
+
isScheduled: w.status === "scheduled",
|
|
30
|
+
labels: h.dueDate,
|
|
31
|
+
emptyLabel: h.notProvided
|
|
32
|
+
}), A = [{
|
|
33
|
+
label: h.vendorRow,
|
|
34
|
+
value: E || h.notProvided,
|
|
35
|
+
secondaryValue: T?.email ?? void 0
|
|
36
|
+
}], j = x ? b?.account_number : void 0;
|
|
37
|
+
j && A.push({
|
|
38
|
+
label: h.bankAccountRow,
|
|
39
|
+
value: h.bankAccountValue(j.slice(-4))
|
|
32
40
|
});
|
|
33
|
-
let
|
|
41
|
+
let M = [
|
|
34
42
|
{
|
|
35
|
-
label:
|
|
36
|
-
value:
|
|
43
|
+
label: h.invoiceNumberRow,
|
|
44
|
+
value: d.document_id || h.notProvided
|
|
37
45
|
},
|
|
38
46
|
{
|
|
39
|
-
label:
|
|
40
|
-
value:
|
|
47
|
+
label: h.issueDateRow,
|
|
48
|
+
value: D
|
|
41
49
|
},
|
|
42
50
|
{
|
|
43
|
-
label:
|
|
44
|
-
value:
|
|
51
|
+
label: h.dueDateRow,
|
|
52
|
+
value: O
|
|
45
53
|
},
|
|
46
54
|
{
|
|
47
|
-
label:
|
|
48
|
-
value:
|
|
55
|
+
label: h.poNumberRow,
|
|
56
|
+
value: u(d.purchase_order_number) || h.notProvided
|
|
49
57
|
}
|
|
50
|
-
],
|
|
51
|
-
let t =
|
|
58
|
+
], N = new Map(m.map((e) => [e.id, s(e)])), P = p.map((e) => {
|
|
59
|
+
let t = C(e.unit_price), n = String(i(e));
|
|
52
60
|
return {
|
|
53
61
|
id: e.id,
|
|
54
62
|
description: e.name ?? e.description ?? "",
|
|
55
|
-
glCodeLabel: (e.ledger_account_id ?
|
|
56
|
-
quantityLabel: t ?
|
|
57
|
-
amountLabel:
|
|
63
|
+
glCodeLabel: (e.ledger_account_id ? N.get(e.ledger_account_id) : void 0) || h.glCodeMissing,
|
|
64
|
+
quantityLabel: t ? h.quantityValue(n, t) : h.quantityOnlyValue(n),
|
|
65
|
+
amountLabel: C(r(e)) ?? ""
|
|
58
66
|
};
|
|
59
|
-
}),
|
|
67
|
+
}), F = [
|
|
60
68
|
{
|
|
61
|
-
label:
|
|
62
|
-
value:
|
|
69
|
+
label: h.subtotalRow,
|
|
70
|
+
value: d.subtotal
|
|
63
71
|
},
|
|
64
72
|
{
|
|
65
|
-
label:
|
|
66
|
-
value:
|
|
73
|
+
label: h.discountsRow,
|
|
74
|
+
value: d.discount
|
|
67
75
|
},
|
|
68
76
|
{
|
|
69
|
-
label:
|
|
70
|
-
value:
|
|
77
|
+
label: h.taxRow,
|
|
78
|
+
value: d.tax_amount
|
|
71
79
|
}
|
|
72
80
|
].map(({ label: e, value: t }) => ({
|
|
73
81
|
label: e,
|
|
74
|
-
value:
|
|
75
|
-
})).filter((e) => !!e.value),
|
|
76
|
-
|
|
77
|
-
label:
|
|
78
|
-
value:
|
|
82
|
+
value: C(t)
|
|
83
|
+
})).filter((e) => !!e.value), I = C(l(d));
|
|
84
|
+
I && F.push({
|
|
85
|
+
label: h.totalRow,
|
|
86
|
+
value: I,
|
|
79
87
|
emphasis: !0
|
|
80
88
|
});
|
|
81
|
-
let
|
|
89
|
+
let L = f(d);
|
|
82
90
|
return {
|
|
83
|
-
title:
|
|
84
|
-
subtitle:
|
|
85
|
-
status:
|
|
86
|
-
statusTone:
|
|
87
|
-
amountDueLabel:
|
|
88
|
-
amountPaidLabel:
|
|
89
|
-
paidOnLabel:
|
|
90
|
-
invoiceDateLabel:
|
|
91
|
-
dueDateLabel:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
title: E,
|
|
92
|
+
subtitle: h.subtitle,
|
|
93
|
+
status: w.status,
|
|
94
|
+
statusTone: w.tone,
|
|
95
|
+
amountDueLabel: C(d.amount_due) ?? C(d.total_amount) ?? "",
|
|
96
|
+
amountPaidLabel: L ? C(d.amount_paid) : void 0,
|
|
97
|
+
paidOnLabel: L ? h.paidOnLabel(L) : void 0,
|
|
98
|
+
invoiceDateLabel: D,
|
|
99
|
+
dueDateLabel: k.label,
|
|
100
|
+
dueDateOverdueLabel: k.overdueLabel,
|
|
101
|
+
dueDateAccessibleLabel: k.accessibleLabel,
|
|
102
|
+
payToItems: A,
|
|
103
|
+
invoiceItems: M,
|
|
104
|
+
lineItems: P,
|
|
105
|
+
totals: F,
|
|
106
|
+
rejection: y
|
|
98
107
|
};
|
|
99
108
|
}
|
|
100
|
-
function
|
|
109
|
+
function f(t) {
|
|
101
110
|
return t.status === "paid" && t.paid_at ? e(t.paid_at.slice(0, 10)) : void 0;
|
|
102
111
|
}
|
|
103
|
-
export {
|
|
112
|
+
export { f as getPaidAtLabel, d as mapPayableToBillDetails, l as resolveInvoiceTotalMinorUnits };
|
|
@@ -2,86 +2,95 @@ import { formatCalendarDate as e } from "../../../../shared/util/dist/lib/format
|
|
|
2
2
|
import "../../../../shared/util/dist/index.js";
|
|
3
3
|
import { formatBillMoney as t } from "../../../util/dist/lib/formatBillMoney.js";
|
|
4
4
|
import { resolveAmountDueMinorUnits as n } from "../../../util/dist/lib/resolveAmountDue.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { resolveBillDueDate as r } from "../../../util/dist/lib/resolveBillDueDate.js";
|
|
6
|
+
import { resolveLineItemAmountMinorUnits as i } from "../../../util/dist/lib/resolveLineItemAmount.js";
|
|
7
|
+
import { resolveLineItemQuantity as a } from "../../../util/dist/lib/resolveLineItemQuantity.js";
|
|
8
|
+
import { resolveVendor as o } from "../../../util/dist/lib/resolveVendor.js";
|
|
8
9
|
import "../../../util/dist/index.js";
|
|
9
|
-
import { derivePayableStatus as
|
|
10
|
-
import { getPaidAtLabel as
|
|
10
|
+
import { derivePayableStatus as s } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
|
|
11
|
+
import { getPaidAtLabel as c, resolveInvoiceTotalMinorUnits as l } from "./index26.js";
|
|
11
12
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js
|
|
12
|
-
function
|
|
13
|
-
let
|
|
14
|
-
apiStatus:
|
|
15
|
-
dueDate:
|
|
16
|
-
scheduledPaymentDate:
|
|
17
|
-
hasScheduledPayment:
|
|
18
|
-
}),
|
|
13
|
+
function u({ payable: u, lineItems: d, glCodeOptions: f, glCodeRosterAvailable: p = !0, history: m, paymentHistory: h, approvalPolicy: g, labels: _, dueDateLabels: v, today: y, hasScheduledPayment: b, rejection: x, payableAchInstructions: S, payableAchInstructionsReadable: C = !1 }) {
|
|
14
|
+
let w = u.currency, T = s({
|
|
15
|
+
apiStatus: u.status,
|
|
16
|
+
dueDate: u.due_date,
|
|
17
|
+
scheduledPaymentDate: u.scheduled_payment_date,
|
|
18
|
+
hasScheduledPayment: b
|
|
19
|
+
}), E = o(u), D = C ? S : void 0, O = D?.account_number, k = !!(D?.account_holder_name && D.routing_number && D.account_number), A = e(u.issued_at) || _.notProvided, j = e(u.due_date) || _.notProvided, M = r({
|
|
20
|
+
status: u.status,
|
|
21
|
+
dueDate: u.due_date,
|
|
22
|
+
today: y,
|
|
23
|
+
isScheduled: T.status === "scheduled",
|
|
24
|
+
labels: v,
|
|
25
|
+
emptyLabel: _.notProvided
|
|
26
|
+
}), N = new Map(f.map((e) => [e.value, e.label])), P = [
|
|
19
27
|
{
|
|
20
|
-
label:
|
|
21
|
-
minorUnits:
|
|
28
|
+
label: _.subtotalRow,
|
|
29
|
+
minorUnits: u.subtotal
|
|
22
30
|
},
|
|
23
31
|
{
|
|
24
|
-
label:
|
|
25
|
-
minorUnits:
|
|
32
|
+
label: _.discountRow,
|
|
33
|
+
minorUnits: u.discount
|
|
26
34
|
},
|
|
27
35
|
{
|
|
28
|
-
label:
|
|
29
|
-
minorUnits:
|
|
36
|
+
label: _.taxRow,
|
|
37
|
+
minorUnits: u.tax_amount
|
|
30
38
|
}
|
|
31
39
|
].map((e) => ({
|
|
32
40
|
label: e.label,
|
|
33
|
-
value: t(e.minorUnits,
|
|
34
|
-
})).filter((e) => !!e.value),
|
|
35
|
-
|
|
36
|
-
label:
|
|
37
|
-
value:
|
|
41
|
+
value: t(e.minorUnits, w)
|
|
42
|
+
})).filter((e) => !!e.value), F = t(l(u), w);
|
|
43
|
+
F && P.push({
|
|
44
|
+
label: _.totalRow,
|
|
45
|
+
value: F,
|
|
38
46
|
emphasis: !0
|
|
39
47
|
});
|
|
40
|
-
let
|
|
48
|
+
let I = c(u);
|
|
41
49
|
return {
|
|
42
|
-
amountDue: t(n(
|
|
43
|
-
amountPaid:
|
|
44
|
-
paidOnLabel:
|
|
45
|
-
invoiceDateLabel:
|
|
46
|
-
dueDateLabel:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
amountDue: t(n(u), w) ?? "",
|
|
51
|
+
amountPaid: I ? t(u.amount_paid, w) : void 0,
|
|
52
|
+
paidOnLabel: I ? _.paidOnLabel(I) : void 0,
|
|
53
|
+
invoiceDateLabel: A,
|
|
54
|
+
dueDateLabel: M.label,
|
|
55
|
+
dueDateOverdueLabel: M.overdueLabel,
|
|
56
|
+
dueDateAccessibleLabel: M.accessibleLabel,
|
|
57
|
+
status: T.status,
|
|
58
|
+
statusTone: T.tone,
|
|
50
59
|
payTo: {
|
|
51
|
-
name:
|
|
52
|
-
email:
|
|
53
|
-
methodLabel:
|
|
54
|
-
hasPaymentInstructions:
|
|
60
|
+
name: E?.name || _.notProvided,
|
|
61
|
+
email: E?.email ?? "",
|
|
62
|
+
methodLabel: k ? _.paymentInstructionsValue(O?.slice(-4) ?? "") : _.paymentInstructionsNotSet,
|
|
63
|
+
hasPaymentInstructions: k
|
|
55
64
|
},
|
|
56
65
|
invoiceFields: [
|
|
57
66
|
{
|
|
58
|
-
label:
|
|
59
|
-
value:
|
|
67
|
+
label: _.invoiceDateRow,
|
|
68
|
+
value: A
|
|
60
69
|
},
|
|
61
70
|
{
|
|
62
|
-
label:
|
|
63
|
-
value:
|
|
71
|
+
label: _.dueDateRow,
|
|
72
|
+
value: j
|
|
64
73
|
},
|
|
65
74
|
{
|
|
66
|
-
label:
|
|
67
|
-
value:
|
|
75
|
+
label: _.invoiceNumberRow,
|
|
76
|
+
value: u.document_id || _.notProvided
|
|
68
77
|
}
|
|
69
78
|
],
|
|
70
|
-
lineItems:
|
|
71
|
-
let n = t(e.unit_price,
|
|
79
|
+
lineItems: d.map((e) => {
|
|
80
|
+
let n = t(e.unit_price, w), r = String(a(e));
|
|
72
81
|
return {
|
|
73
82
|
id: e.id,
|
|
74
83
|
description: e.name ?? e.description ?? "",
|
|
75
|
-
glCodeLabel: e.ledger_account_id ?
|
|
76
|
-
qtyPriceLabel: n ?
|
|
77
|
-
amount: t(
|
|
84
|
+
glCodeLabel: e.ledger_account_id ? N.get(e.ledger_account_id) ?? (p ? _.glCodeMissing : _.glCodeUnavailable) : _.glCodeMissing,
|
|
85
|
+
qtyPriceLabel: n ? _.qtyPriceValue(r, n) : _.qtyOnlyValue(r),
|
|
86
|
+
amount: t(i(e), w) ?? ""
|
|
78
87
|
};
|
|
79
88
|
}),
|
|
80
|
-
amountRows:
|
|
81
|
-
approvalPolicy:
|
|
82
|
-
paymentHistory:
|
|
83
|
-
history:
|
|
84
|
-
rejection:
|
|
89
|
+
amountRows: P,
|
|
90
|
+
approvalPolicy: g,
|
|
91
|
+
paymentHistory: h,
|
|
92
|
+
history: m,
|
|
93
|
+
rejection: x
|
|
85
94
|
};
|
|
86
95
|
}
|
|
87
|
-
export {
|
|
96
|
+
export { u as buildBillDetailView };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
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, mergeBillDetailActionsLabels as s, mergePaymentHistoryMethodLabels as c } from "../../../util/dist/lib/billDetailLabels.js";
|
|
2
|
+
import { BILL_DUE_DATE_LABELS_EN as l } from "../../../util/dist/lib/resolveBillDueDate.js";
|
|
2
3
|
import "../../../util/dist/index.js";
|
|
3
|
-
import { APPROVAL_POLICY_RULE_COPY_EN as
|
|
4
|
-
import { PAYABLE_AUDIT_HISTORY_LABELS_EN as
|
|
5
|
-
import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as
|
|
6
|
-
import { ACH_FIELD_GROUP_LABELS_EN as
|
|
4
|
+
import { APPROVAL_POLICY_RULE_COPY_EN as u } from "./index9.js";
|
|
5
|
+
import { PAYABLE_AUDIT_HISTORY_LABELS_EN as d } from "./index29.js";
|
|
6
|
+
import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as f } from "./index30.js";
|
|
7
|
+
import { ACH_FIELD_GROUP_LABELS_EN as p } from "../../../../shared/counterpart-management/ui/dist/index2.js";
|
|
7
8
|
import "../../../../shared/counterpart-management/ui/dist/index.js";
|
|
8
|
-
import { BILL_REJECTED_BANNER_LABELS_EN as
|
|
9
|
-
import { DISCARD_CHANGES_DIALOG_LABELS_EN as
|
|
10
|
-
import { UNSAVED_BILL_DIALOG_LABELS_EN as
|
|
9
|
+
import { BILL_REJECTED_BANNER_LABELS_EN as m } from "../../ui/dist/index39.js";
|
|
10
|
+
import { DISCARD_CHANGES_DIALOG_LABELS_EN as h } from "../../ui/dist/index42.js";
|
|
11
|
+
import { UNSAVED_BILL_DIALOG_LABELS_EN as g } from "../../ui/dist/index51.js";
|
|
11
12
|
import "../../ui/dist/index.js";
|
|
12
13
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js
|
|
13
|
-
var
|
|
14
|
+
var _ = {
|
|
14
15
|
unmappedValidationError: (e, t) => `${e}: ${t}`,
|
|
15
16
|
unknownValidationField: "(unknown field)",
|
|
16
17
|
requiredField: "This field is required.",
|
|
@@ -35,7 +36,7 @@ var g = {
|
|
|
35
36
|
implausibleInvoiceDate: "Enter an invoice date within the last 10 years, no more than 30 days from today.",
|
|
36
37
|
implausibleDueDate: "Enter a due date within the last 10 years and next 5 years.",
|
|
37
38
|
dueBeforeInvoiceDate: "Due date must be on or after the invoice date."
|
|
38
|
-
},
|
|
39
|
+
}, v = {
|
|
39
40
|
paymentInstructionsValue: (e) => `Account ending in ${e}`,
|
|
40
41
|
noMethod: "No payment method on file",
|
|
41
42
|
paymentMethodLoading: "Loading payment method...",
|
|
@@ -45,13 +46,13 @@ var g = {
|
|
|
45
46
|
pendingVendorDescription: "Will be created when submitted",
|
|
46
47
|
pendingVendorIncompleteDescription: "Add the missing vendor details before submitting",
|
|
47
48
|
bankAccountSaveFailed: "We could not save these payment instructions. Try again."
|
|
48
|
-
},
|
|
49
|
+
}, y = {
|
|
49
50
|
attachFailed: "We could not attach that file. Try again.",
|
|
50
51
|
deleteFailed: "We could not remove that document. Try again.",
|
|
51
52
|
noDocument: "No document attached to this bill.",
|
|
52
53
|
pendingDeletionNotice: "This document will be removed when you save this bill.",
|
|
53
|
-
preview:
|
|
54
|
-
},
|
|
54
|
+
preview: f
|
|
55
|
+
}, b = {
|
|
55
56
|
...r,
|
|
56
57
|
notProvided: "Not provided",
|
|
57
58
|
paymentInstructionsValue: (e) => `Account ending in ${e}`,
|
|
@@ -73,23 +74,24 @@ var g = {
|
|
|
73
74
|
rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
|
|
74
75
|
rejectedOn: (e) => `Rejected on ${e}`,
|
|
75
76
|
rejectionMessage: (e) => `"${e}"`
|
|
76
|
-
},
|
|
77
|
+
}, x = {
|
|
77
78
|
newTitle: "New bill",
|
|
78
79
|
extractedTitle: (e) => `Bill from ${e}`,
|
|
79
80
|
viewTitle: (e) => `Bill from ${e}`,
|
|
80
81
|
readOnlyTitle: "Bill details",
|
|
81
82
|
addedOn: (e) => `Added on ${e}`,
|
|
82
|
-
unsavedChanges:
|
|
83
|
-
discardChanges:
|
|
83
|
+
unsavedChanges: g,
|
|
84
|
+
discardChanges: h,
|
|
84
85
|
scheduledRelativeDay: i,
|
|
86
|
+
dueDate: l,
|
|
85
87
|
scheduledSummary: o,
|
|
86
88
|
scheduledStatusBadge: a,
|
|
87
89
|
awaitingApprovalNotice: e,
|
|
88
90
|
awaitingApprovalUnknownNotice: t,
|
|
89
91
|
actions: n,
|
|
90
|
-
detail:
|
|
91
|
-
history:
|
|
92
|
-
approvalPolicyCopy:
|
|
92
|
+
detail: b,
|
|
93
|
+
history: d,
|
|
94
|
+
approvalPolicyCopy: u,
|
|
93
95
|
deleteDraft: {
|
|
94
96
|
menuItem: "Delete draft",
|
|
95
97
|
dialog: {
|
|
@@ -104,52 +106,56 @@ var g = {
|
|
|
104
106
|
noAccess: "You don't have access to GL codes",
|
|
105
107
|
empty: "No GL codes set up yet"
|
|
106
108
|
},
|
|
107
|
-
rejectedBanner:
|
|
109
|
+
rejectedBanner: m
|
|
108
110
|
};
|
|
109
|
-
function
|
|
111
|
+
function S(e) {
|
|
110
112
|
return {
|
|
111
|
-
...
|
|
113
|
+
...x,
|
|
112
114
|
...e,
|
|
113
115
|
actions: s(e?.actions),
|
|
114
116
|
detail: {
|
|
115
|
-
...
|
|
117
|
+
...x.detail,
|
|
116
118
|
...e?.detail,
|
|
117
119
|
paymentHistoryMethodLabels: c(e?.detail?.paymentHistoryMethodLabels)
|
|
118
120
|
},
|
|
119
121
|
history: {
|
|
120
|
-
...
|
|
122
|
+
...x.history,
|
|
121
123
|
...e?.history
|
|
122
124
|
},
|
|
123
125
|
lineItemsGlCodeUnavailable: {
|
|
124
|
-
...
|
|
126
|
+
...x.lineItemsGlCodeUnavailable,
|
|
125
127
|
...e?.lineItemsGlCodeUnavailable
|
|
126
128
|
},
|
|
127
129
|
unsavedChanges: {
|
|
128
|
-
...
|
|
130
|
+
...x.unsavedChanges,
|
|
129
131
|
...e?.unsavedChanges
|
|
130
132
|
},
|
|
131
133
|
discardChanges: {
|
|
132
|
-
...
|
|
134
|
+
...x.discardChanges,
|
|
133
135
|
...e?.discardChanges
|
|
134
136
|
},
|
|
135
137
|
rejectedBanner: {
|
|
136
|
-
...
|
|
138
|
+
...x.rejectedBanner,
|
|
137
139
|
...e?.rejectedBanner
|
|
138
140
|
},
|
|
139
141
|
approvalPolicyCopy: {
|
|
140
|
-
...
|
|
142
|
+
...x.approvalPolicyCopy,
|
|
141
143
|
...e?.approvalPolicyCopy
|
|
142
144
|
},
|
|
143
145
|
scheduledRelativeDay: {
|
|
144
|
-
...
|
|
146
|
+
...x.scheduledRelativeDay,
|
|
145
147
|
...e?.scheduledRelativeDay
|
|
146
148
|
},
|
|
149
|
+
dueDate: {
|
|
150
|
+
...x.dueDate,
|
|
151
|
+
...e?.dueDate
|
|
152
|
+
},
|
|
147
153
|
deleteDraft: {
|
|
148
|
-
...
|
|
154
|
+
...x.deleteDraft,
|
|
149
155
|
...e?.deleteDraft,
|
|
150
156
|
dialog: (() => {
|
|
151
157
|
let t = {
|
|
152
|
-
...
|
|
158
|
+
...x.deleteDraft.dialog,
|
|
153
159
|
...e?.deleteDraft?.dialog
|
|
154
160
|
};
|
|
155
161
|
return delete t.reason, t;
|
|
@@ -157,7 +163,7 @@ function x(e) {
|
|
|
157
163
|
}
|
|
158
164
|
};
|
|
159
165
|
}
|
|
160
|
-
var
|
|
166
|
+
var C = {
|
|
161
167
|
createTitle: "New vendor details",
|
|
162
168
|
editTitle: "Edit vendor",
|
|
163
169
|
switchVendorFieldLabel: "Switch to a different vendor",
|
|
@@ -176,20 +182,20 @@ var S = {
|
|
|
176
182
|
paymentInstructionsHeading: "Payment instructions",
|
|
177
183
|
paymentInstructionsDescription: "How and where will the money be sent. This information is required to send a payment.",
|
|
178
184
|
paymentInstructionsExtracted: "We read these from the bill. Check them before saving.",
|
|
179
|
-
ach:
|
|
185
|
+
ach: p
|
|
180
186
|
};
|
|
181
|
-
function
|
|
187
|
+
function w(e) {
|
|
182
188
|
return {
|
|
183
|
-
...
|
|
189
|
+
...C,
|
|
184
190
|
...e,
|
|
185
191
|
ach: {
|
|
186
|
-
...
|
|
192
|
+
...C.ach,
|
|
187
193
|
...e?.ach,
|
|
188
194
|
fieldMarkers: {
|
|
189
|
-
...
|
|
195
|
+
...C.ach.fieldMarkers,
|
|
190
196
|
...e?.ach?.fieldMarkers
|
|
191
197
|
}
|
|
192
198
|
}
|
|
193
199
|
};
|
|
194
200
|
}
|
|
195
|
-
export {
|
|
201
|
+
export { _ as BILL_CREATE_MESSAGE_LABELS_EN, b as BILL_DETAIL_VIEW_LABELS_EN, x as BILL_DIALOG_COPY_EN, y as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, C as VENDOR_INLINE_FORM_LABELS_EN, v as VENDOR_SECTION_PROPS_LABELS_EN, S as mergeBillDialogCopy, w as mergeVendorInlineFormLabels };
|