@tesouro/embedded-components-react 0.7.30 → 0.7.32
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/lib/monite-sdk.d.ts +0 -1
- package/dist/lib/monite-sdk.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +41 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index204.js +55 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index205.js +2 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index206.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index207.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index208.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index209.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index210.js +53 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index211.js +36 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index212.js +71 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index213.js +6 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index214.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index215.js +79 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index216.js +1 -79
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index217.js +58 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index218.js +42 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index219.js +1 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index220.js +568 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index221.js +0 -577
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index222.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index223.js +160 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index224.js +0 -159
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index225.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index226.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index227.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index228.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index230.js +16 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index231.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index232.js +27 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index233.js +1 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index234.js +93 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +10 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index236.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index237.js +18 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index238.js +73 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index239.js +1 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index240.js +127 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index241.js +0 -127
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index242.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index243.js +54 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index244.js +5 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index245.js +1 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index246.js +64 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +120 -62
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index248.js +21 -120
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index250.js +35 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index251.js +6 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +56 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index253.js +69 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index254.js +25 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index255.js +1 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index256.js +61 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index257.js +17 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index258.js +19 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index259.js +181 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +1 -185
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +31 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +2 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +64 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +31 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +6 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +29 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +42 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +11 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +15 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +4 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +12 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +8 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +32 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +8 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +20 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +7 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +111 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +62 -110
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +1 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +199 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +0 -199
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +11 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +38 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +6 -38
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +9 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +13 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +7 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +5 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +359 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +1 -412
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +22 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +91 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +18 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +7 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +182 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +96 -178
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +1 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +55 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +44 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +1 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +21 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +1 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +161 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +0 -161
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +61 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +44 -60
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +48 -44
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +82 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +7 -83
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +305 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +1 -307
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +32 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +1 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +29 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +1 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +160 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +0 -160
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +37 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +33 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +3 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +102 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +172 -88
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +116 -171
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +191 -114
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +11 -209
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +15 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +28 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +1 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +241 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +0 -241
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +36 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +138 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +1 -142
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +166 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +25 -166
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +19 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +17 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +5 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +18 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +5 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +14 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +9 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +26 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +11 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +8 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +24 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +14 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +100 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +42 -98
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +27 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +1 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +105 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +35 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index370.js +166 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index371.js +202 -163
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index372.js +87 -207
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +17 -90
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index374.js +158 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index375.js +87 -143
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index376.js +42 -100
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index377.js +4 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index378.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +73 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index380.js +16 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index381.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +5 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index383.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index384.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index385.js +131 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index386.js +4 -129
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index387.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index388.js +5 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index389.js +221 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index390.js +31 -219
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index391.js +11 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +34 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index393.js +180 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +14 -182
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index395.js +204 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +88 -192
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index397.js +61 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index398.js +54 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index399.js +83 -46
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index400.js +40 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index401.js +75 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index402.js +71 -63
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index403.js +12 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index404.js +24 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index405.js +16 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index406.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index407.js +23 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index408.js +0 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index409.js +52 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index410.js +32 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index411.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index412.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +15 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index414.js +29 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index415.js +27 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index416.js +2 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index417.js +97 -2
- 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/monite-sdk/dist/index418.js +0 -97
|
@@ -1,64 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { useMoniteContext as e } from "./index45.js";
|
|
2
|
+
import { useCounterpartById as t } from "./index46.js";
|
|
3
|
+
import "./index148.js";
|
|
4
|
+
import { useMemo as n } from "react";
|
|
4
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js
|
|
5
|
-
var
|
|
6
|
-
let {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
children: /* @__PURE__ */ e(s, {
|
|
32
|
-
variant: "body1",
|
|
33
|
-
color: "text.secondary",
|
|
34
|
-
children: m ? p._("The bill status will change to Approved, skipping the approval flow.") : p._("The bill status will change to Rejected, skipping the approval flow.")
|
|
35
|
-
})
|
|
36
|
-
}),
|
|
37
|
-
/* @__PURE__ */ t(i, {
|
|
38
|
-
sx: {
|
|
39
|
-
px: 0,
|
|
40
|
-
pt: 2,
|
|
41
|
-
gap: 2
|
|
42
|
-
},
|
|
43
|
-
children: [/* @__PURE__ */ e(n, {
|
|
44
|
-
onClick: d,
|
|
45
|
-
variant: "text",
|
|
46
|
-
sx: {
|
|
47
|
-
color: "primary.main",
|
|
48
|
-
fontWeight: 500,
|
|
49
|
-
textTransform: "none",
|
|
50
|
-
fontSize: "16px"
|
|
51
|
-
},
|
|
52
|
-
children: p._("Cancel")
|
|
53
|
-
}), /* @__PURE__ */ e(n, {
|
|
54
|
-
onClick: f,
|
|
55
|
-
variant: "contained",
|
|
56
|
-
color: m ? "primary" : "error",
|
|
57
|
-
children: m ? p._("Force Approve") : p._("Force Reject")
|
|
58
|
-
})]
|
|
59
|
-
})
|
|
60
|
-
]
|
|
61
|
-
});
|
|
6
|
+
var r = ({ payable: r }) => {
|
|
7
|
+
let { api: i } = e(), a = n(() => !r?.counterpart_id && (r?.status === "draft" || r?.status === "new"), [r?.counterpart_id, r?.status]), { data: o, isLoading: s } = i.finops.getPayablesIdSuggestions.useQuery({ path: { payable_id: r?.id ?? "" } }, { enabled: !!a && !!r?.id }), c = n(() => r?.counterpart_id ?? o?.suggested_counterpart?.id ?? null, [r?.counterpart_id, o?.suggested_counterpart?.id]), { data: l, isLoading: u } = t(c ?? void 0), d = n(() => r?.counterpart_raw_data?.name, [r?.counterpart_raw_data?.name]), f = n(() => !c && !!d && !s && (r?.status === "draft" || r?.status === "new"), [
|
|
8
|
+
c,
|
|
9
|
+
d,
|
|
10
|
+
s,
|
|
11
|
+
r?.status
|
|
12
|
+
]), { data: p, isLoading: m } = i.finops.getCounterparts.useQuery({ query: {
|
|
13
|
+
counterpart_name__icontains: d,
|
|
14
|
+
is_vendor: !0,
|
|
15
|
+
limit: 1
|
|
16
|
+
} }, {
|
|
17
|
+
enabled: f,
|
|
18
|
+
select: (e) => e.data[0]
|
|
19
|
+
}), h = n(() => !!o?.suggested_counterpart?.id && a, [o?.suggested_counterpart?.id, a]), g = n(() => !!p?.id && f, [p?.id, f]), _ = n(() => s || m || u, [
|
|
20
|
+
s,
|
|
21
|
+
m,
|
|
22
|
+
u
|
|
23
|
+
]);
|
|
24
|
+
return {
|
|
25
|
+
counterpart: p ?? l,
|
|
26
|
+
counterpartRawName: d,
|
|
27
|
+
isCounterpartAIMatched: h,
|
|
28
|
+
isCounterpartMatchingToOCRFound: g,
|
|
29
|
+
isCounterpartLoading: _,
|
|
30
|
+
AISuggestions: o
|
|
31
|
+
};
|
|
62
32
|
};
|
|
63
33
|
//#endregion
|
|
64
|
-
export {
|
|
34
|
+
export { r as useGetPayableCounterpart };
|
|
@@ -1,34 +1,12 @@
|
|
|
1
1
|
import { useMoniteContext as e } from "./index45.js";
|
|
2
|
-
import { useCounterpartById as t } from "./index46.js";
|
|
3
|
-
import "./index148.js";
|
|
4
|
-
import { useMemo as n } from "react";
|
|
5
2
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js
|
|
6
|
-
var
|
|
7
|
-
let {
|
|
8
|
-
c,
|
|
9
|
-
d,
|
|
10
|
-
s,
|
|
11
|
-
r?.status
|
|
12
|
-
]), { data: p, isLoading: m } = i.finops.getCounterparts.useQuery({ query: {
|
|
13
|
-
counterpart_name__icontains: d,
|
|
14
|
-
is_vendor: !0,
|
|
15
|
-
limit: 1
|
|
16
|
-
} }, {
|
|
17
|
-
enabled: f,
|
|
18
|
-
select: (e) => e.data[0]
|
|
19
|
-
}), h = n(() => !!o?.suggested_counterpart?.id && a, [o?.suggested_counterpart?.id, a]), g = n(() => !!p?.id && f, [p?.id, f]), _ = n(() => s || m || u, [
|
|
20
|
-
s,
|
|
21
|
-
m,
|
|
22
|
-
u
|
|
23
|
-
]);
|
|
3
|
+
var t = (t) => {
|
|
4
|
+
let { componentSettings: n } = e();
|
|
24
5
|
return {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
isCounterpartMatchingToOCRFound: g,
|
|
29
|
-
isCounterpartLoading: _,
|
|
30
|
-
AISuggestions: o
|
|
6
|
+
optionalFields: t?.optionalFields ?? n?.payables?.optionalFields,
|
|
7
|
+
ocrRequiredFields: t?.ocrRequiredFields ?? n?.payables?.ocrRequiredFields,
|
|
8
|
+
ocrMismatchFields: t?.ocrMismatchFields ?? n?.payables?.ocrMismatchFields
|
|
31
9
|
};
|
|
32
10
|
};
|
|
33
11
|
//#endregion
|
|
34
|
-
export {
|
|
12
|
+
export { t as usePayableDetailsThemeProps };
|
|
@@ -1,12 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useComponentSettings as e } from "./index171.js";
|
|
2
|
+
import { useCallback as t } from "react";
|
|
2
3
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js
|
|
3
|
-
var
|
|
4
|
-
let {
|
|
4
|
+
var n = (n) => {
|
|
5
|
+
let { payablesCallbacks: r } = e(), { onSaved: i, onCanceled: a, onSubmitted: o, onRejected: s, onApproved: c, onReopened: l, onDeleted: u, onPay: d } = n, f = t((e) => {
|
|
6
|
+
i?.(e), r.onSaved?.(e);
|
|
7
|
+
}, [i, r]), p = i || r.onSaved ? f : void 0, m = t((e) => {
|
|
8
|
+
a?.(e), r.onCanceled?.(e);
|
|
9
|
+
}, [a, r]), h = a || r.onCanceled ? m : void 0, g = t((e) => {
|
|
10
|
+
o?.(e), r.onSubmitted?.(e);
|
|
11
|
+
}, [o, r]), _ = o || r.onSubmitted ? g : void 0, v = t((e) => {
|
|
12
|
+
s?.(e), r.onRejected?.(e);
|
|
13
|
+
}, [s, r]), y = s || r.onRejected ? v : void 0, b = t((e) => {
|
|
14
|
+
c?.(e), r.onApproved?.(e);
|
|
15
|
+
}, [c, r]), x = c || r.onApproved ? b : void 0, S = t((e) => {
|
|
16
|
+
l?.(e), r.onReopened?.(e);
|
|
17
|
+
}, [l, r]), C = l || r.onReopened ? S : void 0, w = t((e) => {
|
|
18
|
+
u?.(e), r.onDeleted?.(e);
|
|
19
|
+
}, [u, r]), T = u || r.onDeleted ? w : void 0, E = t((e, t, n) => {
|
|
20
|
+
d?.(e, t, n), r.onPay?.(e, t, n);
|
|
21
|
+
}, [d, r]);
|
|
5
22
|
return {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
23
|
+
handleSaved: p,
|
|
24
|
+
handleCanceled: h,
|
|
25
|
+
handleSubmitted: _,
|
|
26
|
+
handleRejected: y,
|
|
27
|
+
handleApproved: x,
|
|
28
|
+
handleReopened: C,
|
|
29
|
+
handleDeleted: T,
|
|
30
|
+
handlePay: d || r.onPay ? E : void 0
|
|
9
31
|
};
|
|
10
32
|
};
|
|
11
33
|
//#endregion
|
|
12
|
-
export {
|
|
34
|
+
export { n as usePayableCallbacks };
|
|
@@ -1,34 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { Scope as e } from "../../shared/data-access/dist/lib/scopes.js";
|
|
2
|
+
import "../../shared/data-access/dist/index.js";
|
|
3
|
+
import { useUserPermissions as t } from "./index111.js";
|
|
4
|
+
import { useMemo as n } from "react";
|
|
3
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js
|
|
4
|
-
var
|
|
5
|
-
let
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
6
|
+
var r = ({ payable: r, payableRecentPaymentRecordByIntent: i }) => {
|
|
7
|
+
let a = t().has(e.PayablePayOrg), o = n(() => r ? ["waiting_to_be_paid", "partially_paid"].includes(r.status) : !1, [r]), s = n(() => {
|
|
8
|
+
let e = [], t = [], n = [], r = [], a = !1, o = {};
|
|
9
|
+
return i.forEach((i) => {
|
|
10
|
+
let { record: s } = i;
|
|
11
|
+
s.planned_payment_date && e.push(i), s.status === "processing" && t.push(i), s.status === "succeeded" && n.push(i), s.status === "created" && r.push(i), s.status !== "created" && (a = !0);
|
|
12
|
+
let c = s.planned_payment_date ? "scheduled" : s.status;
|
|
13
|
+
o[c] || (o[c] = {
|
|
14
|
+
count: 0,
|
|
15
|
+
sum: 0,
|
|
16
|
+
records: []
|
|
17
|
+
}), o[c].count++, o[c].sum += s.amount, o[c].records.push(s);
|
|
18
|
+
}), {
|
|
19
|
+
scheduledIntents: e,
|
|
20
|
+
processingIntents: t,
|
|
21
|
+
succeededIntents: n,
|
|
22
|
+
createdRecords: r,
|
|
23
|
+
hasAnyIntentOtherThanCreated: a,
|
|
24
|
+
aggregation: o,
|
|
25
|
+
idPaymentIntentInCreated: r.length > 0 ? r[0].intent : void 0
|
|
26
|
+
};
|
|
27
|
+
}, [i]);
|
|
22
28
|
return {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
showPayButton: n(() => {
|
|
30
|
+
if (!r) return !1;
|
|
31
|
+
let e = Number(r.amount_to_pay) > 0, t = s.scheduledIntents.length > 0 || s.processingIntents.length > 0 || s.succeededIntents.length > 0;
|
|
32
|
+
return a && o && e && !t;
|
|
33
|
+
}, [
|
|
34
|
+
r,
|
|
35
|
+
a,
|
|
36
|
+
o,
|
|
37
|
+
s.scheduledIntents.length,
|
|
38
|
+
s.processingIntents.length,
|
|
39
|
+
s.succeededIntents.length
|
|
40
|
+
]),
|
|
41
|
+
isPayAllowed: a,
|
|
42
|
+
payableStatusCanBePaid: o,
|
|
43
|
+
intentsAnalysis: s
|
|
31
44
|
};
|
|
32
45
|
};
|
|
33
46
|
//#endregion
|
|
34
|
-
export {
|
|
47
|
+
export { r as usePayButtonVisibility };
|
|
@@ -1,47 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../shared/data-access/dist/index.js";
|
|
3
|
-
import { useUserPermissions as t } from "./index111.js";
|
|
4
|
-
import { useMemo as n } from "react";
|
|
1
|
+
import { useMoniteContext as e } from "./index45.js";
|
|
5
2
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js
|
|
6
|
-
var
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
sum: 0,
|
|
16
|
-
records: []
|
|
17
|
-
}), o[c].count++, o[c].sum += s.amount, o[c].records.push(s);
|
|
18
|
-
}), {
|
|
19
|
-
scheduledIntents: e,
|
|
20
|
-
processingIntents: t,
|
|
21
|
-
succeededIntents: n,
|
|
22
|
-
createdRecords: r,
|
|
23
|
-
hasAnyIntentOtherThanCreated: a,
|
|
24
|
-
aggregation: o,
|
|
25
|
-
idPaymentIntentInCreated: r.length > 0 ? r[0].intent : void 0
|
|
26
|
-
};
|
|
27
|
-
}, [i]);
|
|
28
|
-
return {
|
|
29
|
-
showPayButton: n(() => {
|
|
30
|
-
if (!r) return !1;
|
|
31
|
-
let e = Number(r.amount_to_pay) > 0, t = s.scheduledIntents.length > 0 || s.processingIntents.length > 0 || s.succeededIntents.length > 0;
|
|
32
|
-
return a && o && e && !t;
|
|
33
|
-
}, [
|
|
34
|
-
r,
|
|
35
|
-
a,
|
|
36
|
-
o,
|
|
37
|
-
s.scheduledIntents.length,
|
|
38
|
-
s.processingIntents.length,
|
|
39
|
-
s.succeededIntents.length
|
|
40
|
-
]),
|
|
41
|
-
isPayAllowed: a,
|
|
42
|
-
payableStatusCanBePaid: o,
|
|
43
|
-
intentsAnalysis: s
|
|
44
|
-
};
|
|
3
|
+
var t = (t = !0) => {
|
|
4
|
+
let { api: n } = e();
|
|
5
|
+
return n.finops.getLedgerAccounts.useQuery({ query: {
|
|
6
|
+
limit: 250,
|
|
7
|
+
sort: "name"
|
|
8
|
+
} }, {
|
|
9
|
+
enabled: t,
|
|
10
|
+
staleTime: 3e5
|
|
11
|
+
});
|
|
45
12
|
};
|
|
46
13
|
//#endregion
|
|
47
|
-
export {
|
|
14
|
+
export { t as useLedgerAccounts };
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { useMoniteContext as e } from "./index45.js";
|
|
2
2
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js
|
|
3
|
-
var t =
|
|
4
|
-
|
|
5
|
-
return n.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
var t = 15e3, n = 2e3, r = 1e3, i = 1e4;
|
|
4
|
+
function a({ isEditing: e, isOcrProcessing: a, payable: o }) {
|
|
5
|
+
return e ? !1 : a ? n : o?.status === "approve_in_progress" && !o.approval_policy_id && Date.now() - new Date(o.updated_at).getTime() < i ? r : t;
|
|
6
|
+
}
|
|
7
|
+
var o = (t, n, r) => {
|
|
8
|
+
let { api: i } = e();
|
|
9
|
+
return i.finops.getPayablesId.useQuery({ path: { payable_id: t ?? "" } }, {
|
|
10
|
+
enabled: !!t,
|
|
11
|
+
refetchInterval: (e) => a({
|
|
12
|
+
isEditing: r,
|
|
13
|
+
isOcrProcessing: n,
|
|
14
|
+
payable: e.state.data
|
|
15
|
+
}),
|
|
16
|
+
refetchOnMount: !0
|
|
11
17
|
});
|
|
12
18
|
};
|
|
13
19
|
//#endregion
|
|
14
|
-
export {
|
|
20
|
+
export { a as getPayableRefetchInterval, o as useGetPayableById };
|
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
import { useMoniteContext as e } from "./index45.js";
|
|
2
2
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js
|
|
3
|
-
var t =
|
|
4
|
-
|
|
5
|
-
return
|
|
6
|
-
}
|
|
7
|
-
var o = (t, n, r) => {
|
|
8
|
-
let { api: i } = e();
|
|
9
|
-
return i.finops.getPayablesId.useQuery({ path: { payable_id: t ?? "" } }, {
|
|
10
|
-
enabled: !!t,
|
|
11
|
-
refetchInterval: (e) => a({
|
|
12
|
-
isEditing: r,
|
|
13
|
-
isOcrProcessing: n,
|
|
14
|
-
payable: e.state.data
|
|
15
|
-
}),
|
|
16
|
-
refetchOnMount: !0
|
|
17
|
-
});
|
|
3
|
+
var t = (t) => {
|
|
4
|
+
let { api: n } = e();
|
|
5
|
+
return n.finops.getPayablesIdLineItems.useQuery({ path: { payable_id: t ?? "" } }, { enabled: !!t });
|
|
18
6
|
};
|
|
19
7
|
//#endregion
|
|
20
|
-
export {
|
|
8
|
+
export { t as useGetPayableLineItems };
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { useMoniteContext as e } from "./index45.js";
|
|
2
2
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js
|
|
3
|
-
var t = (t) => {
|
|
4
|
-
let { api:
|
|
5
|
-
return
|
|
3
|
+
var t = (t, n) => {
|
|
4
|
+
let { api: r } = e();
|
|
5
|
+
return r.finops.getApprovalRequests.useQuery({ query: {
|
|
6
|
+
object_id: t,
|
|
7
|
+
object_type: "payable",
|
|
8
|
+
order: "desc"
|
|
9
|
+
} }, { enabled: !!t && n === "approve_in_progress" });
|
|
6
10
|
};
|
|
7
11
|
//#endregion
|
|
8
|
-
export { t as
|
|
12
|
+
export { t as useGetPayableApprovalRequests };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getAPIErrorMessage as e } from "./index26.js";
|
|
2
|
+
import { useMoniteContext as t } from "./index45.js";
|
|
3
|
+
import { toast as n } from "react-hot-toast";
|
|
4
|
+
import { useLingui as r } from "@lingui/react";
|
|
2
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js
|
|
3
|
-
var
|
|
4
|
-
let { api:
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
order: "desc"
|
|
9
|
-
} }, { enabled: !!t && n === "approve_in_progress" });
|
|
6
|
+
var i = () => {
|
|
7
|
+
let { api: i } = t(), { i18n: a } = r();
|
|
8
|
+
return i.finops.postPayables.useMutation({}, { onError: (t) => {
|
|
9
|
+
n.error(e(a, t));
|
|
10
|
+
} });
|
|
10
11
|
};
|
|
11
12
|
//#endregion
|
|
12
|
-
export {
|
|
13
|
+
export { i as useCreatePayable };
|
|
@@ -4,10 +4,17 @@ import { toast as n } from "react-hot-toast";
|
|
|
4
4
|
import { useLingui as r } from "@lingui/react";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js
|
|
6
6
|
var i = () => {
|
|
7
|
-
let { api: i } = t(), { i18n:
|
|
8
|
-
return i.finops.
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
let { api: i, queryClient: a } = t(), { i18n: o } = r();
|
|
8
|
+
return i.finops.patchPayablesId.useMutation(void 0, {
|
|
9
|
+
onSuccess: (e) => Promise.all([
|
|
10
|
+
i.finops.getPayablesId.invalidateQueries({ parameters: { path: { payable_id: e.id } } }, a),
|
|
11
|
+
i.finops.getPayables.invalidateQueries(a),
|
|
12
|
+
i.finops.getPayablesIdLineItems.invalidateQueries({ parameters: { path: { payable_id: e.id } } }, a)
|
|
13
|
+
]),
|
|
14
|
+
onError: (t) => {
|
|
15
|
+
n.error(e(o, t));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
11
18
|
};
|
|
12
19
|
//#endregion
|
|
13
|
-
export { i as
|
|
20
|
+
export { i as useUpdatePayable };
|
|
@@ -3,18 +3,14 @@ import { useMoniteContext as t } from "./index45.js";
|
|
|
3
3
|
import { toast as n } from "react-hot-toast";
|
|
4
4
|
import { useLingui as r } from "@lingui/react";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js
|
|
6
|
-
var i = () => {
|
|
7
|
-
let { api:
|
|
8
|
-
return
|
|
9
|
-
onSuccess: (
|
|
10
|
-
i.finops.getPayablesId.invalidateQueries({ parameters: { path: { payable_id: e.id } } }, a),
|
|
11
|
-
i.finops.getPayables.invalidateQueries(a),
|
|
12
|
-
i.finops.getPayablesIdLineItems.invalidateQueries({ parameters: { path: { payable_id: e.id } } }, a)
|
|
13
|
-
]),
|
|
6
|
+
var i = (i) => {
|
|
7
|
+
let { api: a, queryClient: o } = t(), { i18n: s } = r();
|
|
8
|
+
return a.finops.postPayablesIdLineItems.useMutation(void 0, {
|
|
9
|
+
onSuccess: () => a.finops.getPayablesIdLineItems.invalidateQueries({ parameters: { path: { payable_id: i } } }, o),
|
|
14
10
|
onError: (t) => {
|
|
15
|
-
n.error(e(
|
|
11
|
+
n.error(e(s, t));
|
|
16
12
|
}
|
|
17
13
|
});
|
|
18
14
|
};
|
|
19
15
|
//#endregion
|
|
20
|
-
export { i as
|
|
16
|
+
export { i as useCreatePayableLineItem };
|
|
@@ -5,7 +5,7 @@ import { useLingui as r } from "@lingui/react";
|
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js
|
|
6
6
|
var i = (i) => {
|
|
7
7
|
let { api: a, queryClient: o } = t(), { i18n: s } = r();
|
|
8
|
-
return a.finops.
|
|
8
|
+
return a.finops.patchPayablesIdLineItemsId.useMutation(void 0, {
|
|
9
9
|
onSuccess: () => a.finops.getPayablesIdLineItems.invalidateQueries({ parameters: { path: { payable_id: i } } }, o),
|
|
10
10
|
onError: (t) => {
|
|
11
11
|
n.error(e(s, t));
|
|
@@ -13,4 +13,4 @@ var i = (i) => {
|
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
|
-
export { i as
|
|
16
|
+
export { i as useUpdatePayableLineItem };
|
|
@@ -5,7 +5,7 @@ import { useLingui as r } from "@lingui/react";
|
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js
|
|
6
6
|
var i = (i) => {
|
|
7
7
|
let { api: a, queryClient: o } = t(), { i18n: s } = r();
|
|
8
|
-
return a.finops.
|
|
8
|
+
return a.finops.deletePayablesIdLineItemsId.useMutation(void 0, {
|
|
9
9
|
onSuccess: () => a.finops.getPayablesIdLineItems.invalidateQueries({ parameters: { path: { payable_id: i } } }, o),
|
|
10
10
|
onError: (t) => {
|
|
11
11
|
n.error(e(s, t));
|
|
@@ -13,4 +13,4 @@ var i = (i) => {
|
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
|
-
export { i as
|
|
16
|
+
export { i as useDeletePayableLineItem };
|
|
@@ -3,14 +3,16 @@ import { useMoniteContext as t } from "./index45.js";
|
|
|
3
3
|
import { toast as n } from "react-hot-toast";
|
|
4
4
|
import { useLingui as r } from "@lingui/react";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js
|
|
6
|
-
var i = (i) => {
|
|
7
|
-
let { api:
|
|
8
|
-
return
|
|
9
|
-
onSuccess: () =>
|
|
6
|
+
var i = (i, a) => {
|
|
7
|
+
let { api: o, queryClient: s } = t(), { i18n: c } = r();
|
|
8
|
+
return o.finops.postPayablesIdCancel.useMutation({ path: { payable_id: i } }, {
|
|
9
|
+
onSuccess: (e) => {
|
|
10
|
+
Promise.all([o.finops.getPayablesId.invalidateQueries({ parameters: { path: { payable_id: e.id } } }, s), o.finops.getPayables.invalidateQueries(s)]), n.success(c._("Payable “{document_id}” has been canceled", { document_id: e.document_id })), a?.(e.id);
|
|
11
|
+
},
|
|
10
12
|
onError: (t) => {
|
|
11
|
-
n.error(e(
|
|
13
|
+
n.error(e(c, t));
|
|
12
14
|
}
|
|
13
15
|
});
|
|
14
16
|
};
|
|
15
17
|
//#endregion
|
|
16
|
-
export { i as
|
|
18
|
+
export { i as useCancelPayableById };
|
|
@@ -1,18 +1,42 @@
|
|
|
1
1
|
import { getAPIErrorMessage as e } from "./index26.js";
|
|
2
2
|
import { useMoniteContext as t } from "./index45.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useUpdatePayable as n } from "./index273.js";
|
|
4
|
+
import { toast as r } from "react-hot-toast";
|
|
5
|
+
import { useLingui as i } from "@lingui/react";
|
|
5
6
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js
|
|
6
|
-
var
|
|
7
|
-
let { api:
|
|
8
|
-
return o.finops.postPayablesIdCancel.useMutation({ path: { payable_id: i } }, {
|
|
7
|
+
var a = ({ payableId: a, counterpartId: o, isCounterpartAIMatched: s, AISuggestions: c, onSubmitted: l }) => {
|
|
8
|
+
let { api: u, queryClient: d } = t(), { i18n: f } = i(), p = n(), m = u.finops.postPayablesIdSubmitForApproval.useMutation({ path: { payable_id: a } }, {
|
|
9
9
|
onSuccess: (e) => {
|
|
10
|
-
Promise.all([
|
|
10
|
+
Promise.all([
|
|
11
|
+
u.finops.getPayablesId.invalidateQueries({ parameters: { path: { payable_id: e.id } } }, d),
|
|
12
|
+
u.finops.getPayables.invalidateQueries(d),
|
|
13
|
+
u.finops.getApprovalRequests.invalidateQueries(d)
|
|
14
|
+
]), r.success(f._("Payable \"{document_id}\" has been submitted", { document_id: e.document_id }));
|
|
11
15
|
},
|
|
12
16
|
onError: (t) => {
|
|
13
|
-
|
|
17
|
+
r.error(e(f, t));
|
|
14
18
|
}
|
|
15
19
|
});
|
|
20
|
+
return {
|
|
21
|
+
submitForApproval: async () => {
|
|
22
|
+
if (o && s) try {
|
|
23
|
+
await p.mutateAsync({
|
|
24
|
+
path: { payable_id: a },
|
|
25
|
+
body: {
|
|
26
|
+
counterpart_id: o,
|
|
27
|
+
...c?.bank_account_id && { counterpart_bank_account_id: c?.bank_account_id },
|
|
28
|
+
...c?.address_id && { counterpart_address_id: c?.address_id },
|
|
29
|
+
...c?.vat_id_id && { counterpart_vat_id_id: c?.vat_id_id }
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
} catch (e) {
|
|
33
|
+
console.error(e), r.error(f._("Failed to submit Payable with AI suggestion. Please try editing the Payable and submit again."));
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
await m.mutateAsync(), l?.(a);
|
|
37
|
+
},
|
|
38
|
+
...m
|
|
39
|
+
};
|
|
16
40
|
};
|
|
17
41
|
//#endregion
|
|
18
|
-
export {
|
|
42
|
+
export { a as useSubmitPayableForApproval };
|
|
@@ -1,42 +1,18 @@
|
|
|
1
1
|
import { getAPIErrorMessage as e } from "./index26.js";
|
|
2
2
|
import { useMoniteContext as t } from "./index45.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useLingui as i } from "@lingui/react";
|
|
3
|
+
import { toast as n } from "react-hot-toast";
|
|
4
|
+
import { useLingui as r } from "@lingui/react";
|
|
6
5
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js
|
|
7
|
-
var
|
|
8
|
-
let { api:
|
|
6
|
+
var i = (i, a) => {
|
|
7
|
+
let { api: o, queryClient: s } = t(), { i18n: c } = r();
|
|
8
|
+
return o.finops.postPayablesIdReject.useMutation({ path: { payable_id: i } }, {
|
|
9
9
|
onSuccess: (e) => {
|
|
10
|
-
Promise.all([
|
|
11
|
-
u.finops.getPayablesId.invalidateQueries({ parameters: { path: { payable_id: e.id } } }, d),
|
|
12
|
-
u.finops.getPayables.invalidateQueries(d),
|
|
13
|
-
u.finops.getApprovalRequests.invalidateQueries(d)
|
|
14
|
-
]), r.success(f._("Payable \"{document_id}\" has been submitted", { document_id: e.document_id }));
|
|
10
|
+
Promise.all([o.finops.getPayablesId.invalidateQueries({ parameters: { path: { payable_id: e.id } } }, s), o.finops.getPayables.invalidateQueries(s)]), n.success(c._("Payable \"{document_id}\" has been force rejected", { document_id: e.document_id })), a?.(e.id);
|
|
15
11
|
},
|
|
16
12
|
onError: (t) => {
|
|
17
|
-
|
|
13
|
+
n.error(e(c, t));
|
|
18
14
|
}
|
|
19
15
|
});
|
|
20
|
-
return {
|
|
21
|
-
submitForApproval: async () => {
|
|
22
|
-
if (o && s) try {
|
|
23
|
-
await p.mutateAsync({
|
|
24
|
-
path: { payable_id: a },
|
|
25
|
-
body: {
|
|
26
|
-
counterpart_id: o,
|
|
27
|
-
...c?.bank_account_id && { counterpart_bank_account_id: c?.bank_account_id },
|
|
28
|
-
...c?.address_id && { counterpart_address_id: c?.address_id },
|
|
29
|
-
...c?.vat_id_id && { counterpart_vat_id_id: c?.vat_id_id }
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
} catch (e) {
|
|
33
|
-
console.error(e), r.error(f._("Failed to submit Payable with AI suggestion. Please try editing the Payable and submit again."));
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
await m.mutateAsync(), l?.(a);
|
|
37
|
-
},
|
|
38
|
-
...m
|
|
39
|
-
};
|
|
40
16
|
};
|
|
41
17
|
//#endregion
|
|
42
|
-
export {
|
|
18
|
+
export { i as useForceRejectPayable };
|