@tesouro/embedded-components-react 0.3.48 → 0.3.50
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 +8 -2
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +39 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +26 -311
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +325 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +13 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +20 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +75 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +80 -68
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +86 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +77 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +18 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +50 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +22 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +82 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +7 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +15 -159
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +23 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +66 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +2 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +5 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +3 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +31 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +23 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +37 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +161 -61
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +29 -130
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +1 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +47 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +4 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +12 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +63 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +26 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +62 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +133 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +20 -163
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +4 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +39 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +5 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +70 -211
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +47 -103
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +92 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +34 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +59 -62
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +163 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +67 -181
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +20 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +203 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +214 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +98 -312
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +16 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +49 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +29 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +183 -156
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +38 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +102 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +18 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +343 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +30 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +79 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +179 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +2 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +38 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +6 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +92 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +123 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +7 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +45 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +69 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +21 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +27 -208
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +86 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +47 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +244 -106
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +201 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +44 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +6 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +119 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +24 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +5 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +5 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +10 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +105 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +15 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +125 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +7 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +170 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +11 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +108 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +8 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +144 -130
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +87 -71
- 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/index8.js +1 -1
- package/package.json +1 -1
|
@@ -1,31 +1,128 @@
|
|
|
1
|
+
import { BillColumn as e } from "../../ui/dist/index66.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
1
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
PartiallyPaid: "partially_paid",
|
|
4
|
+
var t = {
|
|
5
|
+
Drafts: "drafts",
|
|
6
|
+
Pending: "pending",
|
|
7
|
+
Scheduled: "scheduled",
|
|
7
8
|
Paid: "paid",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
|
|
9
|
+
All: "all"
|
|
10
|
+
}, n = {
|
|
11
|
+
[t.Drafts]: ["draft"],
|
|
12
|
+
[t.Pending]: [
|
|
13
|
+
"new",
|
|
14
|
+
"approve_in_progress",
|
|
15
|
+
"waiting_to_be_paid",
|
|
16
|
+
"partially_paid"
|
|
17
|
+
],
|
|
18
|
+
[t.Scheduled]: [
|
|
19
|
+
"new",
|
|
20
|
+
"approve_in_progress",
|
|
21
|
+
"waiting_to_be_paid",
|
|
22
|
+
"partially_paid"
|
|
23
|
+
],
|
|
24
|
+
[t.Paid]: ["paid"],
|
|
25
|
+
[t.All]: void 0
|
|
26
|
+
}, r = {
|
|
27
|
+
[t.Drafts]: void 0,
|
|
28
|
+
[t.Pending]: !1,
|
|
29
|
+
[t.Scheduled]: !0,
|
|
30
|
+
[t.Paid]: void 0,
|
|
31
|
+
[t.All]: void 0
|
|
26
32
|
};
|
|
27
|
-
function
|
|
28
|
-
return e.
|
|
33
|
+
function i(e) {
|
|
34
|
+
return e === t.Pending || e === t.Drafts;
|
|
35
|
+
}
|
|
36
|
+
var a = t.Pending, o = [
|
|
37
|
+
t.Pending,
|
|
38
|
+
t.Drafts,
|
|
39
|
+
t.Scheduled,
|
|
40
|
+
t.Paid,
|
|
41
|
+
t.All
|
|
42
|
+
], s = {
|
|
43
|
+
[t.Drafts]: [
|
|
44
|
+
e.Vendor,
|
|
45
|
+
e.Attachment,
|
|
46
|
+
e.IssueDate,
|
|
47
|
+
e.DueDate,
|
|
48
|
+
e.Status,
|
|
49
|
+
e.AmountDue,
|
|
50
|
+
e.TotalAmount,
|
|
51
|
+
e.AddedOn
|
|
52
|
+
],
|
|
53
|
+
[t.Pending]: [
|
|
54
|
+
e.Vendor,
|
|
55
|
+
e.Attachment,
|
|
56
|
+
e.IssueDate,
|
|
57
|
+
e.DueDate,
|
|
58
|
+
e.Status,
|
|
59
|
+
e.AmountDue,
|
|
60
|
+
e.TotalAmount,
|
|
61
|
+
e.AddedOn
|
|
62
|
+
],
|
|
63
|
+
[t.Scheduled]: [
|
|
64
|
+
e.Vendor,
|
|
65
|
+
e.Attachment,
|
|
66
|
+
e.IssueDate,
|
|
67
|
+
e.DueDate,
|
|
68
|
+
e.ScheduledDate,
|
|
69
|
+
e.Status,
|
|
70
|
+
e.AmountScheduled,
|
|
71
|
+
e.TotalAmount,
|
|
72
|
+
e.AddedOn
|
|
73
|
+
],
|
|
74
|
+
[t.Paid]: [
|
|
75
|
+
e.Vendor,
|
|
76
|
+
e.Attachment,
|
|
77
|
+
e.IssueDate,
|
|
78
|
+
e.DueDate,
|
|
79
|
+
e.PaidDate,
|
|
80
|
+
e.Status,
|
|
81
|
+
e.AmountPaid,
|
|
82
|
+
e.TotalAmount,
|
|
83
|
+
e.AddedOn
|
|
84
|
+
],
|
|
85
|
+
[t.All]: [
|
|
86
|
+
e.Vendor,
|
|
87
|
+
e.Attachment,
|
|
88
|
+
e.IssueDate,
|
|
89
|
+
e.DueDate,
|
|
90
|
+
e.ScheduledDate,
|
|
91
|
+
e.Status,
|
|
92
|
+
e.AmountDue,
|
|
93
|
+
e.AmountPaid,
|
|
94
|
+
e.TotalAmount,
|
|
95
|
+
e.AddedOn
|
|
96
|
+
]
|
|
97
|
+
};
|
|
98
|
+
function c(e) {
|
|
99
|
+
return s[e];
|
|
100
|
+
}
|
|
101
|
+
function l(e) {
|
|
102
|
+
let t = n[e];
|
|
103
|
+
return t ? [...t] : void 0;
|
|
104
|
+
}
|
|
105
|
+
function u(e) {
|
|
106
|
+
return r[e];
|
|
107
|
+
}
|
|
108
|
+
var d = {
|
|
109
|
+
vendorLabel: "counterpart_name",
|
|
110
|
+
issueDateLabel: "issued_at",
|
|
111
|
+
dueDateLabel: "due_date",
|
|
112
|
+
scheduledDateLabel: "scheduled_payment_date",
|
|
113
|
+
addedOnLabel: "created_at"
|
|
114
|
+
}, f = {
|
|
115
|
+
[e.Vendor]: "vendorLabel",
|
|
116
|
+
[e.IssueDate]: "issueDateLabel",
|
|
117
|
+
[e.DueDate]: "dueDateLabel",
|
|
118
|
+
[e.ScheduledDate]: "scheduledDateLabel",
|
|
119
|
+
[e.AddedOn]: "addedOnLabel"
|
|
120
|
+
};
|
|
121
|
+
function p(e) {
|
|
122
|
+
return f[e];
|
|
123
|
+
}
|
|
124
|
+
function m(e) {
|
|
125
|
+
if (e) return d[e];
|
|
29
126
|
}
|
|
30
127
|
//#endregion
|
|
31
|
-
export { t as
|
|
128
|
+
export { s as BILL_QUEUE_COLUMNS, r as BILL_QUEUE_HAS_SCHEDULED_PAYMENT, o as BILL_QUEUE_ORDER, n as BILL_QUEUE_STATUSES, d as BILL_SORT_FIELDS, t as BillQueue, a as DEFAULT_BILL_QUEUE, c as billQueueColumns, u as billQueueHasScheduledPayment, i as billQueueOffersAddPanel, l as billQueueStatuses, p as billSortColumnId, m as billSortField };
|
|
@@ -1,86 +1,11 @@
|
|
|
1
|
-
import { endOfDay as e, endOfMonth as t, endOfQuarter as n, endOfWeek as r, endOfYear as i, startOfDay as a, startOfMonth as o, startOfQuarter as s, startOfWeek as c, startOfYear as l, subDays as u, subMonths as d, subQuarters as f, subWeeks as p, subYears as m } from "date-fns";
|
|
2
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Yesterday: "yesterday",
|
|
10
|
-
LastWeek: "last_week",
|
|
11
|
-
LastMonth: "last_month",
|
|
12
|
-
Last30Days: "last_30_days",
|
|
13
|
-
Last90Days: "last_90_days",
|
|
14
|
-
LastQuarter: "last_quarter",
|
|
15
|
-
LastYear: "last_year"
|
|
16
|
-
};
|
|
17
|
-
function g(g, _ = /* @__PURE__ */ new Date()) {
|
|
18
|
-
let v = a(_);
|
|
19
|
-
switch (g) {
|
|
20
|
-
case h.Today: return {
|
|
21
|
-
from: v,
|
|
22
|
-
to: e(v)
|
|
23
|
-
};
|
|
24
|
-
case h.ThisWeek: return {
|
|
25
|
-
from: c(v),
|
|
26
|
-
to: r(v)
|
|
27
|
-
};
|
|
28
|
-
case h.ThisMonth: return {
|
|
29
|
-
from: o(v),
|
|
30
|
-
to: t(v)
|
|
31
|
-
};
|
|
32
|
-
case h.ThisQuarter: return {
|
|
33
|
-
from: s(v),
|
|
34
|
-
to: n(v)
|
|
35
|
-
};
|
|
36
|
-
case h.ThisYear: return {
|
|
37
|
-
from: l(v),
|
|
38
|
-
to: i(v)
|
|
39
|
-
};
|
|
40
|
-
case h.Yesterday: {
|
|
41
|
-
let t = u(v, 1);
|
|
42
|
-
return {
|
|
43
|
-
from: t,
|
|
44
|
-
to: e(t)
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
case h.LastWeek: {
|
|
48
|
-
let e = c(p(v, 1));
|
|
49
|
-
return {
|
|
50
|
-
from: e,
|
|
51
|
-
to: r(e)
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
case h.LastMonth: {
|
|
55
|
-
let e = o(d(v, 1));
|
|
56
|
-
return {
|
|
57
|
-
from: e,
|
|
58
|
-
to: t(e)
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
case h.Last30Days: return {
|
|
62
|
-
from: u(v, 29),
|
|
63
|
-
to: e(v)
|
|
64
|
-
};
|
|
65
|
-
case h.Last90Days: return {
|
|
66
|
-
from: u(v, 89),
|
|
67
|
-
to: e(v)
|
|
68
|
-
};
|
|
69
|
-
case h.LastQuarter: {
|
|
70
|
-
let e = s(f(v, 1));
|
|
71
|
-
return {
|
|
72
|
-
from: e,
|
|
73
|
-
to: n(e)
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
case h.LastYear: {
|
|
77
|
-
let e = l(m(v, 1));
|
|
78
|
-
return {
|
|
79
|
-
from: e,
|
|
80
|
-
to: i(e)
|
|
81
|
-
};
|
|
82
|
-
}
|
|
2
|
+
async function e(e) {
|
|
3
|
+
if (!e.trim()) return !1;
|
|
4
|
+
try {
|
|
5
|
+
return await navigator.clipboard.writeText(e), !0;
|
|
6
|
+
} catch {
|
|
7
|
+
return !1;
|
|
83
8
|
}
|
|
84
9
|
}
|
|
85
10
|
//#endregion
|
|
86
|
-
export {
|
|
11
|
+
export { e as copyTextToClipboard };
|
|
@@ -1,50 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "./index7.js";
|
|
2
|
+
import "./index11.js";
|
|
3
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[t.ThisQuarter]: "This quarter",
|
|
10
|
-
[t.ThisYear]: "This year",
|
|
11
|
-
[t.Yesterday]: "Yesterday",
|
|
12
|
-
[t.LastWeek]: "Last week",
|
|
13
|
-
[t.LastMonth]: "Last month",
|
|
14
|
-
[t.Last30Days]: "Last 30 days",
|
|
15
|
-
[t.Last90Days]: "Last 90 days",
|
|
16
|
-
[t.LastQuarter]: "Last quarter",
|
|
17
|
-
[t.LastYear]: "Last year"
|
|
18
|
-
},
|
|
19
|
-
presetGroupCurrent: "Current",
|
|
20
|
-
presetGroupPast: "Past",
|
|
21
|
-
statuses: {
|
|
22
|
-
[e.Draft]: "Draft",
|
|
23
|
-
[e.PendingApproval]: "Pending approval",
|
|
24
|
-
[e.ReadyToPay]: "Ready to pay",
|
|
25
|
-
[e.PartiallyPaid]: "Partially paid",
|
|
26
|
-
[e.Paid]: "Paid",
|
|
27
|
-
[e.Rejected]: "Rejected",
|
|
28
|
-
[e.Canceled]: "Canceled"
|
|
29
|
-
},
|
|
30
|
-
dateFieldNames: {
|
|
31
|
-
issueDate: "Issue date",
|
|
32
|
-
dueDate: "Due date",
|
|
33
|
-
addedOn: "Added on"
|
|
34
|
-
},
|
|
35
|
-
dateChip: (e, t) => `${e}: ${t}`,
|
|
36
|
-
statusChip: (e) => `Status: ${e}`,
|
|
37
|
-
vendorChip: (e) => `Vendor: ${e}`,
|
|
38
|
-
amountChip: (e) => `Total amount: ${e}`,
|
|
39
|
-
attachmentChipHas: "Has attachment",
|
|
40
|
-
attachmentChipNone: "No attachment",
|
|
41
|
-
moreSelected: (e, t) => `${e} + ${t} more`,
|
|
42
|
-
amountAtLeast: (e) => `${e} or more`,
|
|
43
|
-
amountAtMost: (e) => `${e} or less`,
|
|
44
|
-
amountBetween: (e, t) => `${e} - ${t}`,
|
|
45
|
-
dateRange: (e, t) => `${e} - ${t}`,
|
|
46
|
-
dateFrom: (e) => `From ${e}`,
|
|
47
|
-
dateTo: (e) => `Until ${e}`
|
|
48
|
-
};
|
|
4
|
+
function e(e, t) {
|
|
5
|
+
if (e.isError) return t.duplicateWarningUnavailable;
|
|
6
|
+
if (e.isCapped) return t.duplicateWarningManyCapped(100);
|
|
7
|
+
if (e.count !== 0) return e.count === 1 ? t.duplicateWarningOne : t.duplicateWarningMany(e.count);
|
|
8
|
+
}
|
|
49
9
|
//#endregion
|
|
50
|
-
export {
|
|
10
|
+
export { e as resolveDuplicateWarning };
|
|
@@ -1,253 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { formatMoneyExact as e } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
6
|
-
import { BillsFilterField as t } from "../../ui/dist/index63.js";
|
|
7
|
-
import "../../ui/dist/index.js";
|
|
8
|
-
import "../../data-access/dist/index.js";
|
|
9
|
-
import { getCounterpartName as n } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
10
|
-
import { useCounterpartsQuery as r } from "../../../shared/counterpart-management/data-access/dist/index3.js";
|
|
11
|
-
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
12
|
-
import { BILL_STATUS_FILTER_ORDER as i, billStatusFilterApiValues as a } from "./index66.js";
|
|
13
|
-
import { BillsDatePreset as o, resolveDatePreset as s } from "./index67.js";
|
|
14
|
-
import { BILLS_FILTER_LABELS_EN as c } from "./index68.js";
|
|
15
|
-
import { useCallback as l, useEffect as u, useMemo as d, useState as f } from "react";
|
|
16
|
-
import { format as p, formatISO as m } from "date-fns";
|
|
1
|
+
import { BillQueue as e } from "./index66.js";
|
|
17
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
[
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
[
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
[
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
[
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
3
|
+
var t = {
|
|
4
|
+
[e.Drafts]: "Drafts",
|
|
5
|
+
[e.Pending]: "Pending",
|
|
6
|
+
[e.Scheduled]: "Scheduled",
|
|
7
|
+
[e.Paid]: "Paid",
|
|
8
|
+
[e.All]: "All bills"
|
|
9
|
+
}, n = {
|
|
10
|
+
[e.Drafts]: {
|
|
11
|
+
title: "No drafts",
|
|
12
|
+
description: "Bills wait here until someone submits them for approval."
|
|
13
|
+
},
|
|
14
|
+
[e.Pending]: {
|
|
15
|
+
title: "Nothing to act on",
|
|
16
|
+
description: "Every bill has been paid, scheduled, or is still a draft."
|
|
17
|
+
},
|
|
18
|
+
[e.Scheduled]: {
|
|
19
|
+
title: "No scheduled bills",
|
|
20
|
+
description: "Bills appear here once a payment date is set for them."
|
|
21
|
+
},
|
|
22
|
+
[e.Paid]: {
|
|
23
|
+
title: "No paid bills",
|
|
24
|
+
description: "Bills appear here once their payment has gone out."
|
|
25
|
+
},
|
|
26
|
+
[e.All]: {
|
|
27
|
+
title: "No bills",
|
|
28
|
+
description: "Bills appear here as soon as they are added."
|
|
29
|
+
}
|
|
30
|
+
}, r = {
|
|
31
|
+
duplicateWarningOne: "1 possible duplicate bill found",
|
|
32
|
+
duplicateWarningMany: (e) => `${e} possible duplicate bills found`,
|
|
33
|
+
duplicateWarningManyCapped: (e) => `${e}+ possible duplicate bills found`,
|
|
34
|
+
duplicateWarningUnavailable: "Couldn't check for possible duplicates. Try again shortly.",
|
|
35
|
+
duplicateBadge: "Duplicate?",
|
|
36
|
+
attachmentIndicator: "Has an attachment",
|
|
37
|
+
emptyHeading: "Add your first bill",
|
|
38
|
+
nonEmptyHeading: "Add a bill",
|
|
39
|
+
createButton: "Add bill",
|
|
40
|
+
emailCopiedToast: "Email address copied to clipboard",
|
|
41
|
+
emailCopyFailedToast: "Could not copy the email address",
|
|
42
|
+
queues: t,
|
|
43
|
+
queueEmptyStates: n,
|
|
44
|
+
filters: {},
|
|
45
|
+
filterBar: {}
|
|
41
46
|
};
|
|
42
|
-
function S() {
|
|
43
|
-
return {
|
|
44
|
-
dateField: t.DueDate,
|
|
45
|
-
statuses: [],
|
|
46
|
-
amountMode: "any",
|
|
47
|
-
amountMin: "",
|
|
48
|
-
amountMax: "",
|
|
49
|
-
vendorIds: []
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function C(e) {
|
|
53
|
-
let t = Number.parseFloat(e);
|
|
54
|
-
return Number.isFinite(t) ? Math.round(t * 100) : void 0;
|
|
55
|
-
}
|
|
56
|
-
function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFilterPaused: T = !1, onFiltersChange: E, labels: D } = {}) {
|
|
57
|
-
let O = d(() => ({
|
|
58
|
-
...c,
|
|
59
|
-
...D,
|
|
60
|
-
presets: {
|
|
61
|
-
...c.presets,
|
|
62
|
-
...D?.presets
|
|
63
|
-
},
|
|
64
|
-
statuses: {
|
|
65
|
-
...c.statuses,
|
|
66
|
-
...D?.statuses
|
|
67
|
-
},
|
|
68
|
-
dateFieldNames: {
|
|
69
|
-
...c.dateFieldNames,
|
|
70
|
-
...D?.dateFieldNames
|
|
71
|
-
}
|
|
72
|
-
}), [D]), [k, A] = f(S), [j, M] = f({}), [N, P] = f(""), [F, I] = f(""), L = l((e) => {
|
|
73
|
-
A((t) => ({
|
|
74
|
-
...t,
|
|
75
|
-
...e
|
|
76
|
-
})), E?.();
|
|
77
|
-
}, [E]);
|
|
78
|
-
u(() => {
|
|
79
|
-
w || A((e) => e.vendorIds.length === 0 ? e : (E?.(), {
|
|
80
|
-
...e,
|
|
81
|
-
vendorIds: []
|
|
82
|
-
}));
|
|
83
|
-
}, [w, E]), u(() => {
|
|
84
|
-
o || A((e) => e.statuses.length === 0 ? e : (E?.(), {
|
|
85
|
-
...e,
|
|
86
|
-
statuses: []
|
|
87
|
-
}));
|
|
88
|
-
}, [o, E]), u(() => {
|
|
89
|
-
let e = setTimeout(() => I(N.trim()), _);
|
|
90
|
-
return () => clearTimeout(e);
|
|
91
|
-
}, [N]);
|
|
92
|
-
let R = r({
|
|
93
|
-
enabled: w && !T,
|
|
94
|
-
is_vendor: !0,
|
|
95
|
-
sort: "counterpart_name",
|
|
96
|
-
order: "asc",
|
|
97
|
-
limit: g,
|
|
98
|
-
counterpart_name__icontains: F || void 0
|
|
99
|
-
}), z = d(() => (R.data?.data ?? []).map((e) => ({
|
|
100
|
-
value: e.id,
|
|
101
|
-
label: n(e)
|
|
102
|
-
})), [R.data?.data]), B = d(() => i.map((e) => ({
|
|
103
|
-
value: e,
|
|
104
|
-
label: O.statuses[e]
|
|
105
|
-
})), [O.statuses]), V = d(() => Object.entries(x).map(([e, t]) => ({
|
|
106
|
-
value: e,
|
|
107
|
-
label: O.presets[e],
|
|
108
|
-
group: t === "current" ? O.presetGroupCurrent : O.presetGroupPast
|
|
109
|
-
})), [
|
|
110
|
-
O.presetGroupCurrent,
|
|
111
|
-
O.presetGroupPast,
|
|
112
|
-
O.presets
|
|
113
|
-
]), H = d(() => {
|
|
114
|
-
let e = {}, t = b[k.dateField], n = (e) => Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
|
|
115
|
-
if (k.dateFrom && (e[`${t}__gte`] = t === "created_at" ? new Date(n(k.dateFrom)).toISOString() : m(k.dateFrom, { representation: "date" })), k.dateTo && (t === "created_at" ? e.created_at__lt = new Date(n(k.dateTo) + y).toISOString() : e[`${t}__lte`] = m(k.dateTo, { representation: "date" })), k.statuses.length > 0 && (e.status__in = a(k.statuses)), k.amountMode !== "any") {
|
|
116
|
-
let t = "total_amount__gte", n = "total_amount__lte", r = C(k.amountMin), i = C(k.amountMax);
|
|
117
|
-
k.amountMode === "exact" ? r !== void 0 && (e[t] = r, e[n] = r) : (r !== void 0 && (e[t] = r), i !== void 0 && (e[n] = i));
|
|
118
|
-
}
|
|
119
|
-
return k.vendorIds.length > 0 && (e.counterpart_id__in = [...k.vendorIds]), k.hasFile !== void 0 && (e.has_file = k.hasFile), e;
|
|
120
|
-
}, [k]), U = d(() => {
|
|
121
|
-
let t = [], n = (e) => p(e, v), r = (e) => {
|
|
122
|
-
let [t, ...n] = e;
|
|
123
|
-
return t ? n.length === 0 ? t : O.moreSelected(t, n.length) : "";
|
|
124
|
-
};
|
|
125
|
-
if (k.dateFrom || k.dateTo) {
|
|
126
|
-
let e = (k.datePreset ? O.presets[k.datePreset] : void 0) ?? (k.dateFrom && k.dateTo ? O.dateRange(n(k.dateFrom), n(k.dateTo)) : k.dateFrom ? O.dateFrom(n(k.dateFrom)) : O.dateTo(n(k.dateTo)));
|
|
127
|
-
t.push({
|
|
128
|
-
key: h.Date,
|
|
129
|
-
label: O.dateChip(O.dateFieldNames[k.dateField], e)
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
if (k.statuses.length > 0 && t.push({
|
|
133
|
-
key: h.Status,
|
|
134
|
-
label: O.statusChip(r(k.statuses.map((e) => O.statuses[e] ?? e)))
|
|
135
|
-
}), k.vendorIds.length > 0 && t.push({
|
|
136
|
-
key: h.Vendor,
|
|
137
|
-
label: O.vendorChip(r(k.vendorIds.map((e) => j[e] ?? e)))
|
|
138
|
-
}), k.amountMode !== "any") {
|
|
139
|
-
let n = (t) => {
|
|
140
|
-
let n = Number.parseFloat(t);
|
|
141
|
-
return Number.isFinite(n) ? e(n, { currencyCode: "USD" }) : "";
|
|
142
|
-
}, r = n(k.amountMin), i = n(k.amountMax), a = k.amountMode === "exact" ? r : r && i ? O.amountBetween(r, i) : r ? O.amountAtLeast(r) : i ? O.amountAtMost(i) : "";
|
|
143
|
-
a && t.push({
|
|
144
|
-
key: h.Amount,
|
|
145
|
-
label: O.amountChip(a)
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
return k.hasFile !== void 0 && t.push({
|
|
149
|
-
key: h.Attachment,
|
|
150
|
-
label: k.hasFile ? O.attachmentChipHas : O.attachmentChipNone
|
|
151
|
-
}), t;
|
|
152
|
-
}, [
|
|
153
|
-
O,
|
|
154
|
-
k,
|
|
155
|
-
j
|
|
156
|
-
]), W = l((e) => {
|
|
157
|
-
switch (e) {
|
|
158
|
-
case h.Date:
|
|
159
|
-
L({
|
|
160
|
-
datePreset: void 0,
|
|
161
|
-
dateFrom: void 0,
|
|
162
|
-
dateTo: void 0
|
|
163
|
-
});
|
|
164
|
-
break;
|
|
165
|
-
case h.Status:
|
|
166
|
-
L({ statuses: [] });
|
|
167
|
-
break;
|
|
168
|
-
case h.Vendor:
|
|
169
|
-
L({ vendorIds: [] });
|
|
170
|
-
break;
|
|
171
|
-
case h.Amount:
|
|
172
|
-
L({
|
|
173
|
-
amountMode: "any",
|
|
174
|
-
amountMin: "",
|
|
175
|
-
amountMax: ""
|
|
176
|
-
});
|
|
177
|
-
break;
|
|
178
|
-
case h.Attachment: L({ hasFile: void 0 });
|
|
179
|
-
}
|
|
180
|
-
}, [L]), G = l(() => {
|
|
181
|
-
A(S()), E?.();
|
|
182
|
-
}, [E]), K = l((e) => {
|
|
183
|
-
M((t) => {
|
|
184
|
-
let n = { ...t };
|
|
185
|
-
for (let t of z) e.includes(t.value) && (n[t.value] = t.label);
|
|
186
|
-
return n;
|
|
187
|
-
}), L({ vendorIds: e });
|
|
188
|
-
}, [L, z]);
|
|
189
|
-
return {
|
|
190
|
-
filterBarProps: {
|
|
191
|
-
fields: [...d(() => [
|
|
192
|
-
...w ? [t.Vendor] : [],
|
|
193
|
-
t.IssueDate,
|
|
194
|
-
t.DueDate,
|
|
195
|
-
...o ? [t.Status] : [],
|
|
196
|
-
t.TotalAmount,
|
|
197
|
-
t.AddedOn,
|
|
198
|
-
t.Attachment
|
|
199
|
-
], [o, w])],
|
|
200
|
-
activeFilterCount: U.length,
|
|
201
|
-
chips: U,
|
|
202
|
-
onRemoveChip: W,
|
|
203
|
-
onClearAll: G,
|
|
204
|
-
dateField: k.dateField,
|
|
205
|
-
onDateFieldChange: (e) => {
|
|
206
|
-
let t = !!(k.dateFrom || k.dateTo);
|
|
207
|
-
A((t) => ({
|
|
208
|
-
...t,
|
|
209
|
-
dateField: e
|
|
210
|
-
})), t && E?.();
|
|
211
|
-
},
|
|
212
|
-
datePresets: V,
|
|
213
|
-
selectedDatePreset: k.datePreset,
|
|
214
|
-
dateFrom: k.dateFrom,
|
|
215
|
-
dateTo: k.dateTo,
|
|
216
|
-
onDateRangeChange: ({ from: e, to: t }) => L({
|
|
217
|
-
datePreset: void 0,
|
|
218
|
-
dateFrom: e,
|
|
219
|
-
dateTo: t
|
|
220
|
-
}),
|
|
221
|
-
onDatePresetChange: (e) => {
|
|
222
|
-
let n = /* @__PURE__ */ new Date(), r = k.dateField === t.AddedOn ? new Date(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()) : n, { from: i, to: a } = s(e, r);
|
|
223
|
-
L({
|
|
224
|
-
datePreset: e,
|
|
225
|
-
dateFrom: i,
|
|
226
|
-
dateTo: a
|
|
227
|
-
});
|
|
228
|
-
},
|
|
229
|
-
statusOptions: B,
|
|
230
|
-
selectedStatuses: k.statuses,
|
|
231
|
-
onStatusChange: (e) => L({ statuses: e }),
|
|
232
|
-
amountMode: k.amountMode,
|
|
233
|
-
onAmountModeChange: (e) => L({ amountMode: e }),
|
|
234
|
-
amountMin: k.amountMin,
|
|
235
|
-
amountMax: k.amountMax,
|
|
236
|
-
onAmountMinChange: (e) => L({ amountMin: e }),
|
|
237
|
-
onAmountMaxChange: (e) => L({ amountMax: e }),
|
|
238
|
-
vendorOptions: z,
|
|
239
|
-
selectedVendors: k.vendorIds,
|
|
240
|
-
onVendorChange: K,
|
|
241
|
-
vendorSearchValue: N,
|
|
242
|
-
onVendorSearchChange: P,
|
|
243
|
-
isVendorLoading: R.isLoading || T,
|
|
244
|
-
isVendorError: R.isError,
|
|
245
|
-
hasAttachment: k.hasFile,
|
|
246
|
-
onHasAttachmentChange: (e) => L({ hasFile: e })
|
|
247
|
-
},
|
|
248
|
-
query: H,
|
|
249
|
-
isFilterActive: U.length > 0
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
47
|
//#endregion
|
|
253
|
-
export {
|
|
48
|
+
export { r as BILLS_TAB_LABELS_EN, n as BILL_QUEUE_EMPTY_STATES_EN, t as BILL_QUEUE_LABELS_EN };
|
|
@@ -1,9 +1,73 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
6
|
+
import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
7
|
+
import { suspectedPayableDuplicates as n } from "../../data-access/dist/index6.js";
|
|
8
|
+
import { useAllSuspectedDuplicatePayablesQuery as r, usePayablesQuery as i } from "../../data-access/dist/index15.js";
|
|
9
|
+
import "../../data-access/dist/index.js";
|
|
10
|
+
import { groupSuspectedDuplicates as a } from "./index3.js";
|
|
11
|
+
import { derivePayableStatus as o } from "./index4.js";
|
|
12
|
+
import { payableRemoval as s } from "./index6.js";
|
|
13
|
+
import { resolveVendorName as c } from "./index5.js";
|
|
14
|
+
import { useMemo as l } from "react";
|
|
1
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js
|
|
2
|
-
function
|
|
3
|
-
return e
|
|
16
|
+
function u(e) {
|
|
17
|
+
return e.isError && e.data === void 0;
|
|
4
18
|
}
|
|
5
|
-
function
|
|
6
|
-
return e
|
|
19
|
+
function d(e, n) {
|
|
20
|
+
return e == null ? "" : t(e / 100, { currencyCode: n ?? "USD" });
|
|
21
|
+
}
|
|
22
|
+
function f(t) {
|
|
23
|
+
let r = t.status ? o({
|
|
24
|
+
apiStatus: t.status,
|
|
25
|
+
dueDate: t.due_date,
|
|
26
|
+
scheduledPaymentDate: t.scheduled_payment_date
|
|
27
|
+
}) : void 0;
|
|
28
|
+
return {
|
|
29
|
+
id: t.id,
|
|
30
|
+
status: r?.status,
|
|
31
|
+
statusTone: r?.tone,
|
|
32
|
+
matches: n(t).map((e) => ({
|
|
33
|
+
matchId: e.id,
|
|
34
|
+
matchedPayableId: e.matched_payable_id
|
|
35
|
+
})),
|
|
36
|
+
removeBy: s(t.status),
|
|
37
|
+
vendorLabel: c(t),
|
|
38
|
+
invoiceNumberLabel: t.document_id ?? "",
|
|
39
|
+
amountLabel: d(t.total_amount ?? t.amount_due, t.currency),
|
|
40
|
+
invoiceDateLabel: e(t.issued_at),
|
|
41
|
+
addedOnLabel: e(t.created_at?.slice(0, 10))
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function p(e) {
|
|
45
|
+
return a(e).map(({ members: e }) => e).filter((e) => e.length > 1).map((e) => ({
|
|
46
|
+
id: e[0].id,
|
|
47
|
+
vendorLabel: e.map(c).find(Boolean) ?? "",
|
|
48
|
+
bills: e.map(f)
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
function m({ enabled: e = !0 } = {}) {
|
|
52
|
+
let t = r({ enabled: e }), n = t.data?.data;
|
|
53
|
+
return {
|
|
54
|
+
groups: l(() => p(n ?? []), [n]),
|
|
55
|
+
isLoading: t.isLoading,
|
|
56
|
+
isError: u(t)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function h({ enabled: e = !0 } = {}) {
|
|
60
|
+
let t = i({
|
|
61
|
+
duplicate_match_status: "suspected",
|
|
62
|
+
limit: 100,
|
|
63
|
+
enabled: e
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
66
|
+
count: t.data?.data?.length ?? 0,
|
|
67
|
+
isCapped: !!t.data?.next_pagination_token,
|
|
68
|
+
isError: u(t),
|
|
69
|
+
isLoading: t.isLoading
|
|
70
|
+
};
|
|
7
71
|
}
|
|
8
72
|
//#endregion
|
|
9
|
-
export {
|
|
73
|
+
export { m as useDuplicateBills, h as useDuplicateBillsCount };
|