@tesouro/embedded-components-react 0.7.45 → 0.7.47
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 +33 -39
- package/dist/lib/CounterpartsWidget.d.ts +33 -22
- package/dist/lib/CounterpartsWidgetPublic.d.ts +33 -22
- package/dist/lib/CustomersWidget.d.ts +31 -22
- package/dist/lib/ReceivablesWidget.d.ts +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +40 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +30 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
- 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 +9 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +7 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +76 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +27 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +2 -76
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +30 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +1 -1
- 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 -30
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +73 -77
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +9 -26
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +44 -44
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +197 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +22 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +10 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +53 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +21 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +8 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +77 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +31 -69
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +17 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +40 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +26 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +35 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +14 -36
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +84 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +487 -80
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +2 -494
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +48 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +62 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +438 -61
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +207 -431
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +20 -222
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +265 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +2 -265
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +131 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +22 -125
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +235 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +3 -240
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +249 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +54 -242
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +221 -51
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +38 -222
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +85 -84
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +238 -241
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index2.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index5.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index6.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index8.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/{bill-pay-widget → shared/document-status}/util/dist/lib/derivePayableStatus.js +23 -10
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/receivableFilledTone.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +0 -18
- 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 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +0 -45
|
@@ -10,10 +10,10 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useWidgetConfig as te } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
11
|
import { useOrganizationUserNames as ne } from "../../../../shared/feature/dist/lib/user/useOrganizationUserNames.js";
|
|
12
12
|
import "../../../../shared/feature/dist/index.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
13
|
+
import { isEditablePayableStatus as re } from "../../../util/dist/lib/isEditablePayableStatus.js";
|
|
14
|
+
import { resolveVendor as ie } from "../../../util/dist/lib/resolveVendor.js";
|
|
15
|
+
import { formatGlCodeLabel as ae, resolveGlCodeAvailability as oe } from "./index13.js";
|
|
16
|
+
import { hasUnpaidBalance as se } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
|
|
17
17
|
import { BillDecisionDialog as r } from "../../../ui/dist/index4.js";
|
|
18
18
|
import "../../../ui/dist/index.js";
|
|
19
19
|
import { BillDialogScreen as ce } from "../../ui/dist/index31.js";
|
|
@@ -60,7 +60,7 @@ function l({ open: l, onOpenChange: u, payableId: d, initialCounterpartId: Ge, r
|
|
|
60
60
|
..._
|
|
61
61
|
}), [_]), Je = d ? void 0 : Ge, [Ye, Xe] = s(Je), [y, Ze] = s(!!Je), [Qe, $e] = s(!1), [b, x] = s(!1), [et, tt] = s(), S = a((e) => {
|
|
62
62
|
tt(() => e);
|
|
63
|
-
}, []), [nt, rt] = s(), C = d ?? nt, w = _e(C, { pollWhileOcrProcessing: !0 }), T = ge(C), { initResponse: E } = te(), it = !!E, at = t(E?.scopes, [n.AccountingConfigReadOrg]), D = ee({ enabled: at }), O = w.data, k = !C || !!O, A = !f && k && !!C && O?.status !== "draft", ot = !f && !!O && !
|
|
63
|
+
}, []), [nt, rt] = s(), C = d ?? nt, w = _e(C, { pollWhileOcrProcessing: !0 }), T = ge(C), { initResponse: E } = te(), it = !!E, at = t(E?.scopes, [n.AccountingConfigReadOrg]), D = ee({ enabled: at }), O = w.data, k = !C || !!O, A = !f && k && !!C && O?.status !== "draft", ot = !f && !!O && !re(O?.status), j = f || ot, M = ye({
|
|
64
64
|
payable: O,
|
|
65
65
|
lineItems: T.lineItems,
|
|
66
66
|
labels: v
|
|
@@ -78,7 +78,7 @@ function l({ open: l, onOpenChange: u, payableId: d, initialCounterpartId: Ge, r
|
|
|
78
78
|
hasScheduledPayment: P.hasScheduledPayment,
|
|
79
79
|
scheduledDate: P.scheduledDate,
|
|
80
80
|
labels: g.scheduledRelativeDay
|
|
81
|
-
}), I = Ce(E?.scopes), ct = t(E?.scopes, [n.PayableWriteOrg]), lt = t(E?.scopes, [n.CounterpartWriteOrg]) && ct, L = lt &&
|
|
81
|
+
}), I = Ce(E?.scopes), ct = t(E?.scopes, [n.PayableWriteOrg]), lt = t(E?.scopes, [n.CounterpartWriteOrg]) && ct, L = lt && se(O?.status) && !P.hasScheduledPayment && !P.isResolving, ut = L && I, dt = L || lt && O?.status === "rejected", ft = !f && k && (!C || O?.status === "draft") && !P.hasScheduledPayment && !P.isResolving, R = Re({
|
|
82
82
|
payableId: C,
|
|
83
83
|
counterpartId: f ? N : Ye,
|
|
84
84
|
payableCounterpartId: N,
|
|
@@ -129,7 +129,7 @@ function l({ open: l, onOpenChange: u, payableId: d, initialCounterpartId: Ge, r
|
|
|
129
129
|
}), vt = !!(V.isSavingDraft || V.isFinalizing || R.isVendorSavePending), H = f ? C : void 0, U = Oe({
|
|
130
130
|
payableId: H,
|
|
131
131
|
status: O?.status
|
|
132
|
-
}), W = Ve(null), [yt, bt] = s(!1), xt =
|
|
132
|
+
}), W = Ve(null), [yt, bt] = s(!1), xt = ie(O), G = Le({
|
|
133
133
|
counterpartId: f ? N : void 0,
|
|
134
134
|
currency: O?.currency,
|
|
135
135
|
currentBankAccountId: f ? O?.counterpart_bank_account_id ?? void 0 : void 0,
|
|
@@ -204,8 +204,8 @@ function l({ open: l, onOpenChange: u, payableId: d, initialCounterpartId: Ge, r
|
|
|
204
204
|
Pt
|
|
205
205
|
]), J = o(() => (D.data?.data ?? []).map((e) => ({
|
|
206
206
|
value: e.id,
|
|
207
|
-
label:
|
|
208
|
-
})), [D.data]), { unavailableMessage: It, disabled: Lt, rosterAvailable: Rt } =
|
|
207
|
+
label: ae(e)
|
|
208
|
+
})), [D.data]), { unavailableMessage: It, disabled: Lt, rosterAvailable: Rt } = oe({
|
|
209
209
|
isInitResolved: it,
|
|
210
210
|
canReadGlCodes: at,
|
|
211
211
|
isResolving: D.isResolving,
|
|
@@ -6,13 +6,13 @@ import { toast as e } from "../../../../../../packages/shared-ui-shadcn/dist/ind
|
|
|
6
6
|
import { formatCalendarDate as t } from "../../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
7
7
|
import { formatMoneyExact as n } from "../../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
8
8
|
import "../../../../shared/ui/dist/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
9
|
+
import { DuplicateVerdict as r } from "../../../util/dist/lib/duplicateVerdict.js";
|
|
10
|
+
import { suspectedPayableDuplicates as i } from "../../../util/dist/lib/payableDuplicates.js";
|
|
11
|
+
import { duplicateVerdictMatches as a, groupSuspectedDuplicates as o, resolveDuplicateOriginalId as s } from "../../../util/dist/lib/groupDuplicates.js";
|
|
12
|
+
import { isEditablePayableStatus as c } from "../../../util/dist/lib/isEditablePayableStatus.js";
|
|
13
|
+
import { payableRemoval as l } from "../../../util/dist/lib/payableRemoval.js";
|
|
14
|
+
import { resolveVendorName as u } from "../../../util/dist/lib/resolveVendor.js";
|
|
15
|
+
import { derivePayableStatus as d } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
|
|
16
16
|
import { useApplyDuplicateVerdictsMutation as f } from "../../../data-access/dist/lib/useApplyDuplicateVerdictsMutation.js";
|
|
17
17
|
import "../../../data-access/dist/index.js";
|
|
18
18
|
import { usePayablesByIdsQueries as p } from "../../data-access/dist/index22.js";
|
|
@@ -24,14 +24,14 @@ import { BanIcon as y, FileCheckIcon as b, Trash2Icon as x } from "lucide-react"
|
|
|
24
24
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js
|
|
25
25
|
var S = 5;
|
|
26
26
|
function C(e, t) {
|
|
27
|
-
return t ?
|
|
27
|
+
return t ? o(e).map(({ members: e }) => e).find((e) => e.some((e) => e.id === t)) ?? [] : [];
|
|
28
28
|
}
|
|
29
|
-
function w({ payable:
|
|
29
|
+
function w({ payable: o, canManage: w = !0, onRemoved: T, onOpenPayable: E, labels: D }) {
|
|
30
30
|
let O = _(() => ({
|
|
31
31
|
...h,
|
|
32
32
|
...D
|
|
33
|
-
}), [D]), k =
|
|
34
|
-
let s =
|
|
33
|
+
}), [D]), k = i(o), [A] = k, j = o?.id, M = _(() => [...new Set(k.map((e) => e.matched_payable_id))], [k]), N = p(M, { enabled: !!(A && j) }), P = f(), [F, I] = v(!1), [L, R] = v(), [z, B] = v(), V = l(o?.status), H = g(async (t, n, r, i, o) => {
|
|
34
|
+
let s = a(t, n, o);
|
|
35
35
|
if (s.length && t?.id) try {
|
|
36
36
|
await P.mutateAsync({
|
|
37
37
|
verdict: n,
|
|
@@ -39,13 +39,13 @@ function w({ payable: s, canManage: w = !0, onRemoved: T, onOpenPayable: E, labe
|
|
|
39
39
|
payableId: t.id,
|
|
40
40
|
duplicateId: e.id,
|
|
41
41
|
matchedPayableId: e.matched_payable_id,
|
|
42
|
-
removeBy:
|
|
42
|
+
removeBy: l(t.status)
|
|
43
43
|
}))
|
|
44
44
|
}), e.success(r), i?.();
|
|
45
45
|
} catch {
|
|
46
46
|
e.error(O.verdictFailedToast);
|
|
47
47
|
}
|
|
48
|
-
}, [P, O]), U = g((e, t, n) => H(
|
|
48
|
+
}, [P, O]), U = g((e, t, n) => H(o, e, t, n), [H, o]), W = V === "delete" ? {
|
|
49
49
|
button: O.deleteBillButton,
|
|
50
50
|
title: O.deleteConfirmTitle,
|
|
51
51
|
description: O.deleteConfirmDescription,
|
|
@@ -67,7 +67,7 @@ function w({ payable: s, canManage: w = !0, onRemoved: T, onOpenPayable: E, labe
|
|
|
67
67
|
backButton: O.cancelConfirmBackButton,
|
|
68
68
|
toast: O.cancelledToast
|
|
69
69
|
}, G = g(async () => {
|
|
70
|
-
await U(
|
|
70
|
+
await U(r.Remove, W.toast, T), I(!1);
|
|
71
71
|
}, [
|
|
72
72
|
U,
|
|
73
73
|
T,
|
|
@@ -98,7 +98,7 @@ function w({ payable: s, canManage: w = !0, onRemoved: T, onOpenPayable: E, labe
|
|
|
98
98
|
toast: O.confirmedToast
|
|
99
99
|
}
|
|
100
100
|
}), [O]), q = K[L?.removeBy ?? "cancel"], J = g(async () => {
|
|
101
|
-
L && (await H(L.payable,
|
|
101
|
+
L && (await H(L.payable, r.Remove, K[L.removeBy].toast, L.payable.id === j ? T : void 0), R(void 0));
|
|
102
102
|
}, [
|
|
103
103
|
H,
|
|
104
104
|
T,
|
|
@@ -106,39 +106,39 @@ function w({ payable: s, canManage: w = !0, onRemoved: T, onOpenPayable: E, labe
|
|
|
106
106
|
L,
|
|
107
107
|
K
|
|
108
108
|
]), Y = g(async () => {
|
|
109
|
-
z && (await H(z.payable,
|
|
109
|
+
z && (await H(z.payable, r.Keep, O.dismissedToast, void 0, z.originalPayableId), B(void 0));
|
|
110
110
|
}, [
|
|
111
111
|
H,
|
|
112
112
|
O.dismissedToast,
|
|
113
113
|
z
|
|
114
114
|
]), X = w && !!(A && j), Z = X && !!V, Q = _(() => {
|
|
115
115
|
let e = new Map(N.flatMap((e) => e.data ? [[e.data.id, e.data]] : []));
|
|
116
|
-
|
|
117
|
-
let
|
|
118
|
-
if (
|
|
119
|
-
let
|
|
116
|
+
o?.id && e.set(o.id, o);
|
|
117
|
+
let r = C([...e.values()], j);
|
|
118
|
+
if (r.length < 2) return [];
|
|
119
|
+
let a = s(r), f = (e) => {
|
|
120
120
|
let t = e.total_amount ?? e.amount_due;
|
|
121
121
|
return t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" });
|
|
122
122
|
};
|
|
123
|
-
return
|
|
124
|
-
let n = e.status ?
|
|
123
|
+
return r.map((e) => {
|
|
124
|
+
let n = e.status ? d({
|
|
125
125
|
apiStatus: e.status,
|
|
126
126
|
dueDate: e.due_date,
|
|
127
127
|
scheduledPaymentDate: e.scheduled_payment_date
|
|
128
|
-
}) : void 0,
|
|
128
|
+
}) : void 0, r = e.id === a, o = e.id === j, s = w && i(e).length > 0, p = u(e), m = l(e.status);
|
|
129
129
|
return {
|
|
130
130
|
id: e.id,
|
|
131
131
|
roleLabel: p,
|
|
132
|
-
badges: [...
|
|
132
|
+
badges: [...r ? [O.originalBillBadge] : [], ...o ? [O.currentBillBadge] : []],
|
|
133
133
|
invoiceNumberLabel: e.document_id ?? "",
|
|
134
|
-
roleTone:
|
|
134
|
+
roleTone: r ? void 0 : "warning",
|
|
135
135
|
amountLabel: f(e),
|
|
136
136
|
addedOnLabel: t(e.created_at?.slice(0, 10)),
|
|
137
137
|
dueDateLabel: t(e.due_date),
|
|
138
138
|
status: n?.status,
|
|
139
139
|
statusTone: n?.tone,
|
|
140
|
-
onOpen: !
|
|
141
|
-
menu:
|
|
140
|
+
onOpen: !o && E ? () => E(e.id, c(e.status ?? void 0)) : void 0,
|
|
141
|
+
menu: s ? {
|
|
142
142
|
triggerLabel: O.openRow({
|
|
143
143
|
vendorLabel: p,
|
|
144
144
|
invoiceNumberLabel: "",
|
|
@@ -151,7 +151,7 @@ function w({ payable: s, canManage: w = !0, onRemoved: T, onOpenPayable: E, labe
|
|
|
151
151
|
disabled: P.isPending,
|
|
152
152
|
onSelect: () => B({
|
|
153
153
|
payable: e,
|
|
154
|
-
originalPayableId:
|
|
154
|
+
originalPayableId: r ? void 0 : a
|
|
155
155
|
})
|
|
156
156
|
}, ...m ? [{
|
|
157
157
|
id: "cancel-duplicate",
|
|
@@ -172,13 +172,13 @@ function w({ payable: s, canManage: w = !0, onRemoved: T, onOpenPayable: E, labe
|
|
|
172
172
|
N,
|
|
173
173
|
O,
|
|
174
174
|
E,
|
|
175
|
-
|
|
175
|
+
o,
|
|
176
176
|
j,
|
|
177
177
|
K
|
|
178
178
|
]);
|
|
179
179
|
return {
|
|
180
180
|
isPossibleDuplicate: !!A,
|
|
181
|
-
onNotADuplicate: X ? () => B({ payable:
|
|
181
|
+
onNotADuplicate: X ? () => B({ payable: o }) : void 0,
|
|
182
182
|
onRemoveBill: Z ? () => I(!0) : void 0,
|
|
183
183
|
removeBillLabel: Z ? W.button : void 0,
|
|
184
184
|
removeConfirmation: {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js
CHANGED
|
@@ -3,8 +3,9 @@ import { APPROVAL_POLICY_CARD_LABELS_EN as r } from "./index2.js";
|
|
|
3
3
|
import "./index4.js";
|
|
4
4
|
import { VENDOR_SUMMARY_CARD_LABELS_EN as i } from "./index11.js";
|
|
5
5
|
import "./index13.js";
|
|
6
|
-
import { BILL_STATUS_BADGE_LABELS_EN as a } from "
|
|
7
|
-
import
|
|
6
|
+
import { BILL_STATUS_BADGE_LABELS_EN as a } from "../../../../shared/document-status/ui/dist/index2.js";
|
|
7
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
8
|
+
import { DUE_DATE_VALUE_LABELS_EN as o } from "../../../ui/dist/index17.js";
|
|
8
9
|
import "../../../ui/dist/index.js";
|
|
9
10
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js
|
|
10
11
|
var s = {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js
CHANGED
|
@@ -9,9 +9,10 @@ import { PaymentHistoryList as u } from "./index8.js";
|
|
|
9
9
|
import "./index9.js";
|
|
10
10
|
import { VendorSummaryCard as d } from "./index12.js";
|
|
11
11
|
import "./index13.js";
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
12
|
+
import { BillStatusBadge as f } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
13
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
14
|
+
import { BillActionButtons as p, NO_BILL_ACTIONS as m } from "../../../ui/dist/index2.js";
|
|
15
|
+
import { DueDateValue as h } from "../../../ui/dist/index18.js";
|
|
15
16
|
import "../../../ui/dist/index.js";
|
|
16
17
|
import { mergeBillDetailBodyLabels as g } from "./index14.js";
|
|
17
18
|
import { ScheduledSummaryBadge as _ } from "./index5.js";
|
|
@@ -20,7 +21,7 @@ import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
|
20
21
|
import { AlertTriangle as x } from "lucide-react";
|
|
21
22
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js
|
|
22
23
|
var S = "ttw:text-base ttw:font-semibold", C = "ttw:px-3 ttw:py-2", w = "ttw:py-2 ttw:pr-3", T = "ttw:flex ttw:items-start ttw:gap-4 ttw:py-2.5", E = "ttw:w-[140px] ttw:shrink-0 ttw:text-sm ttw:font-medium ttw:text-muted-foreground";
|
|
23
|
-
function D({ view: D, actions: O =
|
|
24
|
+
function D({ view: D, actions: O = m, scheduledSummary: k, scheduledSummaryDate: A, scheduledStatusLabel: j, showApprovalOverrideNotice: M, awaitingApprovalNotice: N, payTo: P, paymentHistoryError: F, paymentHistoryLoading: I, historyError: L, historyLoading: R, historyNamesError: z, isLoading: B, isError: V, labels: H }) {
|
|
24
25
|
let U = v(() => g(H), [H]), W = v(() => ({
|
|
25
26
|
...U.payToCard,
|
|
26
27
|
payToHeading: D?.paidOnLabel ? U.payToHeadingPaid : U.payToHeading,
|
|
@@ -105,7 +106,7 @@ function D({ view: D, actions: O = p, scheduledSummary: k, scheduledSummaryDate:
|
|
|
105
106
|
}) : k ? /* @__PURE__ */ y(_, {
|
|
106
107
|
summary: k,
|
|
107
108
|
date: A
|
|
108
|
-
}) : /* @__PURE__ */ y(
|
|
109
|
+
}) : /* @__PURE__ */ y(f, {
|
|
109
110
|
status: D.status,
|
|
110
111
|
tone: D.statusTone,
|
|
111
112
|
labels: G
|
|
@@ -146,7 +147,7 @@ function D({ view: D, actions: O = p, scheduledSummary: k, scheduledSummaryDate:
|
|
|
146
147
|
}) : null,
|
|
147
148
|
!k && O.row.length ? /* @__PURE__ */ y("div", {
|
|
148
149
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
|
|
149
|
-
children: /* @__PURE__ */ y(
|
|
150
|
+
children: /* @__PURE__ */ y(p, { actions: O.row })
|
|
150
151
|
}) : null
|
|
151
152
|
]
|
|
152
153
|
}),
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { APPROVAL_POLICY_CARD_LABELS_EN as e } from "./index2.js";
|
|
2
2
|
import "./index4.js";
|
|
3
|
-
import { BILL_STATUS_BADGE_LABELS_EN as t } from "
|
|
4
|
-
import
|
|
3
|
+
import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../../../shared/document-status/ui/dist/index2.js";
|
|
4
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
5
|
+
import { DUE_DATE_VALUE_LABELS_EN as n } from "../../../ui/dist/index17.js";
|
|
5
6
|
import "../../../ui/dist/index.js";
|
|
6
7
|
import { BILL_AUDIT_HISTORY_SECTION_LABELS_EN as r } from "./index14.js";
|
|
7
8
|
import "./index16.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js
CHANGED
|
@@ -5,10 +5,11 @@ import { BillRejectionNotice as f } from "./index6.js";
|
|
|
5
5
|
import "./index7.js";
|
|
6
6
|
import { PaymentHistoryList as p } from "./index8.js";
|
|
7
7
|
import "./index9.js";
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { BillStatusBadge as m } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
9
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
10
|
+
import { BillActionButtons as h, NO_BILL_ACTIONS as g } from "../../../ui/dist/index2.js";
|
|
11
|
+
import { BillOverflowMenu as _ } from "../../../ui/dist/index7.js";
|
|
12
|
+
import { DueDateValue as v } from "../../../ui/dist/index18.js";
|
|
12
13
|
import "../../../ui/dist/index.js";
|
|
13
14
|
import { ScheduledSummaryBadge as y } from "./index5.js";
|
|
14
15
|
import { BILL_DETAILS_SHEET_LABELS_EN as b } from "./index33.js";
|
|
@@ -36,7 +37,7 @@ function E({ items: e }) {
|
|
|
36
37
|
}, e.label))
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
|
-
function D({ open: D, onOpenChange: O, details: k, actions: A =
|
|
40
|
+
function D({ open: D, onOpenChange: O, details: k, actions: A = g, approvalPolicy: j, showApprovalOverrideNotice: M, awaitingApprovalNotice: N, scheduledSummary: P, scheduledSummaryDate: F, paymentHistory: I, paymentHistoryError: L, paymentHistoryLoading: R, auditHistory: z, auditHistoryError: B, auditHistoryLoading: V, auditHistoryNamesError: H, isLoading: U, isError: W, notice: G, onClose: K, onExpand: q, testId: J, labels: Y }) {
|
|
40
41
|
let X = {
|
|
41
42
|
...b,
|
|
42
43
|
...Y,
|
|
@@ -98,7 +99,7 @@ function D({ open: D, onOpenChange: O, details: k, actions: A = h, approvalPolic
|
|
|
98
99
|
onClick: q,
|
|
99
100
|
children: /* @__PURE__ */ S(w, { className: "ttw:size-4" })
|
|
100
101
|
}) : null,
|
|
101
|
-
k && !U && !W ? /* @__PURE__ */ S(
|
|
102
|
+
k && !U && !W ? /* @__PURE__ */ S(_, {
|
|
102
103
|
actions: A.menu,
|
|
103
104
|
triggerLabel: X.overflowMenuTrigger,
|
|
104
105
|
placement: "header"
|
|
@@ -169,7 +170,7 @@ function D({ open: D, onOpenChange: O, details: k, actions: A = h, approvalPolic
|
|
|
169
170
|
}) : P ? /* @__PURE__ */ S(y, {
|
|
170
171
|
summary: P,
|
|
171
172
|
date: F
|
|
172
|
-
}) : /* @__PURE__ */ S(
|
|
173
|
+
}) : /* @__PURE__ */ S(m, {
|
|
173
174
|
status: k.status,
|
|
174
175
|
tone: k.statusTone,
|
|
175
176
|
labels: X.statusBadge
|
|
@@ -211,7 +212,7 @@ function D({ open: D, onOpenChange: O, details: k, actions: A = h, approvalPolic
|
|
|
211
212
|
}) : null,
|
|
212
213
|
A.row.length ? /* @__PURE__ */ S("div", {
|
|
213
214
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
214
|
-
children: /* @__PURE__ */ S(
|
|
215
|
+
children: /* @__PURE__ */ S(h, { actions: A.row })
|
|
215
216
|
}) : null
|
|
216
217
|
]
|
|
217
218
|
}),
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Alert as e, AlertTitle as t, Badge as n, Button as r, cn as i } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { BillStatusBadge as a } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
3
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
4
|
+
import { BillOverflowMenu as o } from "../../../ui/dist/index7.js";
|
|
4
5
|
import "../../../ui/dist/index.js";
|
|
5
6
|
import { BILL_DUPLICATE_NOTICE_LABELS_EN as s } from "./index36.js";
|
|
6
7
|
import { useState as c } from "react";
|
|
@@ -101,7 +102,7 @@ function g({ onNotADuplicate: g, onRemoveBill: _, onOpenFullScreen: v, isActionD
|
|
|
101
102
|
}),
|
|
102
103
|
/* @__PURE__ */ l("span", {
|
|
103
104
|
className: "ttw:px-3 ttw:py-2",
|
|
104
|
-
children: e.status ? /* @__PURE__ */ l(
|
|
105
|
+
children: e.status ? /* @__PURE__ */ l(a, {
|
|
105
106
|
status: e.status,
|
|
106
107
|
tone: e.statusTone ?? "neutral"
|
|
107
108
|
}) : null
|
|
@@ -109,7 +110,7 @@ function g({ onNotADuplicate: g, onRemoveBill: _, onOpenFullScreen: v, isActionD
|
|
|
109
110
|
]
|
|
110
111
|
}), /* @__PURE__ */ l("div", {
|
|
111
112
|
className: "ttw:flex ttw:justify-end ttw:px-1 ttw:py-2",
|
|
112
|
-
children: e.menu ? /* @__PURE__ */ l(
|
|
113
|
+
children: e.menu ? /* @__PURE__ */ l(o, {
|
|
113
114
|
actions: e.menu.items.map((e) => ({
|
|
114
115
|
...e,
|
|
115
116
|
variant: "ghost"
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "../../../ui/dist/
|
|
1
|
+
import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "../../../ui/dist/index12.js";
|
|
2
2
|
import "../../../ui/dist/index.js";
|
|
3
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js
|
|
4
4
|
var t = {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Button as e, Skeleton as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { BillUploadDropzone as n } from "../../../ui/dist/
|
|
2
|
+
import { BillUploadDropzone as n } from "../../../ui/dist/index13.js";
|
|
3
3
|
import "../../../ui/dist/index.js";
|
|
4
4
|
import { SOURCE_DOCUMENT_PANEL_LABELS_EN as r } from "./index48.js";
|
|
5
5
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Badge as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { BILL_STATUS_TONE_CLASS_NAME as t } from "../../../../shared/document-status/ui/dist/index3.js";
|
|
3
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
4
|
+
import { DateDisclosure as n } from "../../../ui/dist/index16.js";
|
|
4
5
|
import "../../../ui/dist/index.js";
|
|
5
6
|
import { jsx as r } from "react/jsx-runtime";
|
|
6
7
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js
|
|
@@ -9,14 +9,14 @@ import { useEmbedApi as r } from "../../../../shared/data-access/dist/lib/EmbedA
|
|
|
9
9
|
import "../../../../shared/ui/dist/index.js";
|
|
10
10
|
import { useLocalCalendarDay as i } from "../../../../shared/feature/dist/lib/calendar/useLocalCalendarDay.js";
|
|
11
11
|
import "../../../../shared/feature/dist/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { compareByArrival as u, duplicateVerdictMatches as d, resolveDuplicateOriginalId as f } from "../../../util/dist/lib/groupDuplicates.js";
|
|
12
|
+
import { DuplicateVerdict as a } from "../../../util/dist/lib/duplicateVerdict.js";
|
|
13
|
+
import { formatScheduledDateLabel as o } from "../../../util/dist/lib/formatScheduledDateLabel.js";
|
|
14
|
+
import { hasSuspectedPayableDuplicate as s, suspectedPayableDuplicates as c } from "../../../util/dist/lib/payableDuplicates.js";
|
|
15
|
+
import { compareByArrival as l, duplicateVerdictMatches as u, resolveDuplicateOriginalId as d } from "../../../util/dist/lib/groupDuplicates.js";
|
|
17
16
|
import { isEditablePayableStatus as ee } from "../../../util/dist/lib/isEditablePayableStatus.js";
|
|
18
|
-
import { payableRemoval as
|
|
19
|
-
import { resolveVendorName as
|
|
17
|
+
import { payableRemoval as f } from "../../../util/dist/lib/payableRemoval.js";
|
|
18
|
+
import { resolveVendorName as te } from "../../../util/dist/lib/resolveVendor.js";
|
|
19
|
+
import { derivePayableStatus as ne } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
|
|
20
20
|
import { useApplyDuplicateVerdictsMutation as p } from "../../../data-access/dist/lib/useApplyDuplicateVerdictsMutation.js";
|
|
21
21
|
import "../../../data-access/dist/index.js";
|
|
22
22
|
import { BillColumn as m } from "../../ui/dist/index19.js";
|
|
@@ -46,7 +46,7 @@ function xe(e, t) {
|
|
|
46
46
|
i(e), i(t), r.get(e)?.add(t), r.get(t)?.add(e);
|
|
47
47
|
};
|
|
48
48
|
for (let t of e) {
|
|
49
|
-
let e =
|
|
49
|
+
let e = c(t);
|
|
50
50
|
if (e.length !== 0) {
|
|
51
51
|
i(t.id);
|
|
52
52
|
for (let n of e) a(t.id, n.matched_payable_id);
|
|
@@ -62,20 +62,20 @@ function xe(e, t) {
|
|
|
62
62
|
for (let t of r.get(e) ?? []) s.has(t) || (s.add(t), a.push(t));
|
|
63
63
|
}
|
|
64
64
|
if (i.length === 0) continue;
|
|
65
|
-
let c = i.map((e) => n.get(e)).filter((e) => !!e).sort(
|
|
65
|
+
let c = i.map((e) => n.get(e)).filter((e) => !!e).sort(l), u = d(c), [ee] = c, f = {
|
|
66
66
|
key: `duplicate-group:${[...i].sort().join(":")}`,
|
|
67
67
|
headerLabel: t.groupHeader({
|
|
68
|
-
vendorLabel:
|
|
69
|
-
invoiceNumberLabel:
|
|
68
|
+
vendorLabel: te(ee),
|
|
69
|
+
invoiceNumberLabel: ee?.document_id ?? ""
|
|
70
70
|
}),
|
|
71
71
|
memberCount: i.length,
|
|
72
|
-
originalPayableId:
|
|
72
|
+
originalPayableId: u
|
|
73
73
|
};
|
|
74
|
-
for (let e of i) o.set(e,
|
|
74
|
+
for (let e of i) o.set(e, f);
|
|
75
75
|
}
|
|
76
76
|
return o;
|
|
77
77
|
}
|
|
78
|
-
function w({ enabled:
|
|
78
|
+
function w({ enabled: c = !0, canReadVendors: l = !0, isVendorFilterPaused: d = !1, filterLabels: ue, onOpenBill: w, duplicateRowNote: we, attachmentLabel: Te, duplicateGroupLabels: T, canManageDuplicates: Ee = !1, duplicateView: E = C.AllBills, scheduledRelativeDayLabels: De }) {
|
|
79
79
|
let Oe = i(), [D, ke] = x(g), [Ae, je] = x(be), [O, Me] = x(ve), [Ne, k] = x(), [Pe, A] = x(0), [j, M] = x(""), [N, Fe] = x(""), [P, F] = x(), [I, L] = x(), R = v(() => {
|
|
80
80
|
k(void 0), A(0);
|
|
81
81
|
}, []);
|
|
@@ -94,8 +94,8 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
94
94
|
}, [E, R]);
|
|
95
95
|
let z = le({
|
|
96
96
|
offersStatusFilter: D === h.All,
|
|
97
|
-
offersVendorFilter:
|
|
98
|
-
isVendorFilterPaused:
|
|
97
|
+
offersVendorFilter: l,
|
|
98
|
+
isVendorFilterPaused: d,
|
|
99
99
|
labels: ue,
|
|
100
100
|
onFiltersChange: R
|
|
101
101
|
}), { clearAll: Ie, filterByVendor: Le } = z, Re = Ae[0], B = se(Re?.id), ze = B ? Re?.desc ? "desc" : "asc" : void 0, V = E === C.PossibleDuplicates, H = V ? h.All : D, U = b(() => ({
|
|
@@ -119,11 +119,11 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
119
119
|
ze
|
|
120
120
|
]), { organizationId: Be } = r(), W = JSON.stringify([Be, U]), G = pe({
|
|
121
121
|
...U,
|
|
122
|
-
enabled:
|
|
122
|
+
enabled: c && !V,
|
|
123
123
|
pollWhileOcrProcessing: !0
|
|
124
124
|
}), K = fe({
|
|
125
125
|
...U,
|
|
126
|
-
enabled:
|
|
126
|
+
enabled: c && V,
|
|
127
127
|
maxPages: ye
|
|
128
128
|
}), q = V ? {
|
|
129
129
|
...K,
|
|
@@ -131,7 +131,7 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
131
131
|
isLoading: K.isResolving,
|
|
132
132
|
isFetching: K.isFetching || K.isResolving
|
|
133
133
|
} : G, J = (q.data?.data ?? []).filter((e) => e.ocr_status !== "processing"), Y = p(), X = v(async (t, n, r, i) => {
|
|
134
|
-
let a =
|
|
134
|
+
let a = u(t, n, i);
|
|
135
135
|
if (a.length) try {
|
|
136
136
|
await Y.mutateAsync({
|
|
137
137
|
verdict: n,
|
|
@@ -139,7 +139,7 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
139
139
|
payableId: t.id,
|
|
140
140
|
duplicateId: e.id,
|
|
141
141
|
matchedPayableId: e.matched_payable_id,
|
|
142
|
-
removeBy:
|
|
142
|
+
removeBy: f(t.status)
|
|
143
143
|
}))
|
|
144
144
|
}), e.success(r);
|
|
145
145
|
} catch {
|
|
@@ -171,13 +171,13 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
171
171
|
toast: T.confirmedToast
|
|
172
172
|
}
|
|
173
173
|
}), [T]), Ve = P?.removeBy ?? "cancel", He = v(async () => {
|
|
174
|
-
P && (await X(P.payable,
|
|
174
|
+
P && (await X(P.payable, a.Remove, Z[P.removeBy].toast), F(void 0));
|
|
175
175
|
}, [
|
|
176
176
|
X,
|
|
177
177
|
P,
|
|
178
178
|
Z
|
|
179
179
|
]), Ue = v(async () => {
|
|
180
|
-
I && (await X(I.payable,
|
|
180
|
+
I && (await X(I.payable, a.Keep, T.dismissedToast, I.originalPayableId), L(void 0));
|
|
181
181
|
}, [
|
|
182
182
|
X,
|
|
183
183
|
T.dismissedToast,
|
|
@@ -186,7 +186,7 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
186
186
|
y(() => {
|
|
187
187
|
q.isFetching || Ge(W);
|
|
188
188
|
}, [q.isFetching, W]);
|
|
189
|
-
let Ke = q.data?.data.length, qe = Ke === 0, Je = me({ enabled:
|
|
189
|
+
let Ke = q.data?.data.length, qe = Ke === 0, Je = me({ enabled: c && qe }), Ye = !qe || (Je.data?.count ?? 1) > 0, Q = b(() => E === C.PossibleDuplicates ? xe(J, T) : /* @__PURE__ */ new Map(), [
|
|
190
190
|
E,
|
|
191
191
|
J,
|
|
192
192
|
T
|
|
@@ -202,15 +202,15 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
202
202
|
})).sort((e, t) => e.order - t.order).map(({ payable: e }) => e);
|
|
203
203
|
}, [J, Q]), { vendorNames: Ze, lookup: Qe } = de({
|
|
204
204
|
payables: q.data?.data,
|
|
205
|
-
enabled:
|
|
206
|
-
canReadVendors:
|
|
207
|
-
isPaused:
|
|
205
|
+
enabled: c,
|
|
206
|
+
canReadVendors: l,
|
|
207
|
+
isPaused: d
|
|
208
208
|
}), $e = b(() => Xe.map((e) => {
|
|
209
|
-
let r =
|
|
209
|
+
let r = ne({
|
|
210
210
|
apiStatus: e.status,
|
|
211
211
|
dueDate: e.due_date,
|
|
212
212
|
scheduledPaymentDate: e.scheduled_payment_date
|
|
213
|
-
}), i = e.amount_due ?? e.total_amount,
|
|
213
|
+
}), i = e.amount_due ?? e.total_amount, a = e.status === "partially_paid" || e.status === "paid", c = (t) => t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" }), l = o(e.scheduled_payment_date, De, Oe), u = Q.get(e.id), d = s(e), p = te(e) || (e.counterpart_id ? Ze.get(e.counterpart_id) ?? "" : ""), m = e.document_id ?? "", g = f(e.status), _ = u?.originalPayableId !== void 0 && u.originalPayableId === e.id, re = V && d && Ee && u ? {
|
|
214
214
|
triggerLabel: T.menuTrigger({
|
|
215
215
|
vendorLabel: p,
|
|
216
216
|
invoiceNumberLabel: m
|
|
@@ -222,7 +222,7 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
222
222
|
disabled: Y.isPending,
|
|
223
223
|
onSelect: () => L({
|
|
224
224
|
payable: e,
|
|
225
|
-
originalPayableId: _ ? void 0 :
|
|
225
|
+
originalPayableId: _ ? void 0 : u.originalPayableId
|
|
226
226
|
})
|
|
227
227
|
}, ...g ? [{
|
|
228
228
|
id: "cancel-duplicate",
|
|
@@ -243,31 +243,31 @@ function w({ enabled: l = !0, canReadVendors: u = !0, isVendorFilterPaused: f =
|
|
|
243
243
|
issueDateLabel: t(e.issued_at),
|
|
244
244
|
dueDateLabel: t(e.due_date),
|
|
245
245
|
dueDateTone: r.isOverdue ? "danger" : "default",
|
|
246
|
-
scheduledDateLabel:
|
|
247
|
-
scheduledDateExact:
|
|
246
|
+
scheduledDateLabel: l.label,
|
|
247
|
+
scheduledDateExact: l.absoluteLabel,
|
|
248
248
|
scheduledDateIsGap: H === h.Scheduled,
|
|
249
249
|
paidDateLabel: t(e.paid_at?.slice(0, 10)),
|
|
250
|
-
amountDueLabel:
|
|
251
|
-
amountPaidLabel:
|
|
250
|
+
amountDueLabel: c(i),
|
|
251
|
+
amountPaidLabel: a ? c(e.amount_paid) : "",
|
|
252
252
|
amountPaidIsGap: H === h.Paid,
|
|
253
|
-
amountScheduledLabel:
|
|
254
|
-
totalAmountLabel:
|
|
253
|
+
amountScheduledLabel: c(e.amount_to_pay ?? i),
|
|
254
|
+
totalAmountLabel: c(e.total_amount),
|
|
255
255
|
attachment: e.file_id ? { label: Te } : void 0,
|
|
256
256
|
status: r.status,
|
|
257
257
|
statusTone: r.tone,
|
|
258
258
|
addedOnLabel: t(e.created_at?.slice(0, 10)),
|
|
259
|
-
...
|
|
259
|
+
...u ? {
|
|
260
260
|
group: {
|
|
261
|
-
key:
|
|
262
|
-
headerLabel:
|
|
263
|
-
memberCount:
|
|
261
|
+
key: u.key,
|
|
262
|
+
headerLabel: u.headerLabel,
|
|
263
|
+
memberCount: u.memberCount
|
|
264
264
|
},
|
|
265
265
|
groupedRowLabel: p,
|
|
266
266
|
groupedRowLabelTone: void 0,
|
|
267
267
|
groupedRowBadge: _ ? T.originalBill : void 0
|
|
268
268
|
} : {},
|
|
269
269
|
...re ? { menu: re } : {},
|
|
270
|
-
...!V && !
|
|
270
|
+
...!V && !u && d ? {
|
|
271
271
|
rowTone: "warning",
|
|
272
272
|
rowNote: we
|
|
273
273
|
} : {},
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DATA_TABLE_LABELS_EN as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { BILL_STATUS_BADGE_LABELS_EN as t } from "
|
|
3
|
-
import
|
|
2
|
+
import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../../../shared/document-status/ui/dist/index2.js";
|
|
3
|
+
import "../../../../shared/document-status/ui/dist/index.js";
|
|
4
|
+
import { DUE_DATE_VALUE_LABELS_EN as n } from "../../../ui/dist/index17.js";
|
|
4
5
|
import "../../../ui/dist/index.js";
|
|
5
6
|
import { ADD_BILL_PANEL_LABELS_EN as r } from "./index2.js";
|
|
6
7
|
import "./index4.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "../../../ui/dist/
|
|
1
|
+
import { BILL_UPLOAD_DROPZONE_LABELS_EN as e } from "../../../ui/dist/index12.js";
|
|
2
2
|
import "../../../ui/dist/index.js";
|
|
3
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js
|
|
4
4
|
var t = {
|