@tesouro/embedded-components-react 0.3.20 → 0.3.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.css +9 -0
- package/dist/lib/monite-sdk.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +16 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index480.js +13 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js +19 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js +98 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index483.js +43 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index484.js +30 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index485.js +1 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index486.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index487.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index488.js +4 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index489.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index490.js +18 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index491.js +8 -105
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index492.js +102 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index493.js +36 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index494.js +44 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index495.js +72 -100
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index496.js +99 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index497.js +35 -178
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index498.js +171 -125
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index499.js +134 -123
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index500.js +125 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index501.js +63 -232
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index502.js +248 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index503.js +8 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index504.js +5 -456
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index505.js +455 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index506.js +17 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index507.js +13 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index508.js +51 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index509.js +46 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index510.js +13 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index511.js +39 -144
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index512.js +143 -112
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index513.js +114 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index514.js +33 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index515.js +32 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index516.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index517.js +19 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index518.js +20 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index519.js +73 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index520.js +18 -172
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index521.js +149 -116
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index522.js +136 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index523.js +31 -115
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index524.js +116 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index525.js +10 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index526.js +46 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index527.js +13 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index528.js +21 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index529.js +26 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index530.js +36 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index531.js +77 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index532.js +50 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index533.js +34 -89
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index534.js +86 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index535.js +54 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index536.js +1 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index537.js +40 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index538.js +0 -135
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index539.js +129 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index540.js +105 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index541.js +48 -779
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index542.js +780 -87
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index543.js +84 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index544.js +105 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index545.js +6 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index546.js +23 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index547.js +13 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index548.js +2 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index549.js +25 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index550.js +14 -171
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index551.js +163 -200
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index552.js +204 -78
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index553.js +82 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index554.js +17 -158
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index555.js +146 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index556.js +95 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index557.js +46 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index558.js +4 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index559.js +13 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index560.js +27 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index561.js +0 -186
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index562.js +186 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index563.js +0 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index564.js +41 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index565.js +5 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index566.js +20 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index567.js +74 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index568.js +16 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index569.js +19 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index570.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index571.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index572.js +11 -131
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index573.js +129 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index574.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index575.js +8 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index576.js +4 -221
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index577.js +219 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index578.js +12 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index579.js +32 -181
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index580.js +168 -189
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index581.js +192 -88
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index582.js +97 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index583.js +63 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index584.js +46 -83
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index585.js +91 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index586.js +39 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index587.js +63 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index588.js +85 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index589.js +12 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index590.js +25 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index591.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index592.js +4 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index593.js +23 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index594.js +1 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index595.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index596.js +4 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index597.js +9 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index598.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index599.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index600.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index601.js +8 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index602.js +6 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index603.js +17 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index604.js +66 -113
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index605.js +104 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index606.js +72 -138
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index607.js +144 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index608.js +28 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index609.js +14 -87
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index610.js +91 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index611.js +3 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index612.js +22 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index613.js +71 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index614.js +0 -65
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index615.js +66 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index616.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index617.js +2 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index618.js +33 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index619.js +14 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index620.js +29 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index621.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index622.js +2 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index623.js +97 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.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/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +1 -1
- package/package.json +1 -1
|
@@ -1,136 +1 @@
|
|
|
1
|
-
import { useCurrencies as e } from "./index63.js";
|
|
2
|
-
import "./index217.js";
|
|
3
|
-
import { manualPaymentRecordValidationSchema as t } from "./index98.js";
|
|
4
|
-
import { RHFTextField as n } from "./index302.js";
|
|
5
|
-
import "./index303.js";
|
|
6
|
-
import { safeZodResolver as r } from "./index391.js";
|
|
7
|
-
import { RHFDatePicker as i } from "./index534.js";
|
|
8
|
-
import "./index535.js";
|
|
9
|
-
import { RHFTimePicker as a } from "./index536.js";
|
|
10
1
|
import "./index537.js";
|
|
11
|
-
import { useEffect as o, useMemo as s } from "react";
|
|
12
|
-
import { Fragment as c, jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
|
|
13
|
-
import { Button as d, CircularProgress as f, DialogActions as p, DialogContent as m, DialogTitle as h, FormHelperText as g, Grid as _ } from "@mui/material";
|
|
14
|
-
import { useLingui as v } from "@lingui/react";
|
|
15
|
-
import { useForm as y } from "react-hook-form";
|
|
16
|
-
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index538.js
|
|
17
|
-
var b = ({ invoice: b, initialValues: x, isLoading: S, onSubmit: C, onCancel: w }) => {
|
|
18
|
-
let { i18n: T } = v(), { formatCurrencyToDisplay: E, getSymbolFromCurrency: D } = e(), { control: O, handleSubmit: k, reset: A, setValue: j } = y({
|
|
19
|
-
resolver: r(t(T, b.amount_due)),
|
|
20
|
-
defaultValues: s(() => x ?? {
|
|
21
|
-
amount: 0,
|
|
22
|
-
payment_date: /* @__PURE__ */ new Date(),
|
|
23
|
-
payment_time: /* @__PURE__ */ new Date()
|
|
24
|
-
}, [x])
|
|
25
|
-
});
|
|
26
|
-
o(() => {
|
|
27
|
-
A(x);
|
|
28
|
-
}, [x, A]);
|
|
29
|
-
let M = D(b.currency);
|
|
30
|
-
return /* @__PURE__ */ l(c, { children: /* @__PURE__ */ u("form", {
|
|
31
|
-
onSubmit: k(C),
|
|
32
|
-
children: [
|
|
33
|
-
/* @__PURE__ */ l(h, {
|
|
34
|
-
sx: {
|
|
35
|
-
px: 4,
|
|
36
|
-
pt: 4
|
|
37
|
-
},
|
|
38
|
-
variant: "h3",
|
|
39
|
-
id: "dialog-title",
|
|
40
|
-
children: T._("Record payment")
|
|
41
|
-
}),
|
|
42
|
-
/* @__PURE__ */ l(m, {
|
|
43
|
-
sx: { p: 4 },
|
|
44
|
-
children: /* @__PURE__ */ u(_, {
|
|
45
|
-
container: !0,
|
|
46
|
-
spacing: 1,
|
|
47
|
-
children: [
|
|
48
|
-
/* @__PURE__ */ u(_, {
|
|
49
|
-
item: !0,
|
|
50
|
-
xs: 12,
|
|
51
|
-
children: [/* @__PURE__ */ l(n, {
|
|
52
|
-
label: T._("Amount"),
|
|
53
|
-
name: "amount",
|
|
54
|
-
placeholder: "0",
|
|
55
|
-
control: O,
|
|
56
|
-
type: "number",
|
|
57
|
-
sx: { "::after": {
|
|
58
|
-
content: `"${M}"`,
|
|
59
|
-
position: "absolute",
|
|
60
|
-
right: "16px",
|
|
61
|
-
bottom: 0,
|
|
62
|
-
transform: "translateY(-50%)",
|
|
63
|
-
fontSize: "16px",
|
|
64
|
-
color: "rgba(0,0,0,0.28)",
|
|
65
|
-
pointerEvents: "none"
|
|
66
|
-
} },
|
|
67
|
-
fullWidth: !0,
|
|
68
|
-
required: !0
|
|
69
|
-
}), /* @__PURE__ */ u(g, { children: [
|
|
70
|
-
T._("Enter full amount due of"),
|
|
71
|
-
" ",
|
|
72
|
-
/* @__PURE__ */ l(d, {
|
|
73
|
-
variant: "text",
|
|
74
|
-
sx: { textDecoration: "underline" },
|
|
75
|
-
onClick: () => j("amount", b.amount_due / 100),
|
|
76
|
-
children: E(b.amount_due, b.currency)
|
|
77
|
-
})
|
|
78
|
-
] })]
|
|
79
|
-
}),
|
|
80
|
-
/* @__PURE__ */ l(_, {
|
|
81
|
-
item: !0,
|
|
82
|
-
xs: 6,
|
|
83
|
-
children: /* @__PURE__ */ l(i, {
|
|
84
|
-
label: T._("Date"),
|
|
85
|
-
name: "payment_date",
|
|
86
|
-
control: O
|
|
87
|
-
})
|
|
88
|
-
}),
|
|
89
|
-
/* @__PURE__ */ l(_, {
|
|
90
|
-
item: !0,
|
|
91
|
-
xs: 6,
|
|
92
|
-
children: /* @__PURE__ */ l(a, {
|
|
93
|
-
label: T._("Time"),
|
|
94
|
-
name: "payment_time",
|
|
95
|
-
control: O,
|
|
96
|
-
sx: { "::after": {
|
|
97
|
-
content: "\"UTC\"",
|
|
98
|
-
position: "absolute",
|
|
99
|
-
right: "16px",
|
|
100
|
-
bottom: 0,
|
|
101
|
-
transform: "translateY(-50%)",
|
|
102
|
-
fontSize: "16px",
|
|
103
|
-
color: "rgba(0,0,0,0.28)",
|
|
104
|
-
pointerEvents: "none"
|
|
105
|
-
} },
|
|
106
|
-
fullWidth: !0,
|
|
107
|
-
required: !0
|
|
108
|
-
})
|
|
109
|
-
})
|
|
110
|
-
]
|
|
111
|
-
})
|
|
112
|
-
}),
|
|
113
|
-
/* @__PURE__ */ u(p, {
|
|
114
|
-
sx: {
|
|
115
|
-
px: 4,
|
|
116
|
-
pb: 4
|
|
117
|
-
},
|
|
118
|
-
children: [/* @__PURE__ */ l(d, {
|
|
119
|
-
autoFocus: !0,
|
|
120
|
-
onClick: w,
|
|
121
|
-
children: T._("Cancel")
|
|
122
|
-
}), /* @__PURE__ */ l(d, {
|
|
123
|
-
variant: "contained",
|
|
124
|
-
startIcon: S ? /* @__PURE__ */ l(f, {
|
|
125
|
-
size: 20,
|
|
126
|
-
color: "warning"
|
|
127
|
-
}) : null,
|
|
128
|
-
type: "submit",
|
|
129
|
-
children: T._("Save")
|
|
130
|
-
})]
|
|
131
|
-
})
|
|
132
|
-
]
|
|
133
|
-
}) });
|
|
134
|
-
};
|
|
135
|
-
//#endregion
|
|
136
|
-
export { b as PaymentRecordForm };
|
|
@@ -1,109 +1,136 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
7
|
-
import "./
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { useCurrencies as e } from "./index63.js";
|
|
2
|
+
import "./index217.js";
|
|
3
|
+
import { manualPaymentRecordValidationSchema as t } from "./index98.js";
|
|
4
|
+
import { RHFTextField as n } from "./index302.js";
|
|
5
|
+
import "./index303.js";
|
|
6
|
+
import { safeZodResolver as r } from "./index391.js";
|
|
7
|
+
import { RHFDatePicker as i } from "./index535.js";
|
|
8
|
+
import "./index536.js";
|
|
9
|
+
import { RHFTimePicker as a } from "./index537.js";
|
|
10
|
+
import "./index538.js";
|
|
11
|
+
import { useEffect as o, useMemo as s } from "react";
|
|
12
|
+
import { Fragment as c, jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
|
|
13
|
+
import { Button as d, CircularProgress as f, DialogActions as p, DialogContent as m, DialogTitle as h, FormHelperText as g, Grid as _ } from "@mui/material";
|
|
14
|
+
import { useLingui as v } from "@lingui/react";
|
|
15
|
+
import { useForm as y } from "react-hook-form";
|
|
14
16
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index539.js
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
17
|
+
var b = ({ invoice: b, initialValues: x, isLoading: S, onSubmit: C, onCancel: w }) => {
|
|
18
|
+
let { i18n: T } = v(), { formatCurrencyToDisplay: E, getSymbolFromCurrency: D } = e(), { control: O, handleSubmit: k, reset: A, setValue: j } = y({
|
|
19
|
+
resolver: r(t(T, b.amount_due)),
|
|
20
|
+
defaultValues: s(() => x ?? {
|
|
21
|
+
amount: 0,
|
|
22
|
+
payment_date: /* @__PURE__ */ new Date(),
|
|
23
|
+
payment_time: /* @__PURE__ */ new Date()
|
|
24
|
+
}, [x])
|
|
25
|
+
});
|
|
26
|
+
o(() => {
|
|
27
|
+
A(x);
|
|
28
|
+
}, [x, A]);
|
|
29
|
+
let M = D(b.currency);
|
|
30
|
+
return /* @__PURE__ */ l(c, { children: /* @__PURE__ */ u("form", {
|
|
31
|
+
onSubmit: k(C),
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ l(h, {
|
|
34
|
+
sx: {
|
|
35
|
+
px: 4,
|
|
36
|
+
pt: 4
|
|
37
|
+
},
|
|
38
|
+
variant: "h3",
|
|
39
|
+
id: "dialog-title",
|
|
40
|
+
children: T._("Record payment")
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ l(m, {
|
|
43
|
+
sx: { p: 4 },
|
|
44
|
+
children: /* @__PURE__ */ u(_, {
|
|
45
|
+
container: !0,
|
|
46
|
+
spacing: 1,
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ u(_, {
|
|
49
|
+
item: !0,
|
|
50
|
+
xs: 12,
|
|
51
|
+
children: [/* @__PURE__ */ l(n, {
|
|
52
|
+
label: T._("Amount"),
|
|
53
|
+
name: "amount",
|
|
54
|
+
placeholder: "0",
|
|
55
|
+
control: O,
|
|
56
|
+
type: "number",
|
|
57
|
+
sx: { "::after": {
|
|
58
|
+
content: `"${M}"`,
|
|
59
|
+
position: "absolute",
|
|
60
|
+
right: "16px",
|
|
61
|
+
bottom: 0,
|
|
62
|
+
transform: "translateY(-50%)",
|
|
63
|
+
fontSize: "16px",
|
|
64
|
+
color: "rgba(0,0,0,0.28)",
|
|
65
|
+
pointerEvents: "none"
|
|
66
|
+
} },
|
|
67
|
+
fullWidth: !0,
|
|
68
|
+
required: !0
|
|
69
|
+
}), /* @__PURE__ */ u(g, { children: [
|
|
70
|
+
T._("Enter full amount due of"),
|
|
71
|
+
" ",
|
|
72
|
+
/* @__PURE__ */ l(d, {
|
|
73
|
+
variant: "text",
|
|
74
|
+
sx: { textDecoration: "underline" },
|
|
75
|
+
onClick: () => j("amount", b.amount_due / 100),
|
|
76
|
+
children: E(b.amount_due, b.currency)
|
|
77
|
+
})
|
|
78
|
+
] })]
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ l(_, {
|
|
81
|
+
item: !0,
|
|
82
|
+
xs: 6,
|
|
83
|
+
children: /* @__PURE__ */ l(i, {
|
|
84
|
+
label: T._("Date"),
|
|
85
|
+
name: "payment_date",
|
|
86
|
+
control: O
|
|
87
|
+
})
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ l(_, {
|
|
90
|
+
item: !0,
|
|
91
|
+
xs: 6,
|
|
92
|
+
children: /* @__PURE__ */ l(a, {
|
|
93
|
+
label: T._("Time"),
|
|
94
|
+
name: "payment_time",
|
|
95
|
+
control: O,
|
|
96
|
+
sx: { "::after": {
|
|
97
|
+
content: "\"UTC\"",
|
|
98
|
+
position: "absolute",
|
|
99
|
+
right: "16px",
|
|
100
|
+
bottom: 0,
|
|
101
|
+
transform: "translateY(-50%)",
|
|
102
|
+
fontSize: "16px",
|
|
103
|
+
color: "rgba(0,0,0,0.28)",
|
|
104
|
+
pointerEvents: "none"
|
|
105
|
+
} },
|
|
106
|
+
fullWidth: !0,
|
|
107
|
+
required: !0
|
|
108
|
+
})
|
|
109
|
+
})
|
|
110
|
+
]
|
|
111
|
+
})
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ u(p, {
|
|
79
114
|
sx: {
|
|
80
|
-
|
|
81
|
-
|
|
115
|
+
px: 4,
|
|
116
|
+
pb: 4
|
|
82
117
|
},
|
|
83
|
-
children: [/* @__PURE__ */
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}), /* @__PURE__ */ u(p, {
|
|
118
|
+
children: [/* @__PURE__ */ l(d, {
|
|
119
|
+
autoFocus: !0,
|
|
120
|
+
onClick: w,
|
|
121
|
+
children: T._("Cancel")
|
|
122
|
+
}), /* @__PURE__ */ l(d, {
|
|
89
123
|
variant: "contained",
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
124
|
+
startIcon: S ? /* @__PURE__ */ l(f, {
|
|
125
|
+
size: 20,
|
|
126
|
+
color: "warning"
|
|
127
|
+
}) : null,
|
|
128
|
+
type: "submit",
|
|
129
|
+
children: T._("Save")
|
|
93
130
|
})]
|
|
94
|
-
})
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
initialValues: {
|
|
98
|
-
amount: T.amount ? e(T.amount) : 0,
|
|
99
|
-
payment_date: T.payment_date,
|
|
100
|
-
payment_time: T.payment_time
|
|
101
|
-
},
|
|
102
|
-
isLoading: B,
|
|
103
|
-
onCancel: A,
|
|
104
|
-
onSubmit: L
|
|
105
|
-
})
|
|
106
|
-
})] });
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
}) });
|
|
107
134
|
};
|
|
108
135
|
//#endregion
|
|
109
|
-
export {
|
|
136
|
+
export { b as PaymentRecordForm };
|
|
@@ -1,54 +1,109 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { fromMinorUnits as e, toMinorUnits as t } from "./index13.js";
|
|
2
|
+
import { useMoniteContext as n } from "./index47.js";
|
|
3
|
+
import { useEntityUserByAuthToken as r } from "./index133.js";
|
|
4
|
+
import { useCreatePaymentRecord as i } from "./index138.js";
|
|
5
|
+
import "./index142.js";
|
|
6
|
+
import { useRootElements as a } from "./index206.js";
|
|
7
|
+
import "./index207.js";
|
|
8
|
+
import { ManualPaymentRecordDetails as o } from "./index534.js";
|
|
9
|
+
import { PaymentRecordForm as s } from "./index539.js";
|
|
10
|
+
import { useState as c } from "react";
|
|
11
|
+
import { Fragment as l, jsx as u, jsxs as d } from "@emotion/react/jsx-runtime";
|
|
12
|
+
import { Box as f, Button as p, Dialog as m, DialogActions as h, DialogContent as g } from "@mui/material";
|
|
13
|
+
import { useLingui as _ } from "@lingui/react";
|
|
11
14
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index540.js
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
15
|
+
var v = {
|
|
16
|
+
amount: 0,
|
|
17
|
+
payment_date: /* @__PURE__ */ new Date(),
|
|
18
|
+
payment_time: /* @__PURE__ */ new Date(),
|
|
19
|
+
created_by: ""
|
|
20
|
+
}, y = ({ children: y, invoice: b }) => {
|
|
21
|
+
let [x, S] = c(!1), [C, w] = c(!1), [T, E] = c(v), { i18n: D } = _(), { root: O } = a(), k = () => S(!0), A = () => S(!1), { api: j, queryClient: M } = n(), { mutate: N, isPending: P } = i(), { data: F, isLoading: I } = r(), L = (e) => {
|
|
22
|
+
E({
|
|
23
|
+
...e,
|
|
24
|
+
amount: t(e?.amount ?? 0),
|
|
25
|
+
created_by: F?.id ?? ""
|
|
26
|
+
}), w(!0);
|
|
27
|
+
}, R = () => {
|
|
28
|
+
w(!1), E(v);
|
|
29
|
+
}, z = () => {
|
|
30
|
+
let e = new Date(T.payment_date).setHours(T.payment_time.getHours(), T.payment_time.getMinutes()), t = new Date(e);
|
|
31
|
+
N({
|
|
32
|
+
amount: T?.amount ?? 0,
|
|
33
|
+
currency: b.currency,
|
|
34
|
+
paid_at: t.toISOString(),
|
|
35
|
+
object: {
|
|
36
|
+
id: b.id,
|
|
37
|
+
type: "receivable"
|
|
38
|
+
},
|
|
39
|
+
payment_intent_id: b.id,
|
|
40
|
+
entity_user_id: F?.id,
|
|
41
|
+
status: "succeeded"
|
|
42
|
+
}, { onSuccess: () => {
|
|
43
|
+
j.finops.getReceivablesId.invalidateQueries({ parameters: { path: { receivable_id: b.id } } }, M), j.finops.getReceivables.invalidateQueries(M), A(), R();
|
|
44
|
+
} });
|
|
45
|
+
}, B = P || I;
|
|
46
|
+
return [
|
|
47
|
+
"draft",
|
|
48
|
+
"paid",
|
|
49
|
+
"canceled",
|
|
50
|
+
"deleted",
|
|
51
|
+
"accepted",
|
|
52
|
+
"recurring",
|
|
53
|
+
"expired",
|
|
54
|
+
"declined",
|
|
55
|
+
"uncollectible"
|
|
56
|
+
].includes(b.status) ? null : /* @__PURE__ */ d(l, { children: [y({ openModal: k }), /* @__PURE__ */ u(m, {
|
|
57
|
+
open: x,
|
|
58
|
+
onClose: A,
|
|
59
|
+
container: O,
|
|
60
|
+
"aria-labelledby": "dialog-title",
|
|
61
|
+
fullWidth: !0,
|
|
62
|
+
maxWidth: "sm",
|
|
63
|
+
children: C ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(g, {
|
|
64
|
+
sx: { p: 4 },
|
|
65
|
+
children: /* @__PURE__ */ u(o, {
|
|
66
|
+
invoice: b,
|
|
67
|
+
paymentRecords: T
|
|
49
68
|
})
|
|
50
|
-
|
|
51
|
-
|
|
69
|
+
}), /* @__PURE__ */ d(h, {
|
|
70
|
+
sx: {
|
|
71
|
+
px: 4,
|
|
72
|
+
pb: 4,
|
|
73
|
+
justifyContent: "space-between"
|
|
74
|
+
},
|
|
75
|
+
children: [/* @__PURE__ */ u(p, {
|
|
76
|
+
onClick: A,
|
|
77
|
+
children: D._("Cancel")
|
|
78
|
+
}), /* @__PURE__ */ d(f, {
|
|
79
|
+
sx: {
|
|
80
|
+
display: "flex",
|
|
81
|
+
gap: 2
|
|
82
|
+
},
|
|
83
|
+
children: [/* @__PURE__ */ u(p, {
|
|
84
|
+
variant: "outlined",
|
|
85
|
+
disabled: B,
|
|
86
|
+
onClick: () => w(!1),
|
|
87
|
+
children: D._("Edit record")
|
|
88
|
+
}), /* @__PURE__ */ u(p, {
|
|
89
|
+
variant: "contained",
|
|
90
|
+
disabled: B,
|
|
91
|
+
onClick: z,
|
|
92
|
+
children: D._("Confirm")
|
|
93
|
+
})]
|
|
94
|
+
})]
|
|
95
|
+
})] }) : /* @__PURE__ */ u(s, {
|
|
96
|
+
invoice: b,
|
|
97
|
+
initialValues: {
|
|
98
|
+
amount: T.amount ? e(T.amount) : 0,
|
|
99
|
+
payment_date: T.payment_date,
|
|
100
|
+
payment_time: T.payment_time
|
|
101
|
+
},
|
|
102
|
+
isLoading: B,
|
|
103
|
+
onCancel: A,
|
|
104
|
+
onSubmit: L
|
|
105
|
+
})
|
|
106
|
+
})] });
|
|
52
107
|
};
|
|
53
108
|
//#endregion
|
|
54
|
-
export {
|
|
109
|
+
export { y as RecordManualPaymentModal };
|