@mx-cartographer/experiences 7.0.61 → 7.0.62
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/CHANGELOG.md +4 -0
- package/dist/cashflow/index.es.js +61 -61
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as o, Fragment as
|
|
1
|
+
import { jsxs as o, Fragment as P, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import f, { useState as K } from "react";
|
|
3
3
|
import { observer as T } from "mobx-react-lite";
|
|
4
4
|
import { addMonths as qe } from "date-fns/addMonths";
|
|
@@ -7,20 +7,20 @@ import I from "@mui/material/Box";
|
|
|
7
7
|
import D from "@mui/material/Divider";
|
|
8
8
|
import s from "@mui/material/Stack";
|
|
9
9
|
import ie from "@mui/material/styles/useTheme";
|
|
10
|
-
import { Text as u, P as N, Icon as
|
|
11
|
-
import { G as Ye, t as le, u as L, p as re, d as Le, b as X, j as
|
|
10
|
+
import { Text as u, P as N, Icon as j, InstitutionLogo as be, H1 as ce, H2 as Xe } from "@mxenabled/mxui";
|
|
11
|
+
import { G as Ye, t as le, u as L, p as re, d as Le, b as X, j as q, g as Ne, o as Oe, h as ke } from "../hooks-CE2TKk4a.mjs";
|
|
12
12
|
import { C as R } from "../CurrencyText-YUhH2caW.mjs";
|
|
13
13
|
import { u as de } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
14
14
|
import { L as ee } from "../Loader-DUaFpDGv.mjs";
|
|
15
15
|
import { I as me } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
16
16
|
import { C as Mn } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
17
|
-
import { b as
|
|
17
|
+
import { b as M } from "../Localization-2MODESHW.mjs";
|
|
18
18
|
import { M as Qe } from "../MiniWidgetContainer-DTQdRK-3.mjs";
|
|
19
19
|
import { E as Ve } from "../EmptyState-DA_lfRBv.mjs";
|
|
20
20
|
import { R as Ke } from "../RecurringSettings-B486z99o.mjs";
|
|
21
21
|
import Je from "@mui/material/Tabs";
|
|
22
22
|
import xe from "@mui/material/Tab";
|
|
23
|
-
import { getUnixTime as
|
|
23
|
+
import { getUnixTime as U } from "date-fns/getUnixTime";
|
|
24
24
|
import Z from "@mui/material/List";
|
|
25
25
|
import te from "@mui/material/ListItem";
|
|
26
26
|
import { A as Ze } from "../AccountListItem-BAdwVscV.mjs";
|
|
@@ -34,7 +34,7 @@ import { addDays as ye } from "date-fns/addDays";
|
|
|
34
34
|
import { alpha as tt, keyframes as nt } from "@mui/material/styles";
|
|
35
35
|
import { DataGridPro as ot } from "@mui/x-data-grid-pro";
|
|
36
36
|
import { T as Ce } from "../TabContentContainer-j01JYR_7.mjs";
|
|
37
|
-
import
|
|
37
|
+
import G from "@mui/material/Button";
|
|
38
38
|
import { M as at, S as it, i as rt, d as Se, c as st } from "../ManageIncome-BX7dzGF8.mjs";
|
|
39
39
|
import { D as $e } from "../Drawer-kEE73B87.mjs";
|
|
40
40
|
import { formatISO as ct } from "date-fns/formatISO";
|
|
@@ -46,14 +46,14 @@ import { F as ut, R as we, e as Ie } from "../RecurringTransactions-DTUx9VN1.mjs
|
|
|
46
46
|
import { h as ht } from "../DateUtil-BcuH7ErC.mjs";
|
|
47
47
|
import { endOfToday as pt } from "date-fns/endOfToday";
|
|
48
48
|
import { W as De, A as ve } from "../WidgetContainer-B8MRJ5Y1.mjs";
|
|
49
|
-
import { F as ft, A as
|
|
49
|
+
import { F as ft, A as B } from "../Fetch-87LIQbEA.mjs";
|
|
50
50
|
const V = () => {
|
|
51
51
|
if (!f.useContext(Ye))
|
|
52
52
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
53
53
|
return le().uiStore;
|
|
54
54
|
}, gt = ({ remaining: a }) => {
|
|
55
55
|
const { cashflow: n } = L();
|
|
56
|
-
return /* @__PURE__ */ o(
|
|
56
|
+
return /* @__PURE__ */ o(P, { children: [
|
|
57
57
|
/* @__PURE__ */ e(
|
|
58
58
|
I,
|
|
59
59
|
{
|
|
@@ -76,7 +76,7 @@ const V = () => {
|
|
|
76
76
|
setNextIncome: b,
|
|
77
77
|
setSelectedCashAccounts: C,
|
|
78
78
|
setUpcomingExpenses: S
|
|
79
|
-
} = V(), { isDataLoaded: v, nextIncomeRecurrence: p, upcomingExpenses: E } =
|
|
79
|
+
} = V(), { isDataLoaded: v, nextIncomeRecurrence: p, upcomingExpenses: E } = q();
|
|
80
80
|
f.useEffect(() => {
|
|
81
81
|
y(i);
|
|
82
82
|
}, [i]), f.useEffect(() => {
|
|
@@ -92,7 +92,7 @@ const V = () => {
|
|
|
92
92
|
), W = f.useMemo(
|
|
93
93
|
() => m.filter((w) => l.includes(w.accountGuid || "")).reduce((w, $) => w + $.amount, 0),
|
|
94
94
|
[l, m]
|
|
95
|
-
),
|
|
95
|
+
), z = f.useMemo(
|
|
96
96
|
() => _ - W,
|
|
97
97
|
[_, W]
|
|
98
98
|
);
|
|
@@ -107,33 +107,33 @@ const V = () => {
|
|
|
107
107
|
children: [
|
|
108
108
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
109
109
|
/* @__PURE__ */ e(R, { amount: _, variant: "H2" }),
|
|
110
|
-
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children:
|
|
110
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: M(
|
|
111
111
|
c.total_cash_accounts,
|
|
112
112
|
d.length
|
|
113
113
|
) })
|
|
114
114
|
] }),
|
|
115
|
-
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(
|
|
115
|
+
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "remove" }) }),
|
|
116
116
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
117
117
|
/* @__PURE__ */ e(R, { amount: W, variant: "H2" }),
|
|
118
|
-
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children:
|
|
118
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: M(c.expenses_due, m.length) })
|
|
119
119
|
] }),
|
|
120
|
-
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(
|
|
120
|
+
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "equal" }) }),
|
|
121
121
|
/* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
|
|
122
|
-
/* @__PURE__ */ e(R, { amount:
|
|
122
|
+
/* @__PURE__ */ e(R, { amount: z, variant: "H2" }),
|
|
123
123
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
124
124
|
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
|
|
125
125
|
/* @__PURE__ */ e(me, { body: c.tooltip_body, title: c.tooltip_title })
|
|
126
126
|
] })
|
|
127
127
|
] }),
|
|
128
|
-
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(
|
|
129
|
-
/* @__PURE__ */ e(u, { variant: "H2", children:
|
|
128
|
+
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(P, { children: [
|
|
129
|
+
/* @__PURE__ */ e(u, { variant: "H2", children: M(c.days, r) }),
|
|
130
130
|
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.next_paycheck })
|
|
131
131
|
] }) })
|
|
132
132
|
]
|
|
133
133
|
}
|
|
134
134
|
) : /* @__PURE__ */ o(s, { border: `1px solid ${a.palette.border.light}`, borderRadius: 1, children: [
|
|
135
135
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
136
|
-
/* @__PURE__ */ e(u, { variant: "Small", children:
|
|
136
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: M(
|
|
137
137
|
c.total_cash_accounts,
|
|
138
138
|
d.length
|
|
139
139
|
) }),
|
|
@@ -141,7 +141,7 @@ const V = () => {
|
|
|
141
141
|
] }),
|
|
142
142
|
/* @__PURE__ */ e(D, {}),
|
|
143
143
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
144
|
-
/* @__PURE__ */ e(u, { variant: "Small", children:
|
|
144
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: M(c.expenses_due, m.length) }),
|
|
145
145
|
/* @__PURE__ */ e(R, { amount: W, bold: !0, symbol: "-", variant: "XSmall" })
|
|
146
146
|
] }),
|
|
147
147
|
/* @__PURE__ */ e(D, {}),
|
|
@@ -156,13 +156,13 @@ const V = () => {
|
|
|
156
156
|
justifyContent: "space-between",
|
|
157
157
|
px: 16,
|
|
158
158
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
159
|
-
children: /* @__PURE__ */ e(ue, { remaining:
|
|
159
|
+
children: /* @__PURE__ */ e(ue, { remaining: z })
|
|
160
160
|
}
|
|
161
161
|
),
|
|
162
162
|
/* @__PURE__ */ e(D, {}),
|
|
163
163
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
164
164
|
/* @__PURE__ */ e(u, { variant: "Small", children: c.next_paycheck }),
|
|
165
|
-
/* @__PURE__ */ e(u, { bold: !0, variant: "XSmall", children:
|
|
165
|
+
/* @__PURE__ */ e(u, { bold: !0, variant: "XSmall", children: M(c.days, r) })
|
|
166
166
|
] })
|
|
167
167
|
] }) }) : /* @__PURE__ */ e(ee, { height: t ? 210 : 120 });
|
|
168
168
|
}, xt = T(bt), yt = ({
|
|
@@ -170,7 +170,7 @@ const V = () => {
|
|
|
170
170
|
onSecondaryCtaClick: n,
|
|
171
171
|
sx: t = {}
|
|
172
172
|
}) => {
|
|
173
|
-
const { cashflow: i } = L(), { isCopyLoaded: h, isInitialized: g } = X(), { loadRepeatingTransactions: l, income: y, isDataLoaded: c, setDateRange: r } =
|
|
173
|
+
const { cashflow: i } = L(), { isCopyLoaded: h, isInitialized: g } = X(), { loadRepeatingTransactions: l, income: y, isDataLoaded: c, setDateRange: r } = q();
|
|
174
174
|
f.useEffect(() => {
|
|
175
175
|
g && (r({ start: F(), end: qe(F(), 1) }), l().finally());
|
|
176
176
|
}, [g]);
|
|
@@ -217,7 +217,7 @@ const V = () => {
|
|
|
217
217
|
}
|
|
218
218
|
);
|
|
219
219
|
var ne = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a))(ne || {});
|
|
220
|
-
const St = ({ recurrence: a }) => /* @__PURE__ */ o(
|
|
220
|
+
const St = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
221
221
|
/* @__PURE__ */ o(te, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
|
|
222
222
|
/* @__PURE__ */ o(s, { alignItems: "center", height: 32, width: 32, children: [
|
|
223
223
|
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Y(a.expectedDate, Q.MONTH) }),
|
|
@@ -236,7 +236,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
236
236
|
/* @__PURE__ */ e(D, {})
|
|
237
237
|
] }), Ee = T(St), _t = ({ total: a, type: n }) => {
|
|
238
238
|
const { cashflow: t } = L();
|
|
239
|
-
return /* @__PURE__ */ o(
|
|
239
|
+
return /* @__PURE__ */ o(P, { children: [
|
|
240
240
|
/* @__PURE__ */ o(
|
|
241
241
|
et,
|
|
242
242
|
{
|
|
@@ -261,7 +261,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
261
261
|
/* @__PURE__ */ e(D, {})
|
|
262
262
|
] });
|
|
263
263
|
}, Ae = T(_t), ae = (a, n) => (t) => t.accountGuid === a.guid && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), wt = () => {
|
|
264
|
-
const { availableWidth: a } = re(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: i } =
|
|
264
|
+
const { availableWidth: a } = re(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: i } = q(), { dateRange: h, selectedCashAccounts: g } = V();
|
|
265
265
|
return /* @__PURE__ */ o(s, { children: [
|
|
266
266
|
/* @__PURE__ */ o(s, { direction: a < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
267
267
|
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
|
|
@@ -273,7 +273,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
273
273
|
] })
|
|
274
274
|
] }),
|
|
275
275
|
/* @__PURE__ */ e(s, { children: g.map((l) => {
|
|
276
|
-
const y = i.filter(ae(l, h)).sort((d, b) =>
|
|
276
|
+
const y = i.filter(ae(l, h)).sort((d, b) => U(d.expectedDate) - U(b.expectedDate)), c = t.filter(
|
|
277
277
|
ae(l, h)
|
|
278
278
|
), r = y.reduce(
|
|
279
279
|
(d, b) => d + b.amount,
|
|
@@ -333,7 +333,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
333
333
|
}) })
|
|
334
334
|
] });
|
|
335
335
|
}, It = T(wt), Dt = () => {
|
|
336
|
-
const { availableWidth: a } = re(), n = ie(), { cashflow: t } = L(), { upcomingExpenses: i, upcomingIncome: h } =
|
|
336
|
+
const { availableWidth: a } = re(), n = ie(), { cashflow: t } = L(), { upcomingExpenses: i, upcomingIncome: h } = q(), { dateRange: g, selectedCashAccounts: l } = V(), y = [
|
|
337
337
|
{
|
|
338
338
|
field: "account",
|
|
339
339
|
flex: 1.5,
|
|
@@ -639,7 +639,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
639
639
|
]
|
|
640
640
|
}
|
|
641
641
|
), Te = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), Tt = () => {
|
|
642
|
-
const { availableWidth: a } = re(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: i } =
|
|
642
|
+
const { availableWidth: a } = re(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: i } = q(), { selectedAccountGuids: h } = X(), { dateRange: g, selectedCashAccounts: l } = V(), { userProfile: y } = Oe(), [c, r] = f.useState(!1), m = f.useMemo(
|
|
643
643
|
() => t.filter(Te(h, g)),
|
|
644
644
|
[g, h, t]
|
|
645
645
|
), d = f.useMemo(
|
|
@@ -665,11 +665,11 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
665
665
|
{
|
|
666
666
|
amount: b,
|
|
667
667
|
isMobile: p,
|
|
668
|
-
label: n.cash_and_bank
|
|
668
|
+
label: M(n.cash_and_bank, l.length)
|
|
669
669
|
}
|
|
670
670
|
),
|
|
671
671
|
p && /* @__PURE__ */ e(D, {}),
|
|
672
|
-
y?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(
|
|
672
|
+
y?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(P, { children: [
|
|
673
673
|
!p && /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
674
674
|
/* @__PURE__ */ e(
|
|
675
675
|
oe,
|
|
@@ -681,10 +681,10 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
681
681
|
}
|
|
682
682
|
)
|
|
683
683
|
] }) : /* @__PURE__ */ e(
|
|
684
|
-
|
|
684
|
+
G,
|
|
685
685
|
{
|
|
686
686
|
onClick: () => r(!0),
|
|
687
|
-
startIcon: /* @__PURE__ */ e(
|
|
687
|
+
startIcon: /* @__PURE__ */ e(j, { name: "add" }),
|
|
688
688
|
sx: { fontSize: 13 },
|
|
689
689
|
children: n.add_income
|
|
690
690
|
}
|
|
@@ -695,7 +695,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
695
695
|
{
|
|
696
696
|
amount: C,
|
|
697
697
|
isMobile: p,
|
|
698
|
-
label: n.to_be_paid_out,
|
|
698
|
+
label: M(n.to_be_paid_out, m.length),
|
|
699
699
|
symbol: p ? "-" : void 0
|
|
700
700
|
}
|
|
701
701
|
),
|
|
@@ -758,7 +758,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
758
758
|
mr: 24,
|
|
759
759
|
sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
760
760
|
width: 44,
|
|
761
|
-
children: /* @__PURE__ */ e(
|
|
761
|
+
children: /* @__PURE__ */ e(j, { color: "primary", name: "currency_exchange" })
|
|
762
762
|
}
|
|
763
763
|
),
|
|
764
764
|
t.bullet_one
|
|
@@ -774,7 +774,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
774
774
|
mr: 24,
|
|
775
775
|
sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
776
776
|
width: 44,
|
|
777
|
-
children: /* @__PURE__ */ e(
|
|
777
|
+
children: /* @__PURE__ */ e(j, { color: "primary", name: "cardiology" })
|
|
778
778
|
}
|
|
779
779
|
),
|
|
780
780
|
t.bullet_two
|
|
@@ -790,15 +790,15 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
790
790
|
mr: 24,
|
|
791
791
|
sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
792
792
|
width: 44,
|
|
793
|
-
children: /* @__PURE__ */ e(
|
|
793
|
+
children: /* @__PURE__ */ e(j, { color: "primary", name: "flare" })
|
|
794
794
|
}
|
|
795
795
|
),
|
|
796
796
|
t.bullet_three
|
|
797
797
|
] })
|
|
798
798
|
] }),
|
|
799
799
|
/* @__PURE__ */ o(s, { direction: "row", spacing: 16, children: [
|
|
800
|
-
/* @__PURE__ */ e(
|
|
801
|
-
/* @__PURE__ */ e(
|
|
800
|
+
/* @__PURE__ */ e(G, { onClick: a, variant: "contained", children: t.get_started_button }),
|
|
801
|
+
/* @__PURE__ */ e(G, { onClick: n, variant: "outlined", children: t.skip_button })
|
|
802
802
|
] })
|
|
803
803
|
] });
|
|
804
804
|
}, Nt = T(Lt), Re = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", Ge = {
|
|
@@ -819,7 +819,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
819
819
|
transform: rotate(360deg);
|
|
820
820
|
}
|
|
821
821
|
`, Ft = () => {
|
|
822
|
-
const { addRepeatingTransaction: a, repeatingTransactions: n } =
|
|
822
|
+
const { addRepeatingTransaction: a, repeatingTransactions: n } = q(), { cashflow: t, common: i } = L(), { completeOnboarding: h } = le(), { isDirty: g } = V(), { isMobile: l } = de(), { isCopyLoaded: y, setDisplayedDate: c } = X(), { filter: r, setFilter: m, transactions: d } = ke(), b = ie(), [C, S] = K(!0), [v, p] = f.useState(ut.EveryMonth), [E, _] = f.useState(1), [W, z] = f.useState(15), [w, $] = K(!1), [O, he] = K(1), [k, je] = K([]), [pe, se] = K(""), H = f.useMemo(
|
|
823
823
|
() => d.find((x) => x.guid === pe),
|
|
824
824
|
[pe, d]
|
|
825
825
|
), ze = !!n.filter(
|
|
@@ -891,10 +891,10 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
891
891
|
children: [
|
|
892
892
|
/* @__PURE__ */ e(ce, { pb: 12, children: t.add_income_title }),
|
|
893
893
|
/* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
|
|
894
|
-
k.length > 0 && !H && /* @__PURE__ */ o(
|
|
894
|
+
k.length > 0 && !H && /* @__PURE__ */ o(P, { children: [
|
|
895
895
|
/* @__PURE__ */ e(Z, { children: k.map((x, A) => /* @__PURE__ */ o(f.Fragment, { children: [
|
|
896
896
|
/* @__PURE__ */ e(dt, { bgcolor: "background.paper", children: ht(
|
|
897
|
-
|
|
897
|
+
U(x.nextDate || x.date)
|
|
898
898
|
) }),
|
|
899
899
|
/* @__PURE__ */ e(mt, { transaction: x }),
|
|
900
900
|
A !== k.length - 1 && /* @__PURE__ */ e(D, {})
|
|
@@ -902,10 +902,10 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
902
902
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
|
|
903
903
|
/* @__PURE__ */ e(D, { sx: { flexGrow: 1 } }),
|
|
904
904
|
/* @__PURE__ */ e(
|
|
905
|
-
|
|
905
|
+
G,
|
|
906
906
|
{
|
|
907
907
|
onClick: () => S(!0),
|
|
908
|
-
startIcon: /* @__PURE__ */ e(
|
|
908
|
+
startIcon: /* @__PURE__ */ e(j, { name: "add", size: 20 }),
|
|
909
909
|
children: t.add_income
|
|
910
910
|
}
|
|
911
911
|
)
|
|
@@ -925,7 +925,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
925
925
|
}
|
|
926
926
|
),
|
|
927
927
|
!ze && g && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
|
|
928
|
-
H && /* @__PURE__ */ o(
|
|
928
|
+
H && /* @__PURE__ */ o(P, { children: [
|
|
929
929
|
/* @__PURE__ */ e(
|
|
930
930
|
st,
|
|
931
931
|
{
|
|
@@ -934,14 +934,14 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
934
934
|
frequency: v,
|
|
935
935
|
onFirstDayChange: _,
|
|
936
936
|
onFrequencyChange: p,
|
|
937
|
-
onSecondDayChange:
|
|
937
|
+
onSecondDayChange: z,
|
|
938
938
|
secondDay: W,
|
|
939
939
|
transaction: H
|
|
940
940
|
}
|
|
941
941
|
),
|
|
942
942
|
/* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
943
943
|
/* @__PURE__ */ e(
|
|
944
|
-
|
|
944
|
+
G,
|
|
945
945
|
{
|
|
946
946
|
"aria-disabled": !H,
|
|
947
947
|
onClick: () => {
|
|
@@ -957,7 +957,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
957
957
|
}
|
|
958
958
|
),
|
|
959
959
|
/* @__PURE__ */ e(
|
|
960
|
-
|
|
960
|
+
G,
|
|
961
961
|
{
|
|
962
962
|
onClick: () => {
|
|
963
963
|
se(""), S(!0), fe().finally();
|
|
@@ -970,12 +970,12 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
970
970
|
] }),
|
|
971
971
|
k.length > 0 && !H && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
972
972
|
/* @__PURE__ */ e(
|
|
973
|
-
|
|
973
|
+
G,
|
|
974
974
|
{
|
|
975
975
|
"aria-disabled": k.length < 1 || w,
|
|
976
976
|
onClick: Be,
|
|
977
977
|
startIcon: w ? /* @__PURE__ */ e(
|
|
978
|
-
|
|
978
|
+
j,
|
|
979
979
|
{
|
|
980
980
|
name: "progress_activity",
|
|
981
981
|
sx: {
|
|
@@ -987,7 +987,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
987
987
|
children: t.confirm_income_button
|
|
988
988
|
}
|
|
989
989
|
),
|
|
990
|
-
/* @__PURE__ */ e(
|
|
990
|
+
/* @__PURE__ */ e(G, { onClick: h, variant: "outlined", children: t.skip_button })
|
|
991
991
|
] })
|
|
992
992
|
]
|
|
993
993
|
}
|
|
@@ -1002,7 +1002,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
1002
1002
|
setSelectedAccounts: h,
|
|
1003
1003
|
shouldDisableNextDate: g,
|
|
1004
1004
|
shouldDisablePrevDate: l
|
|
1005
|
-
} = X(), { onEvent: y } = Ne(), { visibleCashAccounts: c } = Le(), { setFilter: r } = ke(), { userProfile: m } = Oe(), { dateRange: d, setSelectedCashAccounts: b } = V(), { loadRepeatingTransactions: C, setDateRange: S } =
|
|
1005
|
+
} = X(), { onEvent: y } = Ne(), { visibleCashAccounts: c } = Le(), { setFilter: r } = ke(), { userProfile: m } = Oe(), { dateRange: d, setSelectedCashAccounts: b } = V(), { loadRepeatingTransactions: C, setDateRange: S } = q(), { cashflow: v, recurring: p } = L(), { isCopyLoaded: E, isInitialized: _ } = X(), [W, z] = f.useState(!1);
|
|
1006
1006
|
return f.useEffect(() => {
|
|
1007
1007
|
_ && (S(d), C().finally());
|
|
1008
1008
|
}, [_]), f.useEffect(() => {
|
|
@@ -1024,7 +1024,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
1024
1024
|
label: p.action_title,
|
|
1025
1025
|
iconName: "credit_card_gear",
|
|
1026
1026
|
onClick: () => {
|
|
1027
|
-
|
|
1027
|
+
z(!0), y(ve.CASH_FLOW_CLICK_SETTINGS);
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
],
|
|
@@ -1049,7 +1049,7 @@ const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
1049
1049
|
{
|
|
1050
1050
|
ariaLabelClose: v.close_settings_aria,
|
|
1051
1051
|
isOpen: W,
|
|
1052
|
-
onClose: () =>
|
|
1052
|
+
onClose: () => z(!1),
|
|
1053
1053
|
shouldShowHeaderBorders: !1,
|
|
1054
1054
|
title: p.action_title,
|
|
1055
1055
|
children: /* @__PURE__ */ e(Ke, {})
|
|
@@ -1072,19 +1072,19 @@ class Fn {
|
|
|
1072
1072
|
constructor(n, t, i) {
|
|
1073
1073
|
this.fetchInstance = new ft(n, t, void 0, i);
|
|
1074
1074
|
}
|
|
1075
|
-
addCashflowEvent = async (n) => this.fetchInstance.post(
|
|
1076
|
-
addCashflowSequence = async (n) => this.fetchInstance.post(
|
|
1077
|
-
getCashflowSequences = async () => this.fetchInstance.get(
|
|
1075
|
+
addCashflowEvent = async (n) => this.fetchInstance.post(B.CASHFLOW_EVENTS, { ...n }).then((t) => t);
|
|
1076
|
+
addCashflowSequence = async (n) => this.fetchInstance.post(B.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
|
|
1077
|
+
getCashflowSequences = async () => this.fetchInstance.get(B.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
|
|
1078
1078
|
getCashflowEventsByDateRange = async (n, t) => this.fetchInstance.get(
|
|
1079
|
-
`${
|
|
1079
|
+
`${B.CASHFLOW_EVENTS}/from/${U(n)}/to/${U(t)}`
|
|
1080
1080
|
).then((i) => i.cashflow_events);
|
|
1081
|
-
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${
|
|
1081
|
+
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${B.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
|
|
1082
1082
|
getProjectedCashflowEvents = async (n, t) => this.fetchInstance.get(
|
|
1083
|
-
`${
|
|
1083
|
+
`${B.CASHFLOW_SEQUENCES}/projected_events/from/${U(
|
|
1084
1084
|
n
|
|
1085
|
-
)}/to/${
|
|
1085
|
+
)}/to/${U(t)}`
|
|
1086
1086
|
).then((i) => i.cashflow_events);
|
|
1087
|
-
updateCashflowSequence = async (n) => this.fetchInstance.put(`${
|
|
1087
|
+
updateCashflowSequence = async (n) => this.fetchInstance.put(`${B.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
|
|
1088
1088
|
}
|
|
1089
1089
|
export {
|
|
1090
1090
|
Fn as CashflowApi,
|