@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,54 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { useMoniteContext as e } from "./index47.js";
|
|
2
|
+
import { useCurrencies as t } from "./index63.js";
|
|
3
|
+
import { useGetReceivableById as n } from "./index141.js";
|
|
4
|
+
import "./index217.js";
|
|
5
|
+
import { InvoiceStatusChip as r } from "./index238.js";
|
|
6
|
+
import { InvoiceRecurrenceIterationStatusChip as i } from "./index530.js";
|
|
7
|
+
import { ChevronRight as a } from "lucide-react";
|
|
8
|
+
import { parseISO as o } from "date-fns";
|
|
9
|
+
import { jsx as s, jsxs as c } from "@emotion/react/jsx-runtime";
|
|
10
|
+
import { useLingui as l } from "@lingui/react";
|
|
11
|
+
import { twMerge as u } from "tailwind-merge";
|
|
10
12
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index531.js
|
|
11
|
-
var
|
|
12
|
-
let {
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
children:
|
|
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
|
-
|
|
13
|
+
var d = ({ iteration: l, invoice: d, i18n: f, onRowClick: p }) => {
|
|
14
|
+
let { locale: m } = e(), { formatCurrencyToDisplay: h } = t(), g = !!l?.issued_invoice_id, { data: _ } = n(l?.issued_invoice_id ?? "", g), v = !!(g && _?.id);
|
|
15
|
+
return /* @__PURE__ */ c("tr", {
|
|
16
|
+
className: u("ttw:border-t ttw:border-border", v && "ttw:hover:cursor-pointer"),
|
|
17
|
+
...v && p && _?.id && { onClick: () => p(_.id) },
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ s("td", {
|
|
20
|
+
className: "ttw:text-left ttw:h-9 ttw:py-2 ttw:pr-2 ttw:text-sm ttw:leading-5 ttw:font-normal",
|
|
21
|
+
children: l?.issue_at ? f.date(o(l.issue_at), m.dateFormat) : "-"
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ s("td", {
|
|
24
|
+
className: "ttw:text-left ttw:h-9 ttw:py-2 ttw:px-2 ttw:text-sm ttw:leading-5 ttw:font-normal",
|
|
25
|
+
children: g && _ ? h(_?.total_amount, _?.currency) : h(d?.total_amount, d?.currency)
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ s("td", {
|
|
28
|
+
className: "ttw:text-left ttw:h-9 ttw:py-2 ttw:px-2",
|
|
29
|
+
children: g && _ ? /* @__PURE__ */ s(r, { status: _?.status }) : /* @__PURE__ */ s(i, { status: l?.status })
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ s("td", {
|
|
32
|
+
className: "ttw:text-left ttw:h-9 ttw:py-2 ttw:px-2 ttw:text-sm ttw:leading-5 ttw:font-normal",
|
|
33
|
+
children: g ? _?.document_id : "-"
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ s("td", {
|
|
36
|
+
className: "ttw:text-right ttw:h-9 ttw:w-6 ttw:py-2 ttw:pl-2 ttw:text-muted-foreground",
|
|
37
|
+
children: v ? /* @__PURE__ */ s(a, {
|
|
38
|
+
className: "ttw:inline ttw:size-4",
|
|
39
|
+
"aria-hidden": "true"
|
|
40
|
+
}) : null
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
}, f = ({ invoice: e, recurrence: t, openInvoiceDetails: n }) => {
|
|
45
|
+
let { i18n: r } = l();
|
|
46
|
+
return /* @__PURE__ */ c("table", {
|
|
47
|
+
className: "ttw:w-full",
|
|
48
|
+
children: [/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ c("tr", { children: [
|
|
49
|
+
/* @__PURE__ */ s("th", {
|
|
50
|
+
className: "ttw:text-left ttw:h-10 ttw:pr-2 ttw:text-sm ttw:font-medium ttw:leading-5",
|
|
51
|
+
children: r._("Issue date")
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ s("th", {
|
|
54
|
+
className: "ttw:text-left ttw:h-10 ttw:px-2 ttw:text-sm ttw:font-medium ttw:leading-5",
|
|
55
|
+
children: r._("Amount")
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ s("th", {
|
|
58
|
+
className: "ttw:text-left ttw:h-10 ttw:px-2 ttw:text-sm ttw:font-medium ttw:leading-5",
|
|
59
|
+
children: r._("Status")
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ s("th", {
|
|
62
|
+
className: "ttw:text-left ttw:h-10 ttw:px-2 ttw:text-sm ttw:font-medium ttw:leading-5",
|
|
63
|
+
children: r._("Number")
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ s("th", {
|
|
66
|
+
className: "ttw:h-10 ttw:w-6 ttw:pl-2",
|
|
67
|
+
"aria-hidden": "true"
|
|
68
|
+
})
|
|
69
|
+
] }) }), /* @__PURE__ */ s("tbody", { children: t?.iterations?.map((t, i) => /* @__PURE__ */ s(d, {
|
|
70
|
+
iteration: t,
|
|
71
|
+
invoice: e,
|
|
72
|
+
i18n: r,
|
|
73
|
+
onRowClick: n
|
|
74
|
+
}, r._("iteration-{iteration}-{index}", {
|
|
75
|
+
iteration: t?.iteration,
|
|
76
|
+
index: i
|
|
77
|
+
}))) })]
|
|
51
78
|
});
|
|
52
79
|
};
|
|
53
80
|
//#endregion
|
|
54
|
-
export {
|
|
81
|
+
export { f as InvoiceDetailsTabScheduledInvoices };
|
|
@@ -1,37 +1,54 @@
|
|
|
1
1
|
import { Button as e } from "./index56.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { Textarea as t } from "./index106.js";
|
|
3
|
+
import { LoadingSpinner as n } from "./index51.js";
|
|
4
|
+
import { Dialog as r, DialogContent as i, DialogDescription as a, DialogFooter as o, DialogHeader as s, DialogTitle as c } from "./index58.js";
|
|
5
|
+
import { Label as l } from "./index87.js";
|
|
6
|
+
import { useMarkAsUncollectibleReceivableById as u } from "./index159.js";
|
|
7
|
+
import { useState as d } from "react";
|
|
8
|
+
import { jsx as f, jsxs as p } from "@emotion/react/jsx-runtime";
|
|
9
|
+
import { useLingui as m } from "@lingui/react";
|
|
8
10
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index532.js
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
var h = ({ invoiceId: h, open: g, onClose: _, onMarkAsUncollectible: v }) => {
|
|
12
|
+
let { i18n: y } = m(), [b, x] = d(""), { mutate: S, isPending: C } = u(h, v);
|
|
13
|
+
return /* @__PURE__ */ f(r, {
|
|
14
|
+
open: g,
|
|
15
|
+
onOpenChange: _,
|
|
16
|
+
children: /* @__PURE__ */ p(i, {
|
|
17
|
+
showCloseButton: !1,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ p(s, { children: [/* @__PURE__ */ f(c, { children: y._("Mark invoice as uncollectible?") }), /* @__PURE__ */ p(a, { children: [
|
|
20
|
+
/* @__PURE__ */ f("p", { children: y._("This invoice will change its status, and you won't be able to receive or log any payment against it.") }),
|
|
21
|
+
/* @__PURE__ */ f("br", {}),
|
|
22
|
+
/* @__PURE__ */ f("p", { children: y._("For bookkeeping purposes, this is a write-off and has tax implications.") })
|
|
23
|
+
] })] }),
|
|
24
|
+
/* @__PURE__ */ p("div", {
|
|
25
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
26
|
+
children: [/* @__PURE__ */ f(l, {
|
|
27
|
+
htmlFor: "comment",
|
|
28
|
+
children: y._("Comment (optional)")
|
|
29
|
+
}), /* @__PURE__ */ f(t, {
|
|
30
|
+
id: "comment",
|
|
31
|
+
placeholder: y._("Add a comment"),
|
|
32
|
+
value: b,
|
|
33
|
+
onChange: (e) => x(e.target.value)
|
|
34
|
+
})]
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ p(o, { children: [/* @__PURE__ */ f(e, {
|
|
37
|
+
variant: "outline",
|
|
38
|
+
onClick: _,
|
|
39
|
+
children: y._("Cancel")
|
|
40
|
+
}), /* @__PURE__ */ p(e, {
|
|
41
|
+
onClick: () => {
|
|
42
|
+
S({ comment: b.trim() }, { onSuccess: () => {
|
|
43
|
+
_();
|
|
44
|
+
} });
|
|
45
|
+
},
|
|
46
|
+
disabled: C,
|
|
47
|
+
children: [C && /* @__PURE__ */ f(n, { className: "ttw:w-5 ttw:h-5 ttw:border-inherit ttw:border-t-transparent" }), y._("Mark as uncollectible")]
|
|
48
|
+
})] })
|
|
49
|
+
]
|
|
22
50
|
})
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
children: p.map((e) => {
|
|
26
|
-
let t = a[e];
|
|
27
|
-
return /* @__PURE__ */ f(r, {
|
|
28
|
-
variant: e === "delete" ? "destructive" : "default",
|
|
29
|
-
disabled: _?.(e),
|
|
30
|
-
onClick: () => g(e),
|
|
31
|
-
children: [/* @__PURE__ */ d(t, { className: "ttw:size-4" }), h(e)]
|
|
32
|
-
}, e);
|
|
33
|
-
})
|
|
34
|
-
})] });
|
|
35
|
-
}
|
|
51
|
+
});
|
|
52
|
+
};
|
|
36
53
|
//#endregion
|
|
37
|
-
export {
|
|
54
|
+
export { h as MarkAsUncollectibleModal };
|
|
@@ -1,92 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
7
|
-
import { jsx as
|
|
8
|
-
import { Alert as o, Box as s, Skeleton as c, Typography as l } from "@mui/material";
|
|
9
|
-
import { useLingui as u } from "@lingui/react";
|
|
10
|
-
import d from "@mui/icons-material/DriveFileRenameOutline";
|
|
1
|
+
import { Button as e } from "./index56.js";
|
|
2
|
+
import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i } from "./index55.js";
|
|
3
|
+
import { ACTION_ICON as a } from "./index93.js";
|
|
4
|
+
import { preventTooltipFocusOpen as o } from "./index191.js";
|
|
5
|
+
import { Tooltip as s, TooltipContent as c, TooltipTrigger as l } from "./index515.js";
|
|
6
|
+
import { MoreVerticalIcon as u } from "lucide-react";
|
|
7
|
+
import { jsx as d, jsxs as f } from "@emotion/react/jsx-runtime";
|
|
11
8
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index533.js
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
flexDirection: "column",
|
|
25
|
-
gap: 1,
|
|
26
|
-
alignItems: "center",
|
|
27
|
-
textAlign: "center"
|
|
28
|
-
},
|
|
29
|
-
children: [
|
|
30
|
-
/* @__PURE__ */ i(s, {
|
|
31
|
-
sx: {
|
|
32
|
-
borderRadius: "100%",
|
|
33
|
-
backgroundColor: "#F2F2F2",
|
|
34
|
-
width: "44px",
|
|
35
|
-
height: "44px",
|
|
36
|
-
display: "flex",
|
|
37
|
-
justifyContent: "center",
|
|
38
|
-
alignItems: "center"
|
|
39
|
-
},
|
|
40
|
-
children: /* @__PURE__ */ i(d, { sx: { color: "#707070" } })
|
|
41
|
-
}),
|
|
42
|
-
/* @__PURE__ */ i(l, {
|
|
43
|
-
variant: "body1",
|
|
44
|
-
children: m._("Manual payment record")
|
|
45
|
-
}),
|
|
46
|
-
/* @__PURE__ */ a(s, { children: [/* @__PURE__ */ i(l, {
|
|
47
|
-
variant: "h2",
|
|
48
|
-
children: g(f?.amount ?? 0, p.currency)
|
|
49
|
-
}), /* @__PURE__ */ i(l, {
|
|
50
|
-
variant: "body1",
|
|
51
|
-
children: m._("from {invoiceCounterpart_name}", { invoiceCounterpart_name: p.counterpart_name })
|
|
52
|
-
})] })
|
|
53
|
-
]
|
|
54
|
-
}),
|
|
55
|
-
/* @__PURE__ */ i(r, { items: [
|
|
56
|
-
{
|
|
57
|
-
label: m._("Received"),
|
|
58
|
-
value: f.payment_date ? /* @__PURE__ */ i(l, {
|
|
59
|
-
fontWeight: 500,
|
|
60
|
-
children: v
|
|
61
|
-
}) : "—"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
label: m._("Reference"),
|
|
65
|
-
value: p.id ? /* @__PURE__ */ i(l, {
|
|
66
|
-
fontWeight: 500,
|
|
67
|
-
children: p.id
|
|
68
|
-
}) : "—"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
label: m._("Created by"),
|
|
72
|
-
value: b ? /* @__PURE__ */ i(c, {
|
|
73
|
-
variant: "text",
|
|
74
|
-
width: "50%"
|
|
75
|
-
}) : x ? /* @__PURE__ */ i(l, {
|
|
76
|
-
fontWeight: 500,
|
|
77
|
-
children: x
|
|
78
|
-
}) : "—"
|
|
79
|
-
}
|
|
80
|
-
] }),
|
|
81
|
-
/* @__PURE__ */ i(o, {
|
|
82
|
-
severity: "warning",
|
|
83
|
-
children: /* @__PURE__ */ i(l, {
|
|
84
|
-
variant: "body2",
|
|
85
|
-
children: m._("Please, check the details of your payment record. You won't be able to change or delete it after.")
|
|
86
|
-
})
|
|
9
|
+
function p({ actions: p, triggerLabel: m, getActionLabel: h, onSelect: g, isActionDisabled: _, className: v }) {
|
|
10
|
+
return /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ f(s, { children: [/* @__PURE__ */ d(l, {
|
|
11
|
+
asChild: !0,
|
|
12
|
+
onFocus: o,
|
|
13
|
+
children: /* @__PURE__ */ d(i, {
|
|
14
|
+
asChild: !0,
|
|
15
|
+
children: /* @__PURE__ */ d(e, {
|
|
16
|
+
variant: "ghost",
|
|
17
|
+
size: "icon",
|
|
18
|
+
className: v,
|
|
19
|
+
"aria-label": m,
|
|
20
|
+
children: /* @__PURE__ */ d(u, { className: "ttw:size-4" })
|
|
87
21
|
})
|
|
88
|
-
|
|
89
|
-
})
|
|
90
|
-
|
|
22
|
+
})
|
|
23
|
+
}), /* @__PURE__ */ d(c, { children: m })] }), /* @__PURE__ */ d(n, {
|
|
24
|
+
align: "end",
|
|
25
|
+
children: p.map((e) => {
|
|
26
|
+
let t = a[e];
|
|
27
|
+
return /* @__PURE__ */ f(r, {
|
|
28
|
+
variant: e === "delete" ? "destructive" : "default",
|
|
29
|
+
disabled: _?.(e),
|
|
30
|
+
onClick: () => g(e),
|
|
31
|
+
children: [/* @__PURE__ */ d(t, { className: "ttw:size-4" }), h(e)]
|
|
32
|
+
}, e);
|
|
33
|
+
})
|
|
34
|
+
})] });
|
|
35
|
+
}
|
|
91
36
|
//#endregion
|
|
92
|
-
export {
|
|
37
|
+
export { p as InvoiceDetailsOverflowMenu };
|
|
@@ -1,54 +1,92 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { useMoniteContext as e } from "./index47.js";
|
|
2
|
+
import { useCurrencies as t } from "./index63.js";
|
|
3
|
+
import { useEntityUserByAuthToken as n } from "./index133.js";
|
|
4
|
+
import "./index142.js";
|
|
5
|
+
import "./index217.js";
|
|
6
|
+
import { MoniteCard as r } from "./index415.js";
|
|
7
|
+
import { jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
|
|
8
|
+
import { Alert as o, Box as s, Skeleton as c, Typography as l } from "@mui/material";
|
|
9
|
+
import { useLingui as u } from "@lingui/react";
|
|
10
|
+
import d from "@mui/icons-material/DriveFileRenameOutline";
|
|
8
11
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index534.js
|
|
9
|
-
var
|
|
10
|
-
let
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
var f = ({ paymentRecords: f, invoice: p }) => {
|
|
13
|
+
let { i18n: m } = u(), { locale: h } = e(), { formatCurrencyToDisplay: g } = t(), _ = new Date(f.payment_date ?? "").setHours(f.payment_time?.getHours() ?? 0, f.payment_time?.getMinutes() ?? 0), v = m.date(new Date(_), h.dateTimeFormat), { data: y, isLoading: b } = n(), x = `${y?.first_name ?? ""} ${y?.last_name ?? ""}`;
|
|
14
|
+
return /* @__PURE__ */ a(s, {
|
|
15
|
+
sx: {
|
|
16
|
+
display: "flex",
|
|
17
|
+
flexDirection: "column",
|
|
18
|
+
gap: 3
|
|
19
|
+
},
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ a(s, {
|
|
22
|
+
sx: {
|
|
23
|
+
display: "flex",
|
|
24
|
+
flexDirection: "column",
|
|
25
|
+
gap: 1,
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
textAlign: "center"
|
|
25
28
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ i(s, {
|
|
31
|
+
sx: {
|
|
32
|
+
borderRadius: "100%",
|
|
33
|
+
backgroundColor: "#F2F2F2",
|
|
34
|
+
width: "44px",
|
|
35
|
+
height: "44px",
|
|
36
|
+
display: "flex",
|
|
37
|
+
justifyContent: "center",
|
|
38
|
+
alignItems: "center"
|
|
39
|
+
},
|
|
40
|
+
children: /* @__PURE__ */ i(d, { sx: { color: "#707070" } })
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ i(l, {
|
|
43
|
+
variant: "body1",
|
|
44
|
+
children: m._("Manual payment record")
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ a(s, { children: [/* @__PURE__ */ i(l, {
|
|
47
|
+
variant: "h2",
|
|
48
|
+
children: g(f?.amount ?? 0, p.currency)
|
|
49
|
+
}), /* @__PURE__ */ i(l, {
|
|
50
|
+
variant: "body1",
|
|
51
|
+
children: m._("from {invoiceCounterpart_name}", { invoiceCounterpart_name: p.counterpart_name })
|
|
52
|
+
})] })
|
|
53
|
+
]
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ i(r, { items: [
|
|
56
|
+
{
|
|
57
|
+
label: m._("Received"),
|
|
58
|
+
value: f.payment_date ? /* @__PURE__ */ i(l, {
|
|
59
|
+
fontWeight: 500,
|
|
60
|
+
children: v
|
|
61
|
+
}) : "—"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
label: m._("Reference"),
|
|
65
|
+
value: p.id ? /* @__PURE__ */ i(l, {
|
|
66
|
+
fontWeight: 500,
|
|
67
|
+
children: p.id
|
|
68
|
+
}) : "—"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
label: m._("Created by"),
|
|
72
|
+
value: b ? /* @__PURE__ */ i(c, {
|
|
73
|
+
variant: "text",
|
|
74
|
+
width: "50%"
|
|
75
|
+
}) : x ? /* @__PURE__ */ i(l, {
|
|
76
|
+
fontWeight: 500,
|
|
77
|
+
children: x
|
|
78
|
+
}) : "—"
|
|
43
79
|
}
|
|
44
|
-
}),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ i(o, {
|
|
82
|
+
severity: "warning",
|
|
83
|
+
children: /* @__PURE__ */ i(l, {
|
|
84
|
+
variant: "body2",
|
|
85
|
+
children: m._("Please, check the details of your payment record. You won't be able to change or delete it after.")
|
|
86
|
+
})
|
|
87
|
+
})
|
|
88
|
+
]
|
|
51
89
|
});
|
|
52
90
|
};
|
|
53
91
|
//#endregion
|
|
54
|
-
export {
|
|
92
|
+
export { f as ManualPaymentRecordDetails };
|
|
@@ -1 +1,54 @@
|
|
|
1
|
-
import "./
|
|
1
|
+
import { useRootElements as e } from "./index206.js";
|
|
2
|
+
import "./index207.js";
|
|
3
|
+
import { format as t, parse as n } from "date-fns";
|
|
4
|
+
import { Fragment as r, jsx as i, jsxs as a } from "@emotion/react/jsx-runtime";
|
|
5
|
+
import { Alert as o } from "@mui/material";
|
|
6
|
+
import { DatePicker as s } from "@mui/x-date-pickers";
|
|
7
|
+
import { Controller as c } from "react-hook-form";
|
|
8
|
+
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index535.js
|
|
9
|
+
var l = ({ control: l, name: u, slotProps: d, valueAs: f = "date", stringFormat: p = "yyyy-MM-dd", ...m }) => {
|
|
10
|
+
let h = (e) => e?.type === "custom", { root: g } = e();
|
|
11
|
+
return /* @__PURE__ */ i(c, {
|
|
12
|
+
control: l,
|
|
13
|
+
name: u,
|
|
14
|
+
render: ({ field: e, fieldState: { error: c, isTouched: l }, formState: { isValid: _ } }) => {
|
|
15
|
+
let v = (l || !_) && !h(c), y = e.value === null ? null : typeof e.value == "string" ? n(e.value, p, /* @__PURE__ */ new Date()) : new Date(e.value);
|
|
16
|
+
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i(s, {
|
|
17
|
+
...e,
|
|
18
|
+
...m,
|
|
19
|
+
value: y,
|
|
20
|
+
onChange: (n) => {
|
|
21
|
+
if (n instanceof Date && !Number.isNaN(n.getTime())) {
|
|
22
|
+
let r = f === "string" ? t(n, p) : n;
|
|
23
|
+
e.onChange(r);
|
|
24
|
+
} else e.onChange(null);
|
|
25
|
+
},
|
|
26
|
+
slotProps: {
|
|
27
|
+
...d,
|
|
28
|
+
popper: {
|
|
29
|
+
...d?.popper,
|
|
30
|
+
container: g
|
|
31
|
+
},
|
|
32
|
+
dialog: {
|
|
33
|
+
...d?.dialog,
|
|
34
|
+
container: g
|
|
35
|
+
},
|
|
36
|
+
textField: {
|
|
37
|
+
variant: "standard",
|
|
38
|
+
...d?.textField,
|
|
39
|
+
id: u,
|
|
40
|
+
error: v && !!c?.message,
|
|
41
|
+
helperText: v && c?.message
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}), h(c) && /* @__PURE__ */ i(o, {
|
|
45
|
+
severity: "error",
|
|
46
|
+
icon: !1,
|
|
47
|
+
sx: { marginTop: -2 },
|
|
48
|
+
children: c?.message
|
|
49
|
+
})] });
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { l as RHFDatePicker };
|
|
@@ -1,40 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Alert as r } from "@mui/material";
|
|
3
|
-
import { TimeField as i } from "@mui/x-date-pickers";
|
|
4
|
-
import { Controller as a } from "react-hook-form";
|
|
5
|
-
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index536.js
|
|
6
|
-
var o = ({ control: o, name: s, required: c, fullWidth: l, slotProps: u, ...d }) => {
|
|
7
|
-
let f = (e) => e?.type === "custom";
|
|
8
|
-
return /* @__PURE__ */ t(a, {
|
|
9
|
-
control: o,
|
|
10
|
-
name: s,
|
|
11
|
-
render: ({ field: a, fieldState: { error: o, isTouched: p }, formState: { isValid: m } }) => {
|
|
12
|
-
let h = (p || !m) && !f(o), g = a.value === null ? null : new Date(a.value);
|
|
13
|
-
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(i, {
|
|
14
|
-
...a,
|
|
15
|
-
...d,
|
|
16
|
-
variant: "standard",
|
|
17
|
-
required: c,
|
|
18
|
-
fullWidth: l,
|
|
19
|
-
value: g,
|
|
20
|
-
helperText: h && o?.message,
|
|
21
|
-
slotProps: {
|
|
22
|
-
...u,
|
|
23
|
-
textField: {
|
|
24
|
-
...u?.textField,
|
|
25
|
-
id: s,
|
|
26
|
-
error: h && !!o?.message,
|
|
27
|
-
helperText: h && o?.message
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}), f(o) && /* @__PURE__ */ t(r, {
|
|
31
|
-
severity: "error",
|
|
32
|
-
icon: !1,
|
|
33
|
-
sx: { marginTop: -2 },
|
|
34
|
-
children: o?.message
|
|
35
|
-
})] });
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
//#endregion
|
|
40
|
-
export { o as RHFTimePicker };
|
|
1
|
+
import "./index535.js";
|
|
@@ -1 +1,40 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import { Fragment as e, jsx as t, jsxs as n } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { Alert as r } from "@mui/material";
|
|
3
|
+
import { TimeField as i } from "@mui/x-date-pickers";
|
|
4
|
+
import { Controller as a } from "react-hook-form";
|
|
5
|
+
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index537.js
|
|
6
|
+
var o = ({ control: o, name: s, required: c, fullWidth: l, slotProps: u, ...d }) => {
|
|
7
|
+
let f = (e) => e?.type === "custom";
|
|
8
|
+
return /* @__PURE__ */ t(a, {
|
|
9
|
+
control: o,
|
|
10
|
+
name: s,
|
|
11
|
+
render: ({ field: a, fieldState: { error: o, isTouched: p }, formState: { isValid: m } }) => {
|
|
12
|
+
let h = (p || !m) && !f(o), g = a.value === null ? null : new Date(a.value);
|
|
13
|
+
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(i, {
|
|
14
|
+
...a,
|
|
15
|
+
...d,
|
|
16
|
+
variant: "standard",
|
|
17
|
+
required: c,
|
|
18
|
+
fullWidth: l,
|
|
19
|
+
value: g,
|
|
20
|
+
helperText: h && o?.message,
|
|
21
|
+
slotProps: {
|
|
22
|
+
...u,
|
|
23
|
+
textField: {
|
|
24
|
+
...u?.textField,
|
|
25
|
+
id: s,
|
|
26
|
+
error: h && !!o?.message,
|
|
27
|
+
helperText: h && o?.message
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}), f(o) && /* @__PURE__ */ t(r, {
|
|
31
|
+
severity: "error",
|
|
32
|
+
icon: !1,
|
|
33
|
+
sx: { marginTop: -2 },
|
|
34
|
+
children: o?.message
|
|
35
|
+
})] });
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { o as RHFTimePicker };
|