@tesouro/embedded-components-react 0.4.20 → 0.4.22
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.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +64 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +38 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +104 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +87 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +7 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +17 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +23 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +66 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +2 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +74 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +3 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +30 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +37 -166
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +164 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +48 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +47 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +8 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +18 -125
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +135 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +4 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +39 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +79 -84
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +5 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +95 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +47 -119
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +119 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +33 -177
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +186 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +22 -232
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +223 -204
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +202 -103
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +121 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +25 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +47 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +27 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +198 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +30 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +240 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +19 -383
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +416 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +4 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +35 -189
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +21 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +214 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +10 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +112 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +3 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +124 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +58 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +43 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +239 -101
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +107 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +209 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +5 -70
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +44 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +170 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +12 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +108 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +52 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +21 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +11 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +2 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +2 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +32 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +1 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +26 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +20 -152
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +154 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +1 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +61 -253
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +258 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +2 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +7 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +49 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +15 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +50 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +21 -338
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +340 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +9 -97
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +96 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +11 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +58 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +1 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +52 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +10 -179
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +181 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +5 -90
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +92 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +1 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +86 -298
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +299 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +6 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +39 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +30 -195
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +36 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +10 -345
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +199 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +15 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +347 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +7 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +91 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +123 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +26 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +94 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +5 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +5 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +10 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +105 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +13 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +74 -119
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +15 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +8 -106
- 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/util/dist/lib/formatRejectionDate.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +0 -94
|
@@ -2,135 +2,28 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import "../../../shared/
|
|
7
|
-
import {
|
|
5
|
+
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
+
import { useCurrentUserQuery as t } from "../../../shared/data-access/dist/lib/useCurrentUserQuery.js";
|
|
7
|
+
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
8
|
+
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
8
10
|
import "../../../shared/feature/dist/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import { useCancelPayableMutation as i, useCancelScheduledPaymentMutation as a, useForceApprovePayableMutation as o, useForceRejectPayableMutation as s, useReopenPayableMutation as c } from "../../data-access/dist/index13.js";
|
|
11
|
+
import { usePayableApprovalRequestsQuery as i } from "../../data-access/dist/index8.js";
|
|
11
12
|
import "../../data-access/dist/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { HandIcon as d } from "lucide-react";
|
|
13
|
+
import { currentApprovalRound as a } from "./index4.js";
|
|
14
|
+
import { usePayableApprovalRoundStart as o } from "./index31.js";
|
|
15
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js
|
|
16
|
-
function
|
|
17
|
-
let { initResponse:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
hasWaitingRequest: _,
|
|
22
|
-
arePendingApproversUnknown: v,
|
|
23
|
-
hasScheduledPayment: y || x,
|
|
24
|
-
scheduledPaymentIntentId: b,
|
|
25
|
-
labels: S
|
|
26
|
-
}) : [], V = (t) => ({
|
|
27
|
-
onError: () => e.error(S.actionError),
|
|
28
|
-
onSuccess: () => {
|
|
29
|
-
e.success(S.actionSuccess[t]), D?.();
|
|
30
|
-
}
|
|
31
|
-
}), H = {
|
|
32
|
-
reject: {
|
|
33
|
-
isPending: k.isPending,
|
|
34
|
-
run: (e) => m && k.mutate({
|
|
35
|
-
path: { approval_request_id: m },
|
|
36
|
-
body: e ? { reject_reason: e } : void 0
|
|
37
|
-
}, V("reject"))
|
|
38
|
-
},
|
|
39
|
-
approve: {
|
|
40
|
-
isPending: A.isPending,
|
|
41
|
-
run: () => m && A.mutate({ path: { approval_request_id: m } }, V("approve"))
|
|
42
|
-
},
|
|
43
|
-
cancel: {
|
|
44
|
-
isPending: j.isPending,
|
|
45
|
-
run: () => d && j.mutate({ path: { payable_id: d } }, V("cancel"))
|
|
46
|
-
},
|
|
47
|
-
cancelScheduledPayment: {
|
|
48
|
-
isPending: M.isPending,
|
|
49
|
-
run: () => {
|
|
50
|
-
let e = z?.scheduledPaymentIntentId;
|
|
51
|
-
!d || !e || M.mutate({
|
|
52
|
-
path: { payment_intent_id: e },
|
|
53
|
-
payableId: d
|
|
54
|
-
}, V("cancelScheduledPayment"));
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
reopen: {
|
|
58
|
-
isPending: N.isPending,
|
|
59
|
-
run: () => d && N.mutate({ path: { payable_id: d } }, V("reopen"))
|
|
60
|
-
},
|
|
61
|
-
forceApprove: {
|
|
62
|
-
isPending: P.isPending,
|
|
63
|
-
run: () => d && P.mutate({ path: { payable_id: d } }, V("forceApprove"))
|
|
64
|
-
},
|
|
65
|
-
forceReject: {
|
|
66
|
-
isPending: F.isPending,
|
|
67
|
-
run: () => d && F.mutate({ path: { payable_id: d } }, V("forceReject"))
|
|
68
|
-
}
|
|
69
|
-
}, U = B.map((e) => ({
|
|
70
|
-
...e,
|
|
71
|
-
disabled: I,
|
|
72
|
-
loading: e.id === "markAsPaid" ? C : H[e.id]?.isPending ?? !1,
|
|
73
|
-
onSelect: () => {
|
|
74
|
-
if (!(I || !d)) {
|
|
75
|
-
if (e.id === "payBill") {
|
|
76
|
-
T();
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (e.id === "markAsPaid") {
|
|
80
|
-
E();
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
if (h(e.id)) {
|
|
84
|
-
R({
|
|
85
|
-
id: e.id,
|
|
86
|
-
scheduledPaymentIntentId: b
|
|
87
|
-
});
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
H[e.id]?.run();
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}));
|
|
16
|
+
function s({ payableId: s, status: c }) {
|
|
17
|
+
let { initResponse: l } = r(), u = e(l?.scopes, [n.ApprovalRequestReadOrg]), d = c === "approve_in_progress" && u, f = i(s, { enabled: d }), p = t({ enabled: d }), { roundStartedAt: m } = o({
|
|
18
|
+
payableId: s,
|
|
19
|
+
enabled: d
|
|
20
|
+
}), h = p.data?.id, g = d ? a(f.data?.data, m) : [], _ = (e) => e.caller_is_policy_approver ?? !!(h && e.user_ids.includes(h)), v = g.some(_), y = g.filter((e) => e.status === "waiting");
|
|
94
21
|
return {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
decisionDialog: {
|
|
101
|
-
open: !!z,
|
|
102
|
-
copy: z ? {
|
|
103
|
-
...S.decisionDialog[z.id],
|
|
104
|
-
presentation: g(z.id) ? p : void 0,
|
|
105
|
-
pendingApprovers: g(z.id) ? w ?? [] : void 0
|
|
106
|
-
} : void 0,
|
|
107
|
-
isPending: z ? H[z.id]?.isPending ?? !1 : !1,
|
|
108
|
-
onCancel: () => {
|
|
109
|
-
I || R(void 0);
|
|
110
|
-
},
|
|
111
|
-
onConfirm: (e) => {
|
|
112
|
-
!z || I || (H[z.id]?.run(e), R(void 0));
|
|
113
|
-
}
|
|
114
|
-
}
|
|
22
|
+
id: y.filter(_).find((e) => !(h && (e.approved_by ?? []).includes(h)))?.id,
|
|
23
|
+
isPolicyApprover: v,
|
|
24
|
+
hasWaitingRequest: y.length > 0,
|
|
25
|
+
isLoading: f.isLoading || p.isLoading
|
|
115
26
|
};
|
|
116
27
|
}
|
|
117
|
-
var p = {
|
|
118
|
-
alignment: "center",
|
|
119
|
-
icon: d,
|
|
120
|
-
tone: "destructive",
|
|
121
|
-
actionWidth: "equal"
|
|
122
|
-
}, m = [
|
|
123
|
-
"reject",
|
|
124
|
-
"cancel",
|
|
125
|
-
"cancelScheduledPayment",
|
|
126
|
-
"forceApprove",
|
|
127
|
-
"forceReject"
|
|
128
|
-
];
|
|
129
|
-
function h(e) {
|
|
130
|
-
return m.includes(e);
|
|
131
|
-
}
|
|
132
|
-
function g(e) {
|
|
133
|
-
return e === "forceApprove" || e === "forceReject";
|
|
134
|
-
}
|
|
135
28
|
//#endregion
|
|
136
|
-
export {
|
|
29
|
+
export { s as useCurrentApprovalRequestId };
|
|
@@ -2,26 +2,145 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import "../../../shared/
|
|
8
|
-
import { formatCalendarDate as n } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
9
|
-
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
5
|
+
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import "../../../shared/ui/dist/index.js";
|
|
7
|
+
import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
8
|
import "../../../shared/feature/dist/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import { useApprovePayableApprovalRequestMutation as n, useRejectPayableApprovalRequestMutation as r } from "../../data-access/dist/index8.js";
|
|
10
|
+
import { useCancelPayableMutation as i, useCancelScheduledPaymentMutation as a, useForceApprovePayableMutation as o, useForceRejectPayableMutation as s, useReopenPayableMutation as c } from "../../data-access/dist/index13.js";
|
|
13
11
|
import "../../data-access/dist/index.js";
|
|
12
|
+
import { getBillDetailActions as l } from "./index19.js";
|
|
13
|
+
import { useState as u } from "react";
|
|
14
|
+
import { BanIcon as d, HandIcon as f } from "lucide-react";
|
|
14
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js
|
|
15
|
-
function
|
|
16
|
-
let { initResponse:
|
|
16
|
+
function p({ payableId: d, status: f, currentApprovalRequestId: p, hasWaitingRequest: m, arePendingApproversUnknown: h, hasScheduledPayment: _, scheduledPaymentIntentId: b, isScheduledPaymentUnknown: x, labels: S, isMarkAsPaidPending: C, pendingApprovers: w, onPayBillSelect: T, onMarkAsPaidSelect: E, onActionSucceeded: D }) {
|
|
17
|
+
let { initResponse: O } = t(), k = r(), A = n(), j = i(), M = a(), N = c(), P = o(), F = s(), I = C || k.isPending || A.isPending || j.isPending || M.isPending || N.isPending || P.isPending || F.isPending, [L, R] = u(), z = L && (L.id !== "cancelScheduledPayment" || L.scheduledPaymentIntentId === b) ? L : void 0, B = d && f ? l({
|
|
18
|
+
status: f,
|
|
19
|
+
scopes: O?.scopes,
|
|
20
|
+
canDecideApprovalRequest: !!p,
|
|
21
|
+
hasWaitingRequest: m,
|
|
22
|
+
arePendingApproversUnknown: h,
|
|
23
|
+
hasScheduledPayment: _ || x,
|
|
24
|
+
scheduledPaymentIntentId: b,
|
|
25
|
+
labels: S
|
|
26
|
+
}) : [], V = (t) => ({
|
|
27
|
+
onError: () => e.error(S.actionError),
|
|
28
|
+
onSuccess: () => {
|
|
29
|
+
e.success(S.actionSuccess[t]), D?.();
|
|
30
|
+
}
|
|
31
|
+
}), H = {
|
|
32
|
+
reject: {
|
|
33
|
+
isPending: k.isPending,
|
|
34
|
+
run: (e) => p && k.mutate({
|
|
35
|
+
path: { approval_request_id: p },
|
|
36
|
+
body: e ? { reject_reason: e } : void 0
|
|
37
|
+
}, V("reject"))
|
|
38
|
+
},
|
|
39
|
+
approve: {
|
|
40
|
+
isPending: A.isPending,
|
|
41
|
+
run: () => p && A.mutate({ path: { approval_request_id: p } }, V("approve"))
|
|
42
|
+
},
|
|
43
|
+
cancel: {
|
|
44
|
+
isPending: j.isPending,
|
|
45
|
+
run: () => d && j.mutate({ path: { payable_id: d } }, V("cancel"))
|
|
46
|
+
},
|
|
47
|
+
cancelScheduledPayment: {
|
|
48
|
+
isPending: M.isPending,
|
|
49
|
+
run: () => {
|
|
50
|
+
let e = z?.scheduledPaymentIntentId;
|
|
51
|
+
!d || !e || M.mutate({
|
|
52
|
+
path: { payment_intent_id: e },
|
|
53
|
+
payableId: d
|
|
54
|
+
}, V("cancelScheduledPayment"));
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
reopen: {
|
|
58
|
+
isPending: N.isPending,
|
|
59
|
+
run: () => d && N.mutate({ path: { payable_id: d } }, V("reopen"))
|
|
60
|
+
},
|
|
61
|
+
forceApprove: {
|
|
62
|
+
isPending: P.isPending,
|
|
63
|
+
run: () => d && P.mutate({ path: { payable_id: d } }, V("forceApprove"))
|
|
64
|
+
},
|
|
65
|
+
forceReject: {
|
|
66
|
+
isPending: F.isPending,
|
|
67
|
+
run: () => d && F.mutate({ path: { payable_id: d } }, V("forceReject"))
|
|
68
|
+
}
|
|
69
|
+
}, U = B.map((e) => ({
|
|
70
|
+
...e,
|
|
71
|
+
disabled: I,
|
|
72
|
+
loading: e.id === "markAsPaid" ? C : H[e.id]?.isPending ?? !1,
|
|
73
|
+
onSelect: () => {
|
|
74
|
+
if (!(I || !d)) {
|
|
75
|
+
if (e.id === "payBill") {
|
|
76
|
+
T();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (e.id === "markAsPaid") {
|
|
80
|
+
E();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (v(e.id)) {
|
|
84
|
+
R({
|
|
85
|
+
id: e.id,
|
|
86
|
+
scheduledPaymentIntentId: b
|
|
87
|
+
});
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
H[e.id]?.run();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}));
|
|
17
94
|
return {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
95
|
+
isActionPending: I,
|
|
96
|
+
actions: {
|
|
97
|
+
row: U.filter((e) => e.surface === "row"),
|
|
98
|
+
menu: U.filter((e) => e.surface === "menu")
|
|
99
|
+
},
|
|
100
|
+
decisionDialog: {
|
|
101
|
+
open: !!z,
|
|
102
|
+
copy: z ? {
|
|
103
|
+
...S.decisionDialog[z.id],
|
|
104
|
+
presentation: g(z.id),
|
|
105
|
+
pendingApprovers: y(z.id) ? w ?? [] : void 0
|
|
106
|
+
} : void 0,
|
|
107
|
+
isPending: z ? H[z.id]?.isPending ?? !1 : !1,
|
|
108
|
+
onCancel: () => {
|
|
109
|
+
I || R(void 0);
|
|
110
|
+
},
|
|
111
|
+
onConfirm: (e) => {
|
|
112
|
+
!z || I || (H[z.id]?.run(e), R(void 0));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
24
115
|
};
|
|
25
116
|
}
|
|
117
|
+
var m = {
|
|
118
|
+
alignment: "center",
|
|
119
|
+
icon: f,
|
|
120
|
+
tone: "destructive",
|
|
121
|
+
actionWidth: "equal"
|
|
122
|
+
}, h = {
|
|
123
|
+
alignment: "center",
|
|
124
|
+
icon: d,
|
|
125
|
+
tone: "destructive",
|
|
126
|
+
actionWidth: "equal"
|
|
127
|
+
};
|
|
128
|
+
function g(e) {
|
|
129
|
+
if (y(e)) return m;
|
|
130
|
+
if (e === "reject") return h;
|
|
131
|
+
}
|
|
132
|
+
var _ = [
|
|
133
|
+
"reject",
|
|
134
|
+
"cancel",
|
|
135
|
+
"cancelScheduledPayment",
|
|
136
|
+
"forceApprove",
|
|
137
|
+
"forceReject"
|
|
138
|
+
];
|
|
139
|
+
function v(e) {
|
|
140
|
+
return _.includes(e);
|
|
141
|
+
}
|
|
142
|
+
function y(e) {
|
|
143
|
+
return e === "forceApprove" || e === "forceReject";
|
|
144
|
+
}
|
|
26
145
|
//#endregion
|
|
27
|
-
export {
|
|
146
|
+
export { p as usePayableDetailActions };
|
|
@@ -1,7 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
+
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
+
import "../../../shared/data-access/dist/index.js";
|
|
8
|
+
import { formatCalendarDate as n } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
9
|
+
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
|
+
import "../../../shared/feature/dist/index.js";
|
|
11
|
+
import { isLiveScheduledPaymentRecord as i } from "../../data-access/dist/index3.js";
|
|
12
|
+
import { usePayablePaymentRecordsQuery as a } from "../../data-access/dist/index11.js";
|
|
13
|
+
import "../../data-access/dist/index.js";
|
|
1
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return
|
|
15
|
+
function o({ payableId: o, scheduledPaymentDate: s, enabled: c = !0 }) {
|
|
16
|
+
let { initResponse: l } = r(), u = e(l?.scopes, [t.PaymentRecordReadOrg]), d = a(c ? o : void 0, { enabled: c && u }), f = d.paymentRecords.find(i), p = !!f || !!s, m = f?.planned_payment_date ?? (p ? s : void 0);
|
|
17
|
+
return {
|
|
18
|
+
hasScheduledPayment: p,
|
|
19
|
+
paymentRecords: d.paymentRecords,
|
|
20
|
+
isError: d.isError,
|
|
21
|
+
isResolving: d.isResolving,
|
|
22
|
+
scheduledDateLabel: m ? n(m) : void 0,
|
|
23
|
+
scheduledPaymentIntentId: f?.payment_intent_id ?? void 0
|
|
24
|
+
};
|
|
5
25
|
}
|
|
6
26
|
//#endregion
|
|
7
|
-
export {
|
|
27
|
+
export { o as useScheduledPayment };
|
|
@@ -1,44 +1,7 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
7
|
-
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
8
|
-
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import "../../../shared/ui/dist/index.js";
|
|
10
|
-
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
-
import "../../../shared/feature/dist/index.js";
|
|
12
|
-
import { useDeletePayableMutation as i } from "../../data-access/dist/index13.js";
|
|
13
|
-
import "../../data-access/dist/index.js";
|
|
14
|
-
import { useState as a } from "react";
|
|
15
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
label: l.menuItem,
|
|
20
|
-
destructive: !0,
|
|
21
|
-
onSelect: () => m(!0)
|
|
22
|
-
}] : [], v = p && g;
|
|
23
|
-
return {
|
|
24
|
-
menuItems: _,
|
|
25
|
-
dialog: {
|
|
26
|
-
open: v,
|
|
27
|
-
copy: v ? l.dialog : void 0,
|
|
28
|
-
isPending: f.isPending,
|
|
29
|
-
onCancel: () => {
|
|
30
|
-
f.isPending || m(!1);
|
|
31
|
-
},
|
|
32
|
-
onConfirm: () => {
|
|
33
|
-
!g || !o || f.isPending || f.mutate({ path: { payable_id: o } }, {
|
|
34
|
-
onError: () => e.error(l.error),
|
|
35
|
-
onSuccess: () => {
|
|
36
|
-
m(!1), u();
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
2
|
+
var e = /* @__PURE__ */ new Set(["draft", "new"]);
|
|
3
|
+
function t(t) {
|
|
4
|
+
return !!(t && e.has(t));
|
|
42
5
|
}
|
|
43
6
|
//#endregion
|
|
44
|
-
export {
|
|
7
|
+
export { t as isEditablePayableStatus };
|
|
@@ -1,92 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
7
|
+
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
8
|
+
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import "../../../shared/ui/dist/index.js";
|
|
10
|
+
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
+
import "../../../shared/feature/dist/index.js";
|
|
12
|
+
import { useDeletePayableMutation as i } from "../../data-access/dist/index13.js";
|
|
13
|
+
import "../../data-access/dist/index.js";
|
|
14
|
+
import { useState as a } from "react";
|
|
5
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js
|
|
6
|
-
function
|
|
7
|
-
let f =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}), h = n(a), g = r(a), _ = e(a.issued_at) || l.notProvided, v = e(a.due_date) || l.notProvided, y = [{
|
|
14
|
-
label: l.vendorRow,
|
|
15
|
-
value: g || l.notProvided,
|
|
16
|
-
secondaryValue: h?.email ?? void 0
|
|
17
|
-
}], b = h?.bank_account?.account_number;
|
|
18
|
-
b && y.push({
|
|
19
|
-
label: l.bankAccountRow,
|
|
20
|
-
value: l.bankAccountValue(b.slice(-4))
|
|
21
|
-
});
|
|
22
|
-
let x = [
|
|
23
|
-
{
|
|
24
|
-
label: l.invoiceNumberRow,
|
|
25
|
-
value: a.document_id || l.notProvided
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
label: l.issueDateRow,
|
|
29
|
-
value: _
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
label: l.dueDateRow,
|
|
33
|
-
value: v
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: l.poNumberRow,
|
|
37
|
-
value: l.notProvided
|
|
38
|
-
}
|
|
39
|
-
], S = new Map(c.map((e) => [e.id, [e.nominal_code, e.name].filter(Boolean).join(" — ")])), C = s.map((e) => {
|
|
40
|
-
let t = p(e.unit_price);
|
|
41
|
-
return {
|
|
42
|
-
id: e.id,
|
|
43
|
-
description: e.name ?? e.description ?? "",
|
|
44
|
-
glCodeLabel: (e.ledger_account_id ? S.get(e.ledger_account_id) : void 0) || l.glCodeMissing,
|
|
45
|
-
quantityLabel: e.quantity != null && t ? l.quantityValue(String(e.quantity), t) : "",
|
|
46
|
-
amountLabel: p(e.subtotal) ?? ""
|
|
47
|
-
};
|
|
48
|
-
}), w = [
|
|
49
|
-
{
|
|
50
|
-
label: l.subtotalRow,
|
|
51
|
-
value: a.subtotal
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
label: l.discountsRow,
|
|
55
|
-
value: a.discount
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
label: l.taxRow,
|
|
59
|
-
value: a.tax_amount
|
|
60
|
-
}
|
|
61
|
-
].map(({ label: e, value: t }) => ({
|
|
62
|
-
label: e,
|
|
63
|
-
value: p(t)
|
|
64
|
-
})).filter((e) => !!e.value), T = p(a.total_amount);
|
|
65
|
-
T && w.push({
|
|
66
|
-
label: l.totalRow,
|
|
67
|
-
value: T,
|
|
68
|
-
emphasis: !0
|
|
69
|
-
});
|
|
70
|
-
let E = o(a);
|
|
16
|
+
function o({ payableId: o, status: s, enabled: c = !0, labels: l, onDeleted: u }) {
|
|
17
|
+
let { initResponse: d } = r(), f = i(), [p, m] = a(!1), h = t(d?.scopes, [n.PayableWriteOrg]), g = !!(c && o && s === "draft" && h), _ = g ? [{
|
|
18
|
+
id: "deleteDraft",
|
|
19
|
+
label: l.menuItem,
|
|
20
|
+
destructive: !0,
|
|
21
|
+
onSelect: () => m(!0)
|
|
22
|
+
}] : [], v = p && g;
|
|
71
23
|
return {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
24
|
+
menuItems: _,
|
|
25
|
+
dialog: {
|
|
26
|
+
open: v,
|
|
27
|
+
copy: v ? l.dialog : void 0,
|
|
28
|
+
isPending: f.isPending,
|
|
29
|
+
onCancel: () => {
|
|
30
|
+
f.isPending || m(!1);
|
|
31
|
+
},
|
|
32
|
+
onConfirm: () => {
|
|
33
|
+
!g || !o || f.isPending || f.mutate({ path: { payable_id: o } }, {
|
|
34
|
+
onError: () => e.error(l.error),
|
|
35
|
+
onSuccess: () => {
|
|
36
|
+
m(!1), u();
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
86
41
|
};
|
|
87
42
|
}
|
|
88
|
-
function o(t) {
|
|
89
|
-
return t.status === "paid" && t.paid_at ? e(t.paid_at.slice(0, 10)) : void 0;
|
|
90
|
-
}
|
|
91
43
|
//#endregion
|
|
92
|
-
export { o as
|
|
44
|
+
export { o as useDraftDelete };
|