@tesouro/embedded-components-react 0.4.12 → 0.4.14
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/lib/monite-sdk.d.ts +204 -468
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +37 -78
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +98 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +81 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +7 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +16 -61
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +26 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +63 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +66 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +6 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +4 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +3 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +28 -166
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +40 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +173 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +45 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +1 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +45 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +55 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +8 -66
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +7 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +58 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +15 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +134 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +14 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +39 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +78 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +78 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +24 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +47 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +119 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +33 -168
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +170 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +23 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +199 -203
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +198 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +105 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +23 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +47 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +27 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +198 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +30 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +240 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +19 -342
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +364 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +4 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +32 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +186 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +56 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +9 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +3 -128
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +125 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +5 -69
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +43 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +239 -101
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +107 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +209 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +5 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +64 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +40 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +52 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +2 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +12 -62
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +16 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +28 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +161 -154
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +16 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +47 -337
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +20 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +327 -107
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +13 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +113 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +9 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +95 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +9 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +56 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +2 -160
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +54 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +11 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +178 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +37 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +5 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +88 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -84
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +11 -282
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +87 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +294 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +9 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +5 -36
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +37 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +2 -201
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +39 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +3 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +187 -333
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +3 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +335 -81
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +87 -121
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +127 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +25 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +85 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +26 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +4 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +30 -102
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +9 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +85 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +123 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -170
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +7 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +158 -96
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +11 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +100 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index618.js +1 -1
- 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 +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +0 -28
|
@@ -2,136 +2,68 @@
|
|
|
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 { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
+
import { useAllOrganizationRolesQuery as n } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
|
|
8
|
+
import { useAllOrganizationUsersQuery as r } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
9
|
+
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { useWidgetConfig as i } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
8
11
|
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";
|
|
12
|
+
import { usePayableApprovalRequestsQuery as a } from "../../data-access/dist/index8.js";
|
|
11
13
|
import "../../data-access/dist/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
14
|
+
import { useGetApprovalPoliciesQuery as o } from "../../../shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js";
|
|
15
|
+
import "../../../shared/approval-policy/data-access/dist/index.js";
|
|
16
|
+
import { buildApprovalPolicyCardView as s } from "./index27.js";
|
|
17
|
+
import { currentApprovalRound as c } from "./index28.js";
|
|
18
|
+
import { buildPendingApproverGroups as l } from "./index29.js";
|
|
19
|
+
import { buildPendingApproverGroupsFromCardView as u } from "./index30.js";
|
|
20
|
+
import { usePayableApprovalRoundStart as d } from "./index31.js";
|
|
21
|
+
import { useMemo as f } from "react";
|
|
15
22
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js
|
|
16
|
-
function
|
|
17
|
-
let { initResponse:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
isPending: M.isPending,
|
|
46
|
-
run: () => d && M.mutate({ path: { payable_id: d } }, H("cancel"))
|
|
47
|
-
},
|
|
48
|
-
cancelScheduledPayment: {
|
|
49
|
-
isPending: N.isPending,
|
|
50
|
-
run: () => {
|
|
51
|
-
let e = B?.scheduledPaymentIntentId;
|
|
52
|
-
!d || !e || N.mutate({
|
|
53
|
-
path: { payment_intent_id: e },
|
|
54
|
-
payableId: d
|
|
55
|
-
}, H("cancelScheduledPayment"));
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
reopen: {
|
|
59
|
-
isPending: P.isPending,
|
|
60
|
-
run: () => d && P.mutate({ path: { payable_id: d } }, H("reopen"))
|
|
61
|
-
},
|
|
62
|
-
forceApprove: {
|
|
63
|
-
isPending: F.isPending,
|
|
64
|
-
run: () => d && F.mutate({ path: { payable_id: d } }, H("forceApprove"))
|
|
65
|
-
},
|
|
66
|
-
forceReject: {
|
|
67
|
-
isPending: I.isPending,
|
|
68
|
-
run: () => d && I.mutate({ path: { payable_id: d } }, H("forceReject"))
|
|
69
|
-
}
|
|
70
|
-
}, W = V.map((e) => ({
|
|
71
|
-
...e,
|
|
72
|
-
disabled: L,
|
|
73
|
-
loading: e.id === "markAsPaid" ? w : U[e.id]?.isPending ?? !1,
|
|
74
|
-
onSelect: () => {
|
|
75
|
-
if (!(L || !d)) {
|
|
76
|
-
if (e.id === "payBill") {
|
|
77
|
-
E();
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (e.id === "markAsPaid") {
|
|
81
|
-
D();
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
if (h(e.id)) {
|
|
85
|
-
z({
|
|
86
|
-
id: e.id,
|
|
87
|
-
scheduledPaymentIntentId: x
|
|
88
|
-
});
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
U[e.id]?.run();
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}));
|
|
23
|
+
function p({ payableId: p, approvalPolicyId: m, enabled: h = !0, copy: g }) {
|
|
24
|
+
let _ = h && !!m, { initResponse: v } = i(), y = e(v?.scopes, [t.ApprovalPolicyReadOrg]), b = e(v?.scopes, [t.ApprovalRequestReadOrg]), x = e(v?.scopes, [t.RoleReadOrg]), S = e(v?.scopes, [t.UserReadOrg]), C = o({ enabled: _ && y }), w = n({ enabled: _ && x }), T = r({ enabled: _ && S }), E = a(p, { enabled: _ && b }), { roundStartedAt: D } = d({
|
|
25
|
+
payableId: p,
|
|
26
|
+
enabled: _ && b
|
|
27
|
+
}), O = f(() => {
|
|
28
|
+
let e = /* @__PURE__ */ new Map();
|
|
29
|
+
for (let t of w.data?.data ?? []) e.set(t.id, {
|
|
30
|
+
label: t.name,
|
|
31
|
+
kind: "role"
|
|
32
|
+
});
|
|
33
|
+
for (let t of T.data?.data ?? []) e.set(t.id, {
|
|
34
|
+
label: t.name,
|
|
35
|
+
kind: "user"
|
|
36
|
+
});
|
|
37
|
+
return e;
|
|
38
|
+
}, [w.data, T.data]), k = f(() => c(E.data?.data, D), [E.data, D]), A = f(() => new Set(k.flatMap((e) => e.approved_by ?? [])), [k]), j = f(() => new Set(k.filter((e) => (e.approved_by ?? []).length > 0).flatMap((e) => e.role_ids ?? [])), [k]), M = f(() => m ? C.data?.data.find((e) => e.id === m) : void 0, [C.data, m]), N = f(() => _ && M ? s({
|
|
39
|
+
policy: M,
|
|
40
|
+
lookup: O,
|
|
41
|
+
approvedUserIds: A,
|
|
42
|
+
approvedRoleIds: j,
|
|
43
|
+
copy: g
|
|
44
|
+
}) : void 0, [
|
|
45
|
+
_,
|
|
46
|
+
M,
|
|
47
|
+
O,
|
|
48
|
+
A,
|
|
49
|
+
j,
|
|
50
|
+
g
|
|
51
|
+
]);
|
|
95
52
|
return {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
onCancel: () => {
|
|
110
|
-
L || z(void 0);
|
|
111
|
-
},
|
|
112
|
-
onConfirm: (e) => {
|
|
113
|
-
!B || L || (U[B.id]?.run(e), z(void 0));
|
|
114
|
-
}
|
|
115
|
-
}
|
|
53
|
+
view: N,
|
|
54
|
+
pendingApprovers: f(() => _ ? N ? u(N) : l({
|
|
55
|
+
requestsNewestFirst: E.data?.data,
|
|
56
|
+
roundStartedAt: D,
|
|
57
|
+
lookup: O
|
|
58
|
+
}) : [], [
|
|
59
|
+
_,
|
|
60
|
+
N,
|
|
61
|
+
E.data,
|
|
62
|
+
D,
|
|
63
|
+
O
|
|
64
|
+
]),
|
|
65
|
+
isLoading: _ && (C.isResolving || w.isResolving || T.isResolving || E.isLoading)
|
|
116
66
|
};
|
|
117
67
|
}
|
|
118
|
-
var p = {
|
|
119
|
-
alignment: "center",
|
|
120
|
-
icon: d,
|
|
121
|
-
tone: "destructive",
|
|
122
|
-
actionWidth: "equal"
|
|
123
|
-
}, m = [
|
|
124
|
-
"reject",
|
|
125
|
-
"cancel",
|
|
126
|
-
"cancelScheduledPayment",
|
|
127
|
-
"forceApprove",
|
|
128
|
-
"forceReject"
|
|
129
|
-
];
|
|
130
|
-
function h(e) {
|
|
131
|
-
return m.includes(e);
|
|
132
|
-
}
|
|
133
|
-
function g(e) {
|
|
134
|
-
return e === "forceApprove" || e === "forceReject";
|
|
135
|
-
}
|
|
136
68
|
//#endregion
|
|
137
|
-
export {
|
|
69
|
+
export { p as useApprovalPolicyCardView };
|
|
@@ -3,23 +3,27 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
-
import {
|
|
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";
|
|
7
8
|
import "../../../shared/data-access/dist/index.js";
|
|
8
|
-
import { formatCalendarDate as n } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
9
9
|
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
10
|
import "../../../shared/feature/dist/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import { usePayablePaymentRecordsQuery as a } from "../../data-access/dist/index11.js";
|
|
11
|
+
import { usePayableApprovalRequestsQuery as i } from "../../data-access/dist/index8.js";
|
|
13
12
|
import "../../data-access/dist/index.js";
|
|
13
|
+
import { currentApprovalRound as a } from "./index28.js";
|
|
14
|
+
import { usePayableApprovalRoundStart as o } from "./index31.js";
|
|
14
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js
|
|
15
|
-
function
|
|
16
|
-
let { initResponse: l } = r(), u = e(l?.scopes, [
|
|
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");
|
|
17
21
|
return {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
22
26
|
};
|
|
23
27
|
}
|
|
24
28
|
//#endregion
|
|
25
|
-
export {
|
|
29
|
+
export { s as useCurrentApprovalRequestId };
|
|
@@ -1,7 +1,137 @@
|
|
|
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 "../../../shared/ui/dist/index.js";
|
|
7
|
+
import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
8
|
+
import "../../../shared/feature/dist/index.js";
|
|
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";
|
|
11
|
+
import "../../data-access/dist/index.js";
|
|
12
|
+
import { getBillDetailActions as l } from "./index18.js";
|
|
13
|
+
import { useState as u } from "react";
|
|
14
|
+
import { HandIcon as d } from "lucide-react";
|
|
1
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
16
|
+
function f({ payableId: d, status: f, currentApprovalRequestId: m, isPolicyApprover: _, hasWaitingRequest: v, arePendingApproversUnknown: y, hasScheduledPayment: b, scheduledPaymentIntentId: x, isScheduledPaymentUnknown: S, labels: C, isMarkAsPaidPending: w, pendingApprovers: T, onPayBillSelect: E, onMarkAsPaidSelect: D, onActionSucceeded: O }) {
|
|
17
|
+
let { initResponse: k } = t(), A = r(), j = n(), M = i(), N = a(), P = c(), F = o(), I = s(), L = w || A.isPending || j.isPending || M.isPending || N.isPending || P.isPending || F.isPending || I.isPending, [R, z] = u(), B = R && (R.id !== "cancelScheduledPayment" || R.scheduledPaymentIntentId === x) ? R : void 0, V = d && f ? l({
|
|
18
|
+
status: f,
|
|
19
|
+
scopes: k?.scopes,
|
|
20
|
+
canDecideApprovalRequest: !!m,
|
|
21
|
+
isPolicyApprover: _,
|
|
22
|
+
hasWaitingRequest: v,
|
|
23
|
+
arePendingApproversUnknown: y,
|
|
24
|
+
hasScheduledPayment: b || S,
|
|
25
|
+
scheduledPaymentIntentId: x,
|
|
26
|
+
labels: C
|
|
27
|
+
}) : [], H = (t) => ({
|
|
28
|
+
onError: () => e.error(C.actionError),
|
|
29
|
+
onSuccess: () => {
|
|
30
|
+
e.success(C.actionSuccess[t]), O?.();
|
|
31
|
+
}
|
|
32
|
+
}), U = {
|
|
33
|
+
reject: {
|
|
34
|
+
isPending: A.isPending,
|
|
35
|
+
run: (e) => m && A.mutate({
|
|
36
|
+
path: { approval_request_id: m },
|
|
37
|
+
body: e ? { reject_reason: e } : void 0
|
|
38
|
+
}, H("reject"))
|
|
39
|
+
},
|
|
40
|
+
approve: {
|
|
41
|
+
isPending: j.isPending,
|
|
42
|
+
run: () => m && j.mutate({ path: { approval_request_id: m } }, H("approve"))
|
|
43
|
+
},
|
|
44
|
+
cancel: {
|
|
45
|
+
isPending: M.isPending,
|
|
46
|
+
run: () => d && M.mutate({ path: { payable_id: d } }, H("cancel"))
|
|
47
|
+
},
|
|
48
|
+
cancelScheduledPayment: {
|
|
49
|
+
isPending: N.isPending,
|
|
50
|
+
run: () => {
|
|
51
|
+
let e = B?.scheduledPaymentIntentId;
|
|
52
|
+
!d || !e || N.mutate({
|
|
53
|
+
path: { payment_intent_id: e },
|
|
54
|
+
payableId: d
|
|
55
|
+
}, H("cancelScheduledPayment"));
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
reopen: {
|
|
59
|
+
isPending: P.isPending,
|
|
60
|
+
run: () => d && P.mutate({ path: { payable_id: d } }, H("reopen"))
|
|
61
|
+
},
|
|
62
|
+
forceApprove: {
|
|
63
|
+
isPending: F.isPending,
|
|
64
|
+
run: () => d && F.mutate({ path: { payable_id: d } }, H("forceApprove"))
|
|
65
|
+
},
|
|
66
|
+
forceReject: {
|
|
67
|
+
isPending: I.isPending,
|
|
68
|
+
run: () => d && I.mutate({ path: { payable_id: d } }, H("forceReject"))
|
|
69
|
+
}
|
|
70
|
+
}, W = V.map((e) => ({
|
|
71
|
+
...e,
|
|
72
|
+
disabled: L,
|
|
73
|
+
loading: e.id === "markAsPaid" ? w : U[e.id]?.isPending ?? !1,
|
|
74
|
+
onSelect: () => {
|
|
75
|
+
if (!(L || !d)) {
|
|
76
|
+
if (e.id === "payBill") {
|
|
77
|
+
E();
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (e.id === "markAsPaid") {
|
|
81
|
+
D();
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (h(e.id)) {
|
|
85
|
+
z({
|
|
86
|
+
id: e.id,
|
|
87
|
+
scheduledPaymentIntentId: x
|
|
88
|
+
});
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
U[e.id]?.run();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}));
|
|
95
|
+
return {
|
|
96
|
+
isActionPending: L,
|
|
97
|
+
actions: {
|
|
98
|
+
row: W.filter((e) => e.surface === "row"),
|
|
99
|
+
menu: W.filter((e) => e.surface === "menu")
|
|
100
|
+
},
|
|
101
|
+
decisionDialog: {
|
|
102
|
+
open: !!B,
|
|
103
|
+
copy: B ? {
|
|
104
|
+
...C.decisionDialog[B.id],
|
|
105
|
+
presentation: g(B.id) ? p : void 0,
|
|
106
|
+
pendingApprovers: g(B.id) ? T ?? [] : void 0
|
|
107
|
+
} : void 0,
|
|
108
|
+
isPending: B ? U[B.id]?.isPending ?? !1 : !1,
|
|
109
|
+
onCancel: () => {
|
|
110
|
+
L || z(void 0);
|
|
111
|
+
},
|
|
112
|
+
onConfirm: (e) => {
|
|
113
|
+
!B || L || (U[B.id]?.run(e), z(void 0));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
var p = {
|
|
119
|
+
alignment: "center",
|
|
120
|
+
icon: d,
|
|
121
|
+
tone: "destructive",
|
|
122
|
+
actionWidth: "equal"
|
|
123
|
+
}, m = [
|
|
124
|
+
"reject",
|
|
125
|
+
"cancel",
|
|
126
|
+
"cancelScheduledPayment",
|
|
127
|
+
"forceApprove",
|
|
128
|
+
"forceReject"
|
|
129
|
+
];
|
|
130
|
+
function h(e) {
|
|
131
|
+
return m.includes(e);
|
|
132
|
+
}
|
|
133
|
+
function g(e) {
|
|
134
|
+
return e === "forceApprove" || e === "forceReject";
|
|
5
135
|
}
|
|
6
136
|
//#endregion
|
|
7
|
-
export {
|
|
137
|
+
export { f as usePayableDetailActions };
|
|
@@ -2,43 +2,26 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
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";
|
|
8
7
|
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import "../../../shared/
|
|
8
|
+
import { formatCalendarDate as n } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
10
9
|
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
10
|
import "../../../shared/feature/dist/index.js";
|
|
12
|
-
import {
|
|
11
|
+
import { isLiveScheduledPaymentRecord as i } from "../../data-access/dist/index3.js";
|
|
12
|
+
import { usePayablePaymentRecordsQuery as a } from "../../data-access/dist/index11.js";
|
|
13
13
|
import "../../data-access/dist/index.js";
|
|
14
|
-
import { useState as a } from "react";
|
|
15
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js
|
|
16
|
-
function o({ payableId: o,
|
|
17
|
-
let { initResponse:
|
|
18
|
-
id: "deleteDraft",
|
|
19
|
-
label: l.menuItem,
|
|
20
|
-
destructive: !0,
|
|
21
|
-
onSelect: () => m(!0)
|
|
22
|
-
}] : [], v = p && g;
|
|
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);
|
|
23
17
|
return {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
}
|
|
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
|
|
41
24
|
};
|
|
42
25
|
}
|
|
43
26
|
//#endregion
|
|
44
|
-
export { o as
|
|
27
|
+
export { o as useScheduledPayment };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { formatMoneyExact as e } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
2
|
-
import "../../data-access/dist/index.js";
|
|
3
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var e = /* @__PURE__ */ new Set(["draft", "new"]);
|
|
3
|
+
function t(t) {
|
|
4
|
+
return !!(t && e.has(t));
|
|
6
5
|
}
|
|
7
6
|
//#endregion
|
|
8
|
-
export { t as
|
|
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/index37.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 };
|