@mx-cartographer/experiences 7.0.59-alpha.al0 → 7.0.59
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 +8 -0
- package/dist/{EmptyState-w2yYDuKG.mjs → EmptyState-DsXpMcro.mjs} +26 -24
- package/dist/{RecurringSettings-qv7DNYac.mjs → RecurringSettings-B486z99o.mjs} +29 -29
- package/dist/budgets/index.es.js +1 -1
- package/dist/cashflow/components/CashflowWidgetContent.d.ts +3 -5
- package/dist/cashflow/index.es.js +410 -424
- package/dist/common/components/EmptyState.d.ts +1 -0
- package/dist/common/index.es.js +1 -1
- package/dist/finstrong/index.es.js +1 -1
- package/dist/goals/index.es.js +4 -4
- package/dist/help/HelpWidget.d.ts +1 -1
- package/dist/help/index.es.js +10 -10
- package/dist/investments/index.es.js +1 -1
- package/dist/networth/index.es.js +1 -1
- package/dist/recurringtransactions/components/RecurringSettingsDrawer.d.ts +2 -1
- package/dist/recurringtransactions/components/shared/RecurringSettings.d.ts +5 -1
- package/dist/recurringtransactions/index.es.js +50 -50
- package/dist/trends/index.es.js +351 -350
- package/package.json +1 -1
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
import { jsxs as o, Fragment as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as o, Fragment as U, jsx as e } from "react/jsx-runtime";
|
|
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";
|
|
5
|
-
import { startOfToday as
|
|
5
|
+
import { startOfToday as F } from "date-fns/startOfToday";
|
|
6
6
|
import I from "@mui/material/Box";
|
|
7
|
-
import H from "@mui/material/Button";
|
|
8
7
|
import D from "@mui/material/Divider";
|
|
9
8
|
import s from "@mui/material/Stack";
|
|
10
9
|
import ie from "@mui/material/styles/useTheme";
|
|
11
|
-
import { Text as
|
|
12
|
-
import { G as Ye, t as
|
|
13
|
-
import { C as
|
|
14
|
-
import { u as
|
|
15
|
-
import { L as
|
|
16
|
-
import { I as
|
|
17
|
-
import { C as
|
|
18
|
-
import { b as
|
|
10
|
+
import { Text as u, P as N, Icon as G, 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 P, g as Ne, o as Oe, h as ke } from "../hooks-CE2TKk4a.mjs";
|
|
12
|
+
import { C as R } from "../CurrencyText-YUhH2caW.mjs";
|
|
13
|
+
import { u as de } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
14
|
+
import { L as ee } from "../Loader-DUaFpDGv.mjs";
|
|
15
|
+
import { I as me } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
16
|
+
import { C as Mn } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
17
|
+
import { b as q } from "../Localization-2MODESHW.mjs";
|
|
19
18
|
import { M as Qe } from "../MiniWidgetContainer-DTQdRK-3.mjs";
|
|
20
|
-
import {
|
|
21
|
-
import Ke from "
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
19
|
+
import { E as Ve } from "../EmptyState-DsXpMcro.mjs";
|
|
20
|
+
import { R as Ke } from "../RecurringSettings-B486z99o.mjs";
|
|
21
|
+
import Je from "@mui/material/Tabs";
|
|
22
|
+
import xe from "@mui/material/Tab";
|
|
23
|
+
import { getUnixTime as B } from "date-fns/getUnixTime";
|
|
24
|
+
import Z from "@mui/material/List";
|
|
25
25
|
import te from "@mui/material/ListItem";
|
|
26
|
-
import { A as
|
|
27
|
-
import { f as
|
|
28
|
-
import
|
|
29
|
-
import { f as
|
|
26
|
+
import { A as Ze } from "../AccountListItem-BAdwVscV.mjs";
|
|
27
|
+
import { f as Y, D as Q } from "../Dialog-CWW597AF.mjs";
|
|
28
|
+
import et from "@mui/material/ListSubheader";
|
|
29
|
+
import { f as J } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
30
30
|
import { isAfter as He } from "date-fns/isAfter";
|
|
31
31
|
import { isBefore as Fe } from "date-fns/isBefore";
|
|
32
32
|
import { isToday as We } from "date-fns/isToday";
|
|
33
33
|
import { addDays as ye } from "date-fns/addDays";
|
|
34
|
-
import { alpha as
|
|
35
|
-
import { DataGridPro as
|
|
36
|
-
import { T as
|
|
37
|
-
import
|
|
34
|
+
import { alpha as tt, keyframes as nt } from "@mui/material/styles";
|
|
35
|
+
import { DataGridPro as ot } from "@mui/x-data-grid-pro";
|
|
36
|
+
import { T as Ce } from "../TabContentContainer-j01JYR_7.mjs";
|
|
37
|
+
import M from "@mui/material/Button";
|
|
38
|
+
import { M as at, S as it, i as rt, d as Se, c as st } from "../ManageIncome-BX7dzGF8.mjs";
|
|
38
39
|
import { D as $e } from "../Drawer-kEE73B87.mjs";
|
|
39
|
-
import { formatISO as
|
|
40
|
-
import { fromUnixTime as
|
|
41
|
-
import { startOfMonth as
|
|
40
|
+
import { formatISO as ct } from "date-fns/formatISO";
|
|
41
|
+
import { fromUnixTime as _e } from "date-fns/fromUnixTime";
|
|
42
|
+
import { startOfMonth as lt } from "date-fns/startOfMonth";
|
|
42
43
|
import { subDays as Me } from "date-fns/subDays";
|
|
43
|
-
import { S as
|
|
44
|
-
import { F as
|
|
45
|
-
import { h as
|
|
46
|
-
import { endOfToday as
|
|
47
|
-
import { W as
|
|
48
|
-
import { F as
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
44
|
+
import { S as dt, b as mt } from "../TransactionDetails-DAp_CPCP.mjs";
|
|
45
|
+
import { F as ut, R as we, e as Ie } from "../RecurringTransactions-DTUx9VN1.mjs";
|
|
46
|
+
import { h as ht } from "../DateUtil-BcuH7ErC.mjs";
|
|
47
|
+
import { endOfToday as pt } from "date-fns/endOfToday";
|
|
48
|
+
import { W as De, A as ve } from "../WidgetContainer-B8MRJ5Y1.mjs";
|
|
49
|
+
import { F as ft, A as z } from "../Fetch-87LIQbEA.mjs";
|
|
50
|
+
const V = () => {
|
|
51
|
+
if (!f.useContext(Ye))
|
|
51
52
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
52
|
-
return
|
|
53
|
-
},
|
|
54
|
-
const { cashflow: n } =
|
|
55
|
-
return /* @__PURE__ */ o(
|
|
53
|
+
return le().uiStore;
|
|
54
|
+
}, gt = ({ remaining: a }) => {
|
|
55
|
+
const { cashflow: n } = L();
|
|
56
|
+
return /* @__PURE__ */ o(U, { children: [
|
|
56
57
|
/* @__PURE__ */ e(
|
|
57
58
|
I,
|
|
58
59
|
{
|
|
@@ -64,92 +65,84 @@ const K = () => {
|
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
),
|
|
67
|
-
/* @__PURE__ */ e(
|
|
68
|
-
/* @__PURE__ */ e(
|
|
68
|
+
/* @__PURE__ */ e(u, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
|
|
69
|
+
/* @__PURE__ */ e(R, { amount: a, bold: !0, sx: { fontSize: 12 } })
|
|
69
70
|
] });
|
|
70
|
-
},
|
|
71
|
-
const
|
|
72
|
-
daysUntilNextIncome:
|
|
73
|
-
expensesTilNextIncome:
|
|
74
|
-
selectedCashAccounts:
|
|
75
|
-
setNextIncome:
|
|
76
|
-
setSelectedCashAccounts:
|
|
77
|
-
setUpcomingExpenses:
|
|
78
|
-
} =
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}, [
|
|
82
|
-
|
|
83
|
-
|
|
71
|
+
}, ue = T(gt), bt = () => {
|
|
72
|
+
const a = ie(), { availableWidth: n } = re(), { isMobile: t } = de(), { visibleCashAccounts: i, visibleCashBalance: h } = Le(), { selectedAccounts: g, selectedAccountGuids: l, setSelectedAccounts: y } = X(), { cashflow: c } = L(), {
|
|
73
|
+
daysUntilNextIncome: r,
|
|
74
|
+
expensesTilNextIncome: m,
|
|
75
|
+
selectedCashAccounts: d,
|
|
76
|
+
setNextIncome: b,
|
|
77
|
+
setSelectedCashAccounts: C,
|
|
78
|
+
setUpcomingExpenses: S
|
|
79
|
+
} = V(), { isDataLoaded: v, nextIncomeRecurrence: p, upcomingExpenses: E } = P();
|
|
80
|
+
f.useEffect(() => {
|
|
81
|
+
y(i);
|
|
82
|
+
}, [i]), f.useEffect(() => {
|
|
83
|
+
C(
|
|
84
|
+
i.filter((w) => l.includes(w.guid))
|
|
84
85
|
);
|
|
85
|
-
}, [
|
|
86
|
-
|
|
87
|
-
}, [
|
|
88
|
-
const
|
|
89
|
-
() =>
|
|
90
|
-
[
|
|
91
|
-
), W =
|
|
92
|
-
() =>
|
|
93
|
-
[
|
|
94
|
-
),
|
|
95
|
-
() =>
|
|
96
|
-
[
|
|
97
|
-
)
|
|
98
|
-
return
|
|
86
|
+
}, [i, g]), f.useEffect(() => {
|
|
87
|
+
p && b(p), S(E);
|
|
88
|
+
}, [p, E]);
|
|
89
|
+
const _ = f.useMemo(
|
|
90
|
+
() => i.filter((w) => l.includes(w.guid)).reduce((w, $) => w + ($?.balance || 0), 0),
|
|
91
|
+
[l, E]
|
|
92
|
+
), W = f.useMemo(
|
|
93
|
+
() => m.filter((w) => l.includes(w.accountGuid || "")).reduce((w, $) => w + $.amount, 0),
|
|
94
|
+
[l, m]
|
|
95
|
+
), j = f.useMemo(
|
|
96
|
+
() => _ - W,
|
|
97
|
+
[_, W]
|
|
98
|
+
);
|
|
99
|
+
return v ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
|
|
99
100
|
s,
|
|
100
101
|
{
|
|
101
|
-
border: `1px solid ${
|
|
102
|
+
border: `1px solid ${a.palette.border.light}`,
|
|
102
103
|
borderRadius: 1,
|
|
103
104
|
direction: "row",
|
|
104
105
|
justifyContent: "space-between",
|
|
105
106
|
px: 24,
|
|
106
107
|
children: [
|
|
107
108
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
108
|
-
/* @__PURE__ */ e(
|
|
109
|
-
/* @__PURE__ */ e(
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
/* @__PURE__ */ e(R, { amount: _, variant: "H2" }),
|
|
110
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: q(
|
|
111
|
+
c.total_cash_accounts,
|
|
112
|
+
d.length
|
|
112
113
|
) })
|
|
113
114
|
] }),
|
|
114
|
-
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(
|
|
115
|
+
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(G, { name: "remove" }) }),
|
|
115
116
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
116
|
-
/* @__PURE__ */ e(
|
|
117
|
-
/* @__PURE__ */ e(
|
|
117
|
+
/* @__PURE__ */ e(R, { amount: W, variant: "H2" }),
|
|
118
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: q(c.expenses_due, m.length) })
|
|
118
119
|
] }),
|
|
119
|
-
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(
|
|
120
|
+
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(G, { name: "equal" }) }),
|
|
120
121
|
/* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
|
|
121
|
-
/* @__PURE__ */ e(
|
|
122
|
+
/* @__PURE__ */ e(R, { amount: j, variant: "H2" }),
|
|
122
123
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
123
|
-
/* @__PURE__ */ e(
|
|
124
|
-
/* @__PURE__ */ e(
|
|
124
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
|
|
125
|
+
/* @__PURE__ */ e(me, { body: c.tooltip_body, title: c.tooltip_title })
|
|
125
126
|
] })
|
|
126
127
|
] }),
|
|
127
|
-
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${
|
|
128
|
-
/* @__PURE__ */ e(
|
|
129
|
-
/* @__PURE__ */ e(
|
|
130
|
-
] })
|
|
131
|
-
H,
|
|
132
|
-
{
|
|
133
|
-
onClick: a,
|
|
134
|
-
startIcon: /* @__PURE__ */ e(F, { name: "add" }),
|
|
135
|
-
sx: { fontSize: 13, lineHeight: "initial" },
|
|
136
|
-
children: i.add_income
|
|
137
|
-
}
|
|
138
|
-
) })
|
|
128
|
+
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(U, { children: [
|
|
129
|
+
/* @__PURE__ */ e(u, { variant: "H2", children: q(c.days, r) }),
|
|
130
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.next_paycheck })
|
|
131
|
+
] }) })
|
|
139
132
|
]
|
|
140
133
|
}
|
|
141
|
-
) : /* @__PURE__ */ o(s, { border: `1px solid ${
|
|
134
|
+
) : /* @__PURE__ */ o(s, { border: `1px solid ${a.palette.border.light}`, borderRadius: 1, children: [
|
|
142
135
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
143
|
-
/* @__PURE__ */ e(
|
|
144
|
-
|
|
145
|
-
|
|
136
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: q(
|
|
137
|
+
c.total_cash_accounts,
|
|
138
|
+
d.length
|
|
146
139
|
) }),
|
|
147
|
-
/* @__PURE__ */ e(
|
|
140
|
+
/* @__PURE__ */ e(R, { amount: h, bold: !0, variant: "XSmall" })
|
|
148
141
|
] }),
|
|
149
142
|
/* @__PURE__ */ e(D, {}),
|
|
150
143
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
151
|
-
/* @__PURE__ */ e(
|
|
152
|
-
/* @__PURE__ */ e(
|
|
144
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: q(c.expenses_due, m.length) }),
|
|
145
|
+
/* @__PURE__ */ e(R, { amount: W, bold: !0, symbol: "-", variant: "XSmall" })
|
|
153
146
|
] }),
|
|
154
147
|
/* @__PURE__ */ e(D, {}),
|
|
155
148
|
/* @__PURE__ */ e(
|
|
@@ -163,58 +156,51 @@ const K = () => {
|
|
|
163
156
|
justifyContent: "space-between",
|
|
164
157
|
px: 16,
|
|
165
158
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
166
|
-
children: /* @__PURE__ */ e(
|
|
159
|
+
children: /* @__PURE__ */ e(ue, { remaining: j })
|
|
167
160
|
}
|
|
168
161
|
),
|
|
169
162
|
/* @__PURE__ */ e(D, {}),
|
|
170
|
-
|
|
171
|
-
/* @__PURE__ */ e(
|
|
172
|
-
/* @__PURE__ */ e(
|
|
173
|
-
] })
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
alignItems: "center",
|
|
177
|
-
direction: "row",
|
|
178
|
-
justifyContent: "space-between",
|
|
179
|
-
pl: 16,
|
|
180
|
-
pr: 2,
|
|
181
|
-
py: 2,
|
|
182
|
-
children: [
|
|
183
|
-
/* @__PURE__ */ e(d, { variant: "Small", children: i.next_paycheck }),
|
|
184
|
-
/* @__PURE__ */ e(
|
|
185
|
-
H,
|
|
186
|
-
{
|
|
187
|
-
onClick: a,
|
|
188
|
-
startIcon: /* @__PURE__ */ e(F, { name: "add" }),
|
|
189
|
-
sx: { fontSize: 13 },
|
|
190
|
-
children: i.add_income
|
|
191
|
-
}
|
|
192
|
-
)
|
|
193
|
-
]
|
|
194
|
-
}
|
|
195
|
-
)
|
|
196
|
-
] }) }) : /* @__PURE__ */ e(se, { height: r ? 210 : 120 });
|
|
197
|
-
}, bt = T(gt), xt = ({
|
|
163
|
+
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
164
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: c.next_paycheck }),
|
|
165
|
+
/* @__PURE__ */ e(u, { bold: !0, variant: "XSmall", children: q(c.days, r) })
|
|
166
|
+
] })
|
|
167
|
+
] }) }) : /* @__PURE__ */ e(ee, { height: t ? 210 : 120 });
|
|
168
|
+
}, xt = T(bt), yt = ({
|
|
198
169
|
onPrimaryCtaClick: a,
|
|
199
170
|
onSecondaryCtaClick: n,
|
|
200
171
|
sx: t = {}
|
|
201
172
|
}) => {
|
|
202
|
-
const { cashflow:
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}, [
|
|
173
|
+
const { cashflow: i } = L(), { isCopyLoaded: h, isInitialized: g } = X(), { loadRepeatingTransactions: l, income: y, isDataLoaded: c, setDateRange: r } = P();
|
|
174
|
+
f.useEffect(() => {
|
|
175
|
+
g && (r({ start: F(), end: qe(F(), 1) }), l().finally());
|
|
176
|
+
}, [g]);
|
|
177
|
+
const m = c && !y.length;
|
|
178
|
+
return h ? /* @__PURE__ */ o(
|
|
206
179
|
Qe,
|
|
207
180
|
{
|
|
208
181
|
className: "mx-exp-cashflow-miniwidget",
|
|
209
182
|
onPrimaryCtaClick: a,
|
|
210
|
-
primaryCtaLabel:
|
|
211
|
-
subTitle:
|
|
183
|
+
primaryCtaLabel: i.primary_cta,
|
|
184
|
+
subTitle: m || !c ? void 0 : i.sub_title,
|
|
212
185
|
sx: t,
|
|
213
|
-
title:
|
|
214
|
-
children:
|
|
186
|
+
title: i.title,
|
|
187
|
+
children: [
|
|
188
|
+
!c && /* @__PURE__ */ e(ee, {}),
|
|
189
|
+
c && (m ? /* @__PURE__ */ e(
|
|
190
|
+
Ve,
|
|
191
|
+
{
|
|
192
|
+
header: i.create,
|
|
193
|
+
icon: "local_atm",
|
|
194
|
+
onClick: n,
|
|
195
|
+
primaryButton: i.add_income,
|
|
196
|
+
primaryButtonStartIcon: "add",
|
|
197
|
+
subText: i.create_description
|
|
198
|
+
}
|
|
199
|
+
) : /* @__PURE__ */ e(xt, {}))
|
|
200
|
+
]
|
|
215
201
|
}
|
|
216
|
-
) : /* @__PURE__ */ e(
|
|
217
|
-
},
|
|
202
|
+
) : /* @__PURE__ */ e(ee, {});
|
|
203
|
+
}, kn = T(yt), Ct = ({ remaining: a }) => /* @__PURE__ */ e(
|
|
218
204
|
te,
|
|
219
205
|
{
|
|
220
206
|
sx: {
|
|
@@ -227,19 +213,19 @@ const K = () => {
|
|
|
227
213
|
borderBottomRightRadius: "3px",
|
|
228
214
|
minHeight: "auto"
|
|
229
215
|
},
|
|
230
|
-
children: /* @__PURE__ */ e(
|
|
216
|
+
children: /* @__PURE__ */ e(ue, { remaining: a })
|
|
231
217
|
}
|
|
232
218
|
);
|
|
233
219
|
var ne = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a))(ne || {});
|
|
234
|
-
const
|
|
220
|
+
const St = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
235
221
|
/* @__PURE__ */ o(te, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
|
|
236
222
|
/* @__PURE__ */ o(s, { alignItems: "center", height: 32, width: 32, children: [
|
|
237
|
-
/* @__PURE__ */ e(
|
|
238
|
-
/* @__PURE__ */ e(
|
|
223
|
+
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Y(a.expectedDate, Q.MONTH) }),
|
|
224
|
+
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Y(a.expectedDate, Q.DAY) })
|
|
239
225
|
] }),
|
|
240
|
-
/* @__PURE__ */ e(
|
|
226
|
+
/* @__PURE__ */ e(u, { sx: { flexGrow: 1, fontSize: 13 }, children: a.name }),
|
|
241
227
|
/* @__PURE__ */ e(
|
|
242
|
-
|
|
228
|
+
R,
|
|
243
229
|
{
|
|
244
230
|
amount: a.amount,
|
|
245
231
|
bold: !0,
|
|
@@ -248,11 +234,11 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
248
234
|
)
|
|
249
235
|
] }),
|
|
250
236
|
/* @__PURE__ */ e(D, {})
|
|
251
|
-
] }), Ee = T(
|
|
252
|
-
const { cashflow: t } =
|
|
253
|
-
return /* @__PURE__ */ o(
|
|
237
|
+
] }), Ee = T(St), _t = ({ total: a, type: n }) => {
|
|
238
|
+
const { cashflow: t } = L();
|
|
239
|
+
return /* @__PURE__ */ o(U, { children: [
|
|
254
240
|
/* @__PURE__ */ o(
|
|
255
|
-
|
|
241
|
+
et,
|
|
256
242
|
{
|
|
257
243
|
sx: {
|
|
258
244
|
alignItems: "center",
|
|
@@ -264,40 +250,40 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
264
250
|
px: 24
|
|
265
251
|
},
|
|
266
252
|
children: [
|
|
267
|
-
/* @__PURE__ */ e(
|
|
268
|
-
/* @__PURE__ */ o(
|
|
253
|
+
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 12 }, children: n === ne.EXPENSE ? t.expenses : t.income }),
|
|
254
|
+
/* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 13 }, children: [
|
|
269
255
|
n === ne.EXPENSE ? "-" : "+",
|
|
270
|
-
|
|
256
|
+
J(a, "0,0.00")
|
|
271
257
|
] })
|
|
272
258
|
]
|
|
273
259
|
}
|
|
274
260
|
),
|
|
275
261
|
/* @__PURE__ */ e(D, {})
|
|
276
262
|
] });
|
|
277
|
-
},
|
|
278
|
-
const { availableWidth: a } = re(), { cashflow: n } =
|
|
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 } = P(), { dateRange: h, selectedCashAccounts: g } = V();
|
|
279
265
|
return /* @__PURE__ */ o(s, { children: [
|
|
280
266
|
/* @__PURE__ */ o(s, { direction: a < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
281
|
-
/* @__PURE__ */ e(
|
|
282
|
-
/* @__PURE__ */ o(
|
|
283
|
-
|
|
267
|
+
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
|
|
268
|
+
/* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
|
|
269
|
+
Y(h.start, Q.FULL_MONTH_DAY),
|
|
284
270
|
" -",
|
|
285
271
|
" ",
|
|
286
|
-
|
|
272
|
+
Y(h.end, Q.FULL_MONTH_DAY)
|
|
287
273
|
] })
|
|
288
274
|
] }),
|
|
289
|
-
/* @__PURE__ */ e(s, { children:
|
|
290
|
-
const
|
|
291
|
-
ae(
|
|
292
|
-
),
|
|
293
|
-
(
|
|
275
|
+
/* @__PURE__ */ e(s, { children: g.map((l) => {
|
|
276
|
+
const y = i.filter(ae(l, h)).sort((d, b) => B(d.expectedDate) - B(b.expectedDate)), c = t.filter(
|
|
277
|
+
ae(l, h)
|
|
278
|
+
), r = y.reduce(
|
|
279
|
+
(d, b) => d + b.amount,
|
|
294
280
|
0
|
|
295
|
-
),
|
|
296
|
-
(
|
|
281
|
+
), m = c.reduce(
|
|
282
|
+
(d, b) => d + b.amount,
|
|
297
283
|
0
|
|
298
284
|
);
|
|
299
285
|
return /* @__PURE__ */ o(
|
|
300
|
-
|
|
286
|
+
Z,
|
|
301
287
|
{
|
|
302
288
|
sx: {
|
|
303
289
|
border: "1px solid",
|
|
@@ -307,9 +293,9 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
307
293
|
},
|
|
308
294
|
children: [
|
|
309
295
|
/* @__PURE__ */ e(
|
|
310
|
-
|
|
296
|
+
Ze,
|
|
311
297
|
{
|
|
312
|
-
account:
|
|
298
|
+
account: l,
|
|
313
299
|
listItemProps: {
|
|
314
300
|
disableGutters: !1,
|
|
315
301
|
disablePadding: !1,
|
|
@@ -318,52 +304,52 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
318
304
|
}
|
|
319
305
|
),
|
|
320
306
|
/* @__PURE__ */ e(D, {}),
|
|
321
|
-
|
|
322
|
-
|
|
307
|
+
y.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
|
|
308
|
+
Z,
|
|
323
309
|
{
|
|
324
|
-
subheader: /* @__PURE__ */ e(
|
|
310
|
+
subheader: /* @__PURE__ */ e(Ae, { total: r, type: ne.INCOME }),
|
|
325
311
|
sx: { width: "100%" },
|
|
326
|
-
children:
|
|
312
|
+
children: y.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
|
|
327
313
|
}
|
|
328
314
|
) }),
|
|
329
|
-
|
|
330
|
-
|
|
315
|
+
c.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
|
|
316
|
+
Z,
|
|
331
317
|
{
|
|
332
|
-
subheader: /* @__PURE__ */ e(
|
|
318
|
+
subheader: /* @__PURE__ */ e(Ae, { total: m, type: ne.EXPENSE }),
|
|
333
319
|
sx: { width: "100%" },
|
|
334
|
-
children:
|
|
320
|
+
children: c.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
|
|
335
321
|
}
|
|
336
322
|
) }),
|
|
337
323
|
/* @__PURE__ */ e(
|
|
338
324
|
Ct,
|
|
339
325
|
{
|
|
340
|
-
remaining: (
|
|
326
|
+
remaining: (l.available_balance || l.balance || 0) + r - m
|
|
341
327
|
}
|
|
342
328
|
)
|
|
343
329
|
]
|
|
344
330
|
},
|
|
345
|
-
|
|
331
|
+
l.guid
|
|
346
332
|
);
|
|
347
333
|
}) })
|
|
348
334
|
] });
|
|
349
|
-
},
|
|
350
|
-
const { availableWidth: a } = re(), n = ie(), { cashflow: t } =
|
|
335
|
+
}, It = T(wt), Dt = () => {
|
|
336
|
+
const { availableWidth: a } = re(), n = ie(), { cashflow: t } = L(), { upcomingExpenses: i, upcomingIncome: h } = P(), { dateRange: g, selectedCashAccounts: l } = V(), y = [
|
|
351
337
|
{
|
|
352
338
|
field: "account",
|
|
353
339
|
flex: 1.5,
|
|
354
340
|
headerName: t.accounts,
|
|
355
|
-
renderCell: ({ value: { name:
|
|
356
|
-
const
|
|
341
|
+
renderCell: ({ value: { name: r, nickname: m, institution_guid: d, account_number: b } }) => {
|
|
342
|
+
const C = m || r;
|
|
357
343
|
return /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 12, children: [
|
|
358
344
|
/* @__PURE__ */ e(
|
|
359
|
-
|
|
345
|
+
be,
|
|
360
346
|
{
|
|
361
347
|
alt: t.institution_logo,
|
|
362
|
-
institutionGuid:
|
|
348
|
+
institutionGuid: d || "",
|
|
363
349
|
size: 16
|
|
364
350
|
}
|
|
365
351
|
),
|
|
366
|
-
/* @__PURE__ */ e(
|
|
352
|
+
/* @__PURE__ */ e(u, { variant: "body2", children: `${C} ${b ? `*${b}` : ""}` })
|
|
367
353
|
] });
|
|
368
354
|
}
|
|
369
355
|
},
|
|
@@ -372,54 +358,54 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
372
358
|
flex: 1,
|
|
373
359
|
headerName: t.balance,
|
|
374
360
|
type: "number",
|
|
375
|
-
renderCell: (
|
|
361
|
+
renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: J(r.value, "0,0.00") })
|
|
376
362
|
},
|
|
377
363
|
{
|
|
378
364
|
field: "income",
|
|
379
365
|
flex: 1,
|
|
380
366
|
headerName: t.projected_income,
|
|
381
367
|
type: "number",
|
|
382
|
-
renderCell: (
|
|
368
|
+
renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `+${J(r.value, "0,0.00")}` })
|
|
383
369
|
},
|
|
384
370
|
{
|
|
385
371
|
field: "expenses",
|
|
386
372
|
flex: 1.1,
|
|
387
373
|
headerName: t.projected_expenses,
|
|
388
374
|
type: "number",
|
|
389
|
-
renderCell: (
|
|
375
|
+
renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `-${J(r.value, "0,0.00")}` })
|
|
390
376
|
},
|
|
391
377
|
{
|
|
392
378
|
field: "remaining",
|
|
393
379
|
flex: 1,
|
|
394
380
|
headerName: t.remaining,
|
|
395
381
|
type: "number",
|
|
396
|
-
renderCell: (
|
|
397
|
-
const
|
|
382
|
+
renderCell: (r) => {
|
|
383
|
+
const m = r.row.balance + r.row.income - r.row.expenses;
|
|
398
384
|
return /* @__PURE__ */ e(
|
|
399
|
-
|
|
385
|
+
u,
|
|
400
386
|
{
|
|
401
|
-
color: Math.sign(
|
|
387
|
+
color: Math.sign(m) === -1 ? n.palette.error.main : n.palette.text.primary,
|
|
402
388
|
variant: "Small",
|
|
403
|
-
children:
|
|
389
|
+
children: J(m, "0,0.00")
|
|
404
390
|
}
|
|
405
391
|
);
|
|
406
392
|
}
|
|
407
393
|
}
|
|
408
|
-
],
|
|
409
|
-
const
|
|
410
|
-
ae(
|
|
411
|
-
).reduce((
|
|
412
|
-
ae(
|
|
413
|
-
).reduce((
|
|
394
|
+
], c = f.useMemo(() => l.map((r) => {
|
|
395
|
+
const m = i.filter(
|
|
396
|
+
ae(r, { start: F(), end: ye(F(), 30) })
|
|
397
|
+
).reduce((C, S) => C + S.amount, 0), d = h.filter(
|
|
398
|
+
ae(r, { start: F(), end: ye(F(), 30) })
|
|
399
|
+
).reduce((C, S) => C + S.amount, 0), b = (r.balance || 0) + d - m;
|
|
414
400
|
return {
|
|
415
|
-
account:
|
|
416
|
-
balance:
|
|
417
|
-
id:
|
|
418
|
-
income:
|
|
419
|
-
expenses:
|
|
420
|
-
remaining:
|
|
401
|
+
account: r,
|
|
402
|
+
balance: r.balance || 0,
|
|
403
|
+
id: r.guid,
|
|
404
|
+
income: d,
|
|
405
|
+
expenses: m,
|
|
406
|
+
remaining: b
|
|
421
407
|
};
|
|
422
|
-
}), [
|
|
408
|
+
}), [l, i, h]);
|
|
423
409
|
return /* @__PURE__ */ o(
|
|
424
410
|
I,
|
|
425
411
|
{
|
|
@@ -436,7 +422,7 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
436
422
|
children: [
|
|
437
423
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
438
424
|
/* @__PURE__ */ e(
|
|
439
|
-
|
|
425
|
+
u,
|
|
440
426
|
{
|
|
441
427
|
bold: !0,
|
|
442
428
|
sx: {
|
|
@@ -447,33 +433,33 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
447
433
|
}
|
|
448
434
|
),
|
|
449
435
|
/* @__PURE__ */ e(
|
|
450
|
-
|
|
436
|
+
me,
|
|
451
437
|
{
|
|
452
438
|
body: t.table_tooltip_body,
|
|
453
439
|
title: t.table_tooltip_title
|
|
454
440
|
}
|
|
455
441
|
)
|
|
456
442
|
] }),
|
|
457
|
-
/* @__PURE__ */ o(
|
|
458
|
-
|
|
443
|
+
/* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
|
|
444
|
+
Y(g.start, Q.FULL_MONTH_DAY),
|
|
459
445
|
" -",
|
|
460
446
|
" ",
|
|
461
|
-
|
|
447
|
+
Y(g.end, Q.FULL_MONTH_DAY)
|
|
462
448
|
] })
|
|
463
449
|
]
|
|
464
450
|
}
|
|
465
451
|
),
|
|
466
452
|
a > 650 ? /* @__PURE__ */ e(
|
|
467
|
-
|
|
453
|
+
ot,
|
|
468
454
|
{
|
|
469
455
|
columnHeaderHeight: 48,
|
|
470
|
-
columns:
|
|
456
|
+
columns: y,
|
|
471
457
|
density: "standard",
|
|
472
458
|
disableColumnMenu: !0,
|
|
473
459
|
disableRowSelectionOnClick: !0,
|
|
474
460
|
hideFooter: !0,
|
|
475
461
|
rowHeight: 48,
|
|
476
|
-
rows:
|
|
462
|
+
rows: c,
|
|
477
463
|
sx: {
|
|
478
464
|
border: "1px solid",
|
|
479
465
|
borderColor: "border.light",
|
|
@@ -481,7 +467,7 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
481
467
|
"& .MuiDataGrid-columnHeader .MuiIconButton-root": {
|
|
482
468
|
color: n.palette.primary.main,
|
|
483
469
|
"&:hover": {
|
|
484
|
-
backgroundColor:
|
|
470
|
+
backgroundColor: tt(n.palette.primary.main, 0.1)
|
|
485
471
|
}
|
|
486
472
|
},
|
|
487
473
|
"& .MuiDataGrid-columnHeaderTitle": {
|
|
@@ -493,10 +479,10 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
493
479
|
}
|
|
494
480
|
}
|
|
495
481
|
}
|
|
496
|
-
) :
|
|
497
|
-
const { name:
|
|
482
|
+
) : c.map((r) => {
|
|
483
|
+
const { name: m, nickname: d, institution_guid: b, account_number: C } = r.account, S = d || m;
|
|
498
484
|
return /* @__PURE__ */ e(
|
|
499
|
-
|
|
485
|
+
Z,
|
|
500
486
|
{
|
|
501
487
|
sx: {
|
|
502
488
|
border: "1px solid",
|
|
@@ -516,16 +502,16 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
516
502
|
children: [
|
|
517
503
|
/* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 8, width: "50%", children: [
|
|
518
504
|
/* @__PURE__ */ e(
|
|
519
|
-
|
|
505
|
+
be,
|
|
520
506
|
{
|
|
521
507
|
alt: t.institution_logo,
|
|
522
|
-
institutionGuid:
|
|
508
|
+
institutionGuid: b || "",
|
|
523
509
|
size: 16
|
|
524
510
|
}
|
|
525
511
|
),
|
|
526
|
-
/* @__PURE__ */ e(
|
|
512
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: `${S} ${C ? `*${C}` : ""}` })
|
|
527
513
|
] }),
|
|
528
|
-
/* @__PURE__ */ e(
|
|
514
|
+
/* @__PURE__ */ e(R, { amount: r.balance, bold: !0, variant: "Small" })
|
|
529
515
|
]
|
|
530
516
|
}
|
|
531
517
|
),
|
|
@@ -539,8 +525,8 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
539
525
|
px: 16,
|
|
540
526
|
py: 12,
|
|
541
527
|
children: [
|
|
542
|
-
/* @__PURE__ */ e(
|
|
543
|
-
/* @__PURE__ */ e(
|
|
528
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: t.projected_income }),
|
|
529
|
+
/* @__PURE__ */ e(R, { amount: r.income, bold: !0, symbol: "+", variant: "Small" })
|
|
544
530
|
]
|
|
545
531
|
}
|
|
546
532
|
),
|
|
@@ -554,8 +540,8 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
554
540
|
px: 16,
|
|
555
541
|
py: 12,
|
|
556
542
|
children: [
|
|
557
|
-
/* @__PURE__ */ e(
|
|
558
|
-
/* @__PURE__ */ e(
|
|
543
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: t.projected_expenses }),
|
|
544
|
+
/* @__PURE__ */ e(R, { amount: r.expenses, bold: !0, symbol: "-", variant: "Small" })
|
|
559
545
|
]
|
|
560
546
|
}
|
|
561
547
|
),
|
|
@@ -571,36 +557,36 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
571
557
|
px: 16,
|
|
572
558
|
py: 12,
|
|
573
559
|
sx: { borderBottomLeftRadius: "4px", borderBottomRightRadius: "4px" },
|
|
574
|
-
children: /* @__PURE__ */ e(
|
|
560
|
+
children: /* @__PURE__ */ e(ue, { remaining: r.remaining })
|
|
575
561
|
}
|
|
576
562
|
)
|
|
577
563
|
] }) })
|
|
578
564
|
},
|
|
579
|
-
|
|
565
|
+
r.id
|
|
580
566
|
);
|
|
581
567
|
})
|
|
582
568
|
]
|
|
583
569
|
}
|
|
584
570
|
);
|
|
585
|
-
},
|
|
586
|
-
const { cashflow: a } =
|
|
587
|
-
|
|
571
|
+
}, vt = T(Dt), Et = () => {
|
|
572
|
+
const { cashflow: a } = L(), { isDesktop: n } = de(), { onEvent: t } = Ne(), [i, h] = f.useState(0), g = (l, y) => {
|
|
573
|
+
h(y);
|
|
588
574
|
};
|
|
589
|
-
return
|
|
590
|
-
t(
|
|
591
|
-
}, [
|
|
575
|
+
return f.useEffect(() => {
|
|
576
|
+
t(i === 0 ? "cash_flow_summary" : "cash_flow_details");
|
|
577
|
+
}, [i]), /* @__PURE__ */ o(I, { children: [
|
|
592
578
|
/* @__PURE__ */ o(
|
|
593
|
-
|
|
579
|
+
Je,
|
|
594
580
|
{
|
|
595
581
|
"aria-label": a.cashflow_summary_and_details,
|
|
596
582
|
centered: !0,
|
|
597
|
-
onChange:
|
|
583
|
+
onChange: g,
|
|
598
584
|
textColor: "primary",
|
|
599
|
-
value:
|
|
585
|
+
value: i,
|
|
600
586
|
variant: "fullWidth",
|
|
601
587
|
children: [
|
|
602
588
|
/* @__PURE__ */ e(
|
|
603
|
-
|
|
589
|
+
xe,
|
|
604
590
|
{
|
|
605
591
|
"aria-controls": "cashflow-tabpanel-0",
|
|
606
592
|
id: "cashflow-tab-0",
|
|
@@ -611,7 +597,7 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
611
597
|
}
|
|
612
598
|
),
|
|
613
599
|
/* @__PURE__ */ e(
|
|
614
|
-
|
|
600
|
+
xe,
|
|
615
601
|
{
|
|
616
602
|
"aria-controls": "cashflow-tabpanel-1",
|
|
617
603
|
id: "cashflow-tab-1",
|
|
@@ -625,16 +611,16 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
625
611
|
}
|
|
626
612
|
),
|
|
627
613
|
/* @__PURE__ */ e(I, { sx: { mb: 32 } }),
|
|
628
|
-
/* @__PURE__ */ e(
|
|
629
|
-
/* @__PURE__ */ e(
|
|
614
|
+
/* @__PURE__ */ e(Ce, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(vt, {}) }) }),
|
|
615
|
+
/* @__PURE__ */ e(Ce, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(It, {}) }) })
|
|
630
616
|
] });
|
|
631
|
-
}, At = T(
|
|
617
|
+
}, At = T(Et), oe = ({
|
|
632
618
|
amount: a,
|
|
633
619
|
isMobile: n = !1,
|
|
634
620
|
isTotal: t = !1,
|
|
635
|
-
label:
|
|
636
|
-
symbol:
|
|
637
|
-
tooltip:
|
|
621
|
+
label: i,
|
|
622
|
+
symbol: h,
|
|
623
|
+
tooltip: g
|
|
638
624
|
}) => /* @__PURE__ */ o(
|
|
639
625
|
s,
|
|
640
626
|
{
|
|
@@ -644,25 +630,25 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
644
630
|
padding: n ? "14px 16px" : 0,
|
|
645
631
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
646
632
|
children: [
|
|
647
|
-
!n && /* @__PURE__ */ e(
|
|
633
|
+
!n && /* @__PURE__ */ e(R, { amount: a, component: "h2", variant: "H2" }),
|
|
648
634
|
/* @__PURE__ */ o(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
|
|
649
|
-
/* @__PURE__ */ e(
|
|
650
|
-
|
|
635
|
+
/* @__PURE__ */ e(u, { bold: t, variant: "Small", children: i }),
|
|
636
|
+
g
|
|
651
637
|
] }),
|
|
652
|
-
n && /* @__PURE__ */ e(
|
|
638
|
+
n && /* @__PURE__ */ e(R, { amount: a, component: "h2", symbol: h, variant: "Small" })
|
|
653
639
|
]
|
|
654
640
|
}
|
|
655
|
-
),
|
|
656
|
-
const { availableWidth: a } = re(), { cashflow: n } =
|
|
657
|
-
() => t.filter(
|
|
658
|
-
[
|
|
659
|
-
),
|
|
660
|
-
() =>
|
|
661
|
-
[
|
|
662
|
-
),
|
|
663
|
-
() =>
|
|
664
|
-
[
|
|
665
|
-
),
|
|
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 } = P(), { selectedAccountGuids: h } = X(), { dateRange: g, selectedCashAccounts: l } = V(), { userProfile: y } = Oe(), [c, r] = f.useState(!1), m = f.useMemo(
|
|
643
|
+
() => t.filter(Te(h, g)),
|
|
644
|
+
[g, h, t]
|
|
645
|
+
), d = f.useMemo(
|
|
646
|
+
() => i.filter(Te(h, g)),
|
|
647
|
+
[g, h, i]
|
|
648
|
+
), b = f.useMemo(
|
|
649
|
+
() => l.reduce((E, _) => E + (_?.balance || 0), 0),
|
|
650
|
+
[l]
|
|
651
|
+
), C = m.reduce((E, _) => E + _.amount, 0), S = d.reduce((E, _) => E + _.amount, 0), v = b - C + S, p = a < 725;
|
|
666
652
|
return /* @__PURE__ */ o(s, { sx: { mx: p ? 16 : 0, my: p ? 24 : 42 }, children: [
|
|
667
653
|
/* @__PURE__ */ o(
|
|
668
654
|
s,
|
|
@@ -677,14 +663,14 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
677
663
|
/* @__PURE__ */ e(
|
|
678
664
|
oe,
|
|
679
665
|
{
|
|
680
|
-
amount:
|
|
666
|
+
amount: b,
|
|
681
667
|
isMobile: p,
|
|
682
668
|
label: n.cash_and_bank
|
|
683
669
|
}
|
|
684
670
|
),
|
|
685
671
|
p && /* @__PURE__ */ e(D, {}),
|
|
686
|
-
|
|
687
|
-
!p && /* @__PURE__ */ e(
|
|
672
|
+
y?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(U, { children: [
|
|
673
|
+
!p && /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
688
674
|
/* @__PURE__ */ e(
|
|
689
675
|
oe,
|
|
690
676
|
{
|
|
@@ -695,25 +681,25 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
695
681
|
}
|
|
696
682
|
)
|
|
697
683
|
] }) : /* @__PURE__ */ e(
|
|
698
|
-
|
|
684
|
+
M,
|
|
699
685
|
{
|
|
700
|
-
onClick: () =>
|
|
701
|
-
startIcon: /* @__PURE__ */ e(
|
|
686
|
+
onClick: () => r(!0),
|
|
687
|
+
startIcon: /* @__PURE__ */ e(G, { name: "add" }),
|
|
702
688
|
sx: { fontSize: 13 },
|
|
703
689
|
children: n.add_income
|
|
704
690
|
}
|
|
705
691
|
),
|
|
706
|
-
p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(
|
|
692
|
+
p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
|
|
707
693
|
/* @__PURE__ */ e(
|
|
708
694
|
oe,
|
|
709
695
|
{
|
|
710
|
-
amount:
|
|
696
|
+
amount: C,
|
|
711
697
|
isMobile: p,
|
|
712
698
|
label: n.to_be_paid_out,
|
|
713
699
|
symbol: p ? "-" : void 0
|
|
714
700
|
}
|
|
715
701
|
),
|
|
716
|
-
p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(
|
|
702
|
+
p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
|
|
717
703
|
/* @__PURE__ */ e(
|
|
718
704
|
oe,
|
|
719
705
|
{
|
|
@@ -722,7 +708,7 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
722
708
|
isTotal: p,
|
|
723
709
|
label: n.remaining_cash,
|
|
724
710
|
tooltip: /* @__PURE__ */ e(
|
|
725
|
-
|
|
711
|
+
me,
|
|
726
712
|
{
|
|
727
713
|
body: n.remaining_income_tooltip_body,
|
|
728
714
|
title: n.remaining_income_tooltip_title
|
|
@@ -737,263 +723,263 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
737
723
|
$e,
|
|
738
724
|
{
|
|
739
725
|
ariaLabelClose: n.close_manage_income_aria,
|
|
740
|
-
isOpen:
|
|
741
|
-
onClose: () =>
|
|
726
|
+
isOpen: c,
|
|
727
|
+
onClose: () => r(!1),
|
|
742
728
|
shouldShowHeaderBorders: !1,
|
|
743
729
|
title: n.manage_income,
|
|
744
|
-
children: /* @__PURE__ */ e(
|
|
730
|
+
children: /* @__PURE__ */ e(at, {})
|
|
745
731
|
}
|
|
746
732
|
)
|
|
747
733
|
] });
|
|
748
|
-
},
|
|
749
|
-
const { completeOnboarding: n } =
|
|
734
|
+
}, Rt = T(Tt), Lt = ({ handleNextStep: a }) => {
|
|
735
|
+
const { completeOnboarding: n } = le(), { cashflow: t } = L(), i = ie();
|
|
750
736
|
return /* @__PURE__ */ o(s, { children: [
|
|
751
|
-
/* @__PURE__ */ e(
|
|
737
|
+
/* @__PURE__ */ e(ce, { pb: 12, children: t.welcome_title }),
|
|
752
738
|
/* @__PURE__ */ e(
|
|
753
739
|
Xe,
|
|
754
740
|
{
|
|
755
|
-
color:
|
|
741
|
+
color: i.palette.primary.light,
|
|
756
742
|
pb: 8,
|
|
757
743
|
sx: { wordBreak: "break-word", whiteSpace: "initial" },
|
|
758
744
|
variant: "H3",
|
|
759
745
|
children: t.welcome_sub_title
|
|
760
746
|
}
|
|
761
747
|
),
|
|
762
|
-
/* @__PURE__ */ e(
|
|
748
|
+
/* @__PURE__ */ e(N, { pb: 32, children: t.welcome_description }),
|
|
763
749
|
/* @__PURE__ */ o(s, { direction: "column", mb: 32, spacing: 32, children: [
|
|
764
|
-
/* @__PURE__ */ o(
|
|
750
|
+
/* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
765
751
|
/* @__PURE__ */ e(
|
|
766
752
|
I,
|
|
767
753
|
{
|
|
768
|
-
bgcolor:
|
|
754
|
+
bgcolor: i.palette.primary.lighter,
|
|
769
755
|
borderRadius: 1,
|
|
770
756
|
component: "span",
|
|
771
757
|
height: 44,
|
|
772
758
|
mr: 24,
|
|
773
759
|
sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
774
760
|
width: 44,
|
|
775
|
-
children: /* @__PURE__ */ e(
|
|
761
|
+
children: /* @__PURE__ */ e(G, { color: "primary", name: "currency_exchange" })
|
|
776
762
|
}
|
|
777
763
|
),
|
|
778
764
|
t.bullet_one
|
|
779
765
|
] }),
|
|
780
|
-
/* @__PURE__ */ o(
|
|
766
|
+
/* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
781
767
|
/* @__PURE__ */ e(
|
|
782
768
|
I,
|
|
783
769
|
{
|
|
784
|
-
bgcolor:
|
|
770
|
+
bgcolor: i.palette.primary.lighter,
|
|
785
771
|
borderRadius: 1,
|
|
786
772
|
component: "span",
|
|
787
773
|
height: 44,
|
|
788
774
|
mr: 24,
|
|
789
775
|
sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
790
776
|
width: 44,
|
|
791
|
-
children: /* @__PURE__ */ e(
|
|
777
|
+
children: /* @__PURE__ */ e(G, { color: "primary", name: "cardiology" })
|
|
792
778
|
}
|
|
793
779
|
),
|
|
794
780
|
t.bullet_two
|
|
795
781
|
] }),
|
|
796
|
-
/* @__PURE__ */ o(
|
|
782
|
+
/* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
797
783
|
/* @__PURE__ */ e(
|
|
798
784
|
I,
|
|
799
785
|
{
|
|
800
|
-
bgcolor:
|
|
786
|
+
bgcolor: i.palette.primary.lighter,
|
|
801
787
|
borderRadius: 1,
|
|
802
788
|
component: "span",
|
|
803
789
|
height: 44,
|
|
804
790
|
mr: 24,
|
|
805
791
|
sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
806
792
|
width: 44,
|
|
807
|
-
children: /* @__PURE__ */ e(
|
|
793
|
+
children: /* @__PURE__ */ e(G, { color: "primary", name: "flare" })
|
|
808
794
|
}
|
|
809
795
|
),
|
|
810
796
|
t.bullet_three
|
|
811
797
|
] })
|
|
812
798
|
] }),
|
|
813
799
|
/* @__PURE__ */ o(s, { direction: "row", spacing: 16, children: [
|
|
814
|
-
/* @__PURE__ */ e(
|
|
815
|
-
/* @__PURE__ */ e(
|
|
800
|
+
/* @__PURE__ */ e(M, { onClick: a, variant: "contained", children: t.get_started_button }),
|
|
801
|
+
/* @__PURE__ */ e(M, { onClick: n, variant: "outlined", children: t.skip_button })
|
|
816
802
|
] })
|
|
817
803
|
] });
|
|
818
|
-
},
|
|
819
|
-
CASHFLOW_ONBOARDING: `${
|
|
820
|
-
CASHFLOW_LOADING_ANIMATION: `${
|
|
804
|
+
}, Nt = T(Lt), Re = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", Ge = {
|
|
805
|
+
CASHFLOW_ONBOARDING: `${Re}/cashflow-onboarding.png`,
|
|
806
|
+
CASHFLOW_LOADING_ANIMATION: `${Re}/loading-animation.gif`
|
|
821
807
|
}, Ot = () => {
|
|
822
|
-
const { cashflow: a } =
|
|
823
|
-
return /* @__PURE__ */ o(
|
|
808
|
+
const { cashflow: a } = L();
|
|
809
|
+
return /* @__PURE__ */ o(f.Fragment, { children: [
|
|
824
810
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: Ge.CASHFLOW_LOADING_ANIMATION }) }),
|
|
825
|
-
/* @__PURE__ */ e(
|
|
826
|
-
/* @__PURE__ */ e(
|
|
811
|
+
/* @__PURE__ */ e(ce, { pb: 12, children: a.loading_title }),
|
|
812
|
+
/* @__PURE__ */ e(N, { children: a.loading_description })
|
|
827
813
|
] });
|
|
828
|
-
},
|
|
814
|
+
}, kt = T(Ot), Ht = nt`
|
|
829
815
|
from {
|
|
830
816
|
transform: rotate(0deg);
|
|
831
817
|
}
|
|
832
818
|
to {
|
|
833
819
|
transform: rotate(360deg);
|
|
834
820
|
}
|
|
835
|
-
`,
|
|
836
|
-
const { addRepeatingTransaction: a, repeatingTransactions: n } =
|
|
837
|
-
() =>
|
|
838
|
-
[
|
|
821
|
+
`, Ft = () => {
|
|
822
|
+
const { addRepeatingTransaction: a, repeatingTransactions: n } = P(), { 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, j] = f.useState(15), [w, $] = K(!1), [O, he] = K(1), [k, je] = K([]), [pe, se] = K(""), H = f.useMemo(
|
|
823
|
+
() => d.find((x) => x.guid === pe),
|
|
824
|
+
[pe, d]
|
|
839
825
|
), ze = !!n.filter(
|
|
840
|
-
(x) => x.repeating_transaction_type ===
|
|
841
|
-
).length,
|
|
842
|
-
|
|
826
|
+
(x) => x.repeating_transaction_type === we.Income
|
|
827
|
+
).length, fe = async () => {
|
|
828
|
+
he(2), c(
|
|
843
829
|
// Beginning of the month, 90 days before today
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
),
|
|
830
|
+
lt(Me(F(), 90)),
|
|
831
|
+
F()
|
|
832
|
+
), m({ ...r, custom: Se }), he(3);
|
|
847
833
|
}, Be = async () => {
|
|
848
|
-
if (!(
|
|
849
|
-
|
|
850
|
-
for (let x = 0; x <
|
|
851
|
-
const
|
|
852
|
-
account_guid:
|
|
853
|
-
amount:
|
|
854
|
-
merchant_guid:
|
|
855
|
-
description:
|
|
856
|
-
predicted_occurs_on:
|
|
857
|
-
recurrence_day:
|
|
834
|
+
if (!(k.length < 1)) {
|
|
835
|
+
$(!0);
|
|
836
|
+
for (let x = 0; x < k.length; x++) {
|
|
837
|
+
const A = k[x], ge = Ie(v, _e(A.date)), Pe = {
|
|
838
|
+
account_guid: A.account_guid,
|
|
839
|
+
amount: A.amount,
|
|
840
|
+
merchant_guid: A.merchant_guid,
|
|
841
|
+
description: A.feed_description || A.description,
|
|
842
|
+
predicted_occurs_on: ct(ge, { representation: "date" }),
|
|
843
|
+
recurrence_day: ge.getDay(),
|
|
858
844
|
recurrence_type: v,
|
|
859
|
-
repeating_transaction_type:
|
|
860
|
-
transaction_type:
|
|
845
|
+
repeating_transaction_type: we.Income,
|
|
846
|
+
transaction_type: A.transaction_type
|
|
861
847
|
};
|
|
862
|
-
await a(Pe,
|
|
848
|
+
await a(Pe, A);
|
|
863
849
|
}
|
|
864
|
-
await
|
|
850
|
+
await h();
|
|
865
851
|
}
|
|
866
|
-
}, Ue =
|
|
867
|
-
return
|
|
852
|
+
}, Ue = !H && C || !H && k.length < 1;
|
|
853
|
+
return y ? /* @__PURE__ */ o(
|
|
868
854
|
I,
|
|
869
855
|
{
|
|
870
856
|
sx: {
|
|
871
857
|
display: "flex",
|
|
872
|
-
alignItems:
|
|
873
|
-
backgroundColor:
|
|
874
|
-
backgroundImage:
|
|
858
|
+
alignItems: l ? "flex-start" : "center",
|
|
859
|
+
backgroundColor: b.palette.background.paper,
|
|
860
|
+
backgroundImage: l ? null : `url(${Ge.CASHFLOW_ONBOARDING})`,
|
|
875
861
|
backgroundRepeat: "no-repeat",
|
|
876
862
|
backgroundPosition: "left 100px",
|
|
877
863
|
backgroundSize: "35%",
|
|
878
864
|
py: 24
|
|
879
865
|
},
|
|
880
866
|
children: [
|
|
881
|
-
|
|
867
|
+
O === 1 && /* @__PURE__ */ e(
|
|
882
868
|
I,
|
|
883
869
|
{
|
|
884
870
|
sx: {
|
|
885
|
-
...
|
|
871
|
+
...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
886
872
|
},
|
|
887
|
-
children: /* @__PURE__ */ e(
|
|
873
|
+
children: /* @__PURE__ */ e(Nt, { handleNextStep: fe })
|
|
888
874
|
}
|
|
889
875
|
),
|
|
890
|
-
|
|
876
|
+
O === 2 && /* @__PURE__ */ e(
|
|
891
877
|
I,
|
|
892
878
|
{
|
|
893
879
|
sx: {
|
|
894
|
-
...
|
|
880
|
+
...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
895
881
|
},
|
|
896
|
-
children: /* @__PURE__ */ e(
|
|
882
|
+
children: /* @__PURE__ */ e(kt, {})
|
|
897
883
|
}
|
|
898
884
|
),
|
|
899
|
-
|
|
885
|
+
O === 3 && /* @__PURE__ */ o(
|
|
900
886
|
I,
|
|
901
887
|
{
|
|
902
888
|
sx: {
|
|
903
|
-
...
|
|
889
|
+
...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
904
890
|
},
|
|
905
891
|
children: [
|
|
906
|
-
/* @__PURE__ */ e(
|
|
907
|
-
/* @__PURE__ */ e(
|
|
908
|
-
|
|
909
|
-
/* @__PURE__ */ e(
|
|
910
|
-
/* @__PURE__ */ e(
|
|
911
|
-
|
|
892
|
+
/* @__PURE__ */ e(ce, { pb: 12, children: t.add_income_title }),
|
|
893
|
+
/* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
|
|
894
|
+
k.length > 0 && !H && /* @__PURE__ */ o(U, { children: [
|
|
895
|
+
/* @__PURE__ */ e(Z, { children: k.map((x, A) => /* @__PURE__ */ o(f.Fragment, { children: [
|
|
896
|
+
/* @__PURE__ */ e(dt, { bgcolor: "background.paper", children: ht(
|
|
897
|
+
B(x.nextDate || x.date)
|
|
912
898
|
) }),
|
|
913
|
-
/* @__PURE__ */ e(
|
|
914
|
-
|
|
899
|
+
/* @__PURE__ */ e(mt, { transaction: x }),
|
|
900
|
+
A !== k.length - 1 && /* @__PURE__ */ e(D, {})
|
|
915
901
|
] }, x.guid)) }),
|
|
916
902
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
|
|
917
903
|
/* @__PURE__ */ e(D, { sx: { flexGrow: 1 } }),
|
|
918
904
|
/* @__PURE__ */ e(
|
|
919
|
-
|
|
905
|
+
M,
|
|
920
906
|
{
|
|
921
907
|
onClick: () => S(!0),
|
|
922
|
-
startIcon: /* @__PURE__ */ e(
|
|
908
|
+
startIcon: /* @__PURE__ */ e(G, { name: "add", size: 20 }),
|
|
923
909
|
children: t.add_income
|
|
924
910
|
}
|
|
925
911
|
)
|
|
926
912
|
] })
|
|
927
913
|
] }),
|
|
928
914
|
Ue && /* @__PURE__ */ e(
|
|
929
|
-
|
|
915
|
+
it,
|
|
930
916
|
{
|
|
931
917
|
bgcolor: "background.paper",
|
|
932
|
-
onSearch: (x) =>
|
|
933
|
-
...
|
|
934
|
-
custom: (
|
|
918
|
+
onSearch: (x) => m({
|
|
919
|
+
...r,
|
|
920
|
+
custom: (A) => x ? rt(A, x) : Se(A)
|
|
935
921
|
}),
|
|
936
922
|
onSelected: (x) => {
|
|
937
|
-
|
|
923
|
+
se(x), S(!1);
|
|
938
924
|
}
|
|
939
925
|
}
|
|
940
926
|
),
|
|
941
|
-
!ze &&
|
|
942
|
-
|
|
927
|
+
!ze && g && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
|
|
928
|
+
H && /* @__PURE__ */ o(U, { children: [
|
|
943
929
|
/* @__PURE__ */ e(
|
|
944
|
-
|
|
930
|
+
st,
|
|
945
931
|
{
|
|
946
932
|
bgcolor: "background.paper",
|
|
947
|
-
firstDay:
|
|
933
|
+
firstDay: E,
|
|
948
934
|
frequency: v,
|
|
949
935
|
onFirstDayChange: _,
|
|
950
936
|
onFrequencyChange: p,
|
|
951
|
-
onSecondDayChange:
|
|
952
|
-
secondDay:
|
|
953
|
-
transaction:
|
|
937
|
+
onSecondDayChange: j,
|
|
938
|
+
secondDay: W,
|
|
939
|
+
transaction: H
|
|
954
940
|
}
|
|
955
941
|
),
|
|
956
942
|
/* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
957
943
|
/* @__PURE__ */ e(
|
|
958
|
-
|
|
944
|
+
M,
|
|
959
945
|
{
|
|
960
|
-
"aria-disabled":
|
|
946
|
+
"aria-disabled": !H,
|
|
961
947
|
onClick: () => {
|
|
962
|
-
const x = [...
|
|
948
|
+
const x = [...k];
|
|
963
949
|
x.push({
|
|
964
|
-
|
|
965
|
-
nextDate:
|
|
950
|
+
...H,
|
|
951
|
+
nextDate: Ie(v, _e(H.date)),
|
|
966
952
|
frequency: v
|
|
967
|
-
}), je(x),
|
|
953
|
+
}), je(x), se("");
|
|
968
954
|
},
|
|
969
955
|
variant: "contained",
|
|
970
|
-
children:
|
|
956
|
+
children: i.confirm_button
|
|
971
957
|
}
|
|
972
958
|
),
|
|
973
959
|
/* @__PURE__ */ e(
|
|
974
|
-
|
|
960
|
+
M,
|
|
975
961
|
{
|
|
976
962
|
onClick: () => {
|
|
977
|
-
|
|
963
|
+
se(""), S(!0), fe().finally();
|
|
978
964
|
},
|
|
979
965
|
variant: "outlined",
|
|
980
|
-
children:
|
|
966
|
+
children: i.cancel_button
|
|
981
967
|
}
|
|
982
968
|
)
|
|
983
969
|
] })
|
|
984
970
|
] }),
|
|
985
|
-
|
|
971
|
+
k.length > 0 && !H && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
986
972
|
/* @__PURE__ */ e(
|
|
987
|
-
|
|
973
|
+
M,
|
|
988
974
|
{
|
|
989
|
-
"aria-disabled":
|
|
975
|
+
"aria-disabled": k.length < 1 || w,
|
|
990
976
|
onClick: Be,
|
|
991
|
-
startIcon:
|
|
992
|
-
|
|
977
|
+
startIcon: w ? /* @__PURE__ */ e(
|
|
978
|
+
G,
|
|
993
979
|
{
|
|
994
980
|
name: "progress_activity",
|
|
995
981
|
sx: {
|
|
996
|
-
animation: `${
|
|
982
|
+
animation: `${Ht} 2s linear infinite`
|
|
997
983
|
}
|
|
998
984
|
}
|
|
999
985
|
) : null,
|
|
@@ -1001,109 +987,109 @@ const yt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
1001
987
|
children: t.confirm_income_button
|
|
1002
988
|
}
|
|
1003
989
|
),
|
|
1004
|
-
/* @__PURE__ */ e(
|
|
990
|
+
/* @__PURE__ */ e(M, { onClick: h, variant: "outlined", children: t.skip_button })
|
|
1005
991
|
] })
|
|
1006
992
|
]
|
|
1007
993
|
}
|
|
1008
994
|
)
|
|
1009
995
|
]
|
|
1010
996
|
}
|
|
1011
|
-
) : /* @__PURE__ */ e(
|
|
1012
|
-
},
|
|
997
|
+
) : /* @__PURE__ */ e(ee, {});
|
|
998
|
+
}, Wt = T(Ft), $t = ({ onBackClick: a, sx: n = {} }) => {
|
|
1013
999
|
const {
|
|
1014
1000
|
selectedAccounts: t,
|
|
1015
|
-
selectedAccountGuids:
|
|
1016
|
-
setSelectedAccounts:
|
|
1017
|
-
shouldDisableNextDate:
|
|
1018
|
-
shouldDisablePrevDate:
|
|
1019
|
-
} =
|
|
1020
|
-
return
|
|
1021
|
-
_ && (S(
|
|
1022
|
-
}, [_]),
|
|
1023
|
-
c
|
|
1024
|
-
}, [
|
|
1025
|
-
const
|
|
1026
|
-
(
|
|
1001
|
+
selectedAccountGuids: i,
|
|
1002
|
+
setSelectedAccounts: h,
|
|
1003
|
+
shouldDisableNextDate: g,
|
|
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 } = P(), { cashflow: v, recurring: p } = L(), { isCopyLoaded: E, isInitialized: _ } = X(), [W, j] = f.useState(!1);
|
|
1006
|
+
return f.useEffect(() => {
|
|
1007
|
+
_ && (S(d), C().finally());
|
|
1008
|
+
}, [_]), f.useEffect(() => {
|
|
1009
|
+
h(c);
|
|
1010
|
+
}, [c]), f.useEffect(() => {
|
|
1011
|
+
const w = c.map((O) => O.guid), $ = t.filter(
|
|
1012
|
+
(O) => i.includes(O.guid) && w.includes(O.guid)
|
|
1027
1013
|
);
|
|
1028
|
-
|
|
1029
|
-
dateRange: { start: Me(
|
|
1030
|
-
accounts:
|
|
1014
|
+
b($), r({
|
|
1015
|
+
dateRange: { start: Me(F(), 90), end: pt() },
|
|
1016
|
+
accounts: $.map((O) => O.guid)
|
|
1031
1017
|
});
|
|
1032
|
-
}, [
|
|
1033
|
-
|
|
1018
|
+
}, [c, t]), !E || !_ ? /* @__PURE__ */ e(ee, {}) : m?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(
|
|
1019
|
+
De,
|
|
1034
1020
|
{
|
|
1035
|
-
accountOptions:
|
|
1021
|
+
accountOptions: c,
|
|
1036
1022
|
actions: [
|
|
1037
1023
|
{
|
|
1038
1024
|
label: p.action_title,
|
|
1039
1025
|
iconName: "credit_card_gear",
|
|
1040
1026
|
onClick: () => {
|
|
1041
|
-
|
|
1027
|
+
j(!0), y(ve.CASH_FLOW_CLICK_SETTINGS);
|
|
1042
1028
|
}
|
|
1043
1029
|
}
|
|
1044
1030
|
],
|
|
1045
1031
|
calendarActions: {
|
|
1046
|
-
shouldDisableNext:
|
|
1047
|
-
shouldDisablePrevious:
|
|
1032
|
+
shouldDisableNext: g,
|
|
1033
|
+
shouldDisablePrevious: l,
|
|
1048
1034
|
shouldDisablePicker: !0,
|
|
1049
1035
|
onRangeChanged: () => {
|
|
1050
1036
|
}
|
|
1051
1037
|
},
|
|
1052
|
-
dateRange:
|
|
1038
|
+
dateRange: d,
|
|
1053
1039
|
dateRangeVariant: "readonly",
|
|
1054
|
-
onAccountsFilterClick: () =>
|
|
1040
|
+
onAccountsFilterClick: () => y(ve.CASH_FLOW_CLICK_FILTER),
|
|
1055
1041
|
onBackClick: a,
|
|
1056
1042
|
sx: n,
|
|
1057
1043
|
title: v.title,
|
|
1058
1044
|
children: [
|
|
1059
|
-
/* @__PURE__ */ e(
|
|
1045
|
+
/* @__PURE__ */ e(Rt, {}),
|
|
1060
1046
|
/* @__PURE__ */ e(At, {}),
|
|
1061
1047
|
/* @__PURE__ */ e(
|
|
1062
1048
|
$e,
|
|
1063
1049
|
{
|
|
1064
1050
|
ariaLabelClose: v.close_settings_aria,
|
|
1065
|
-
isOpen:
|
|
1066
|
-
onClose: () =>
|
|
1051
|
+
isOpen: W,
|
|
1052
|
+
onClose: () => j(!1),
|
|
1067
1053
|
shouldShowHeaderBorders: !1,
|
|
1068
1054
|
title: p.action_title,
|
|
1069
|
-
children: /* @__PURE__ */ e(
|
|
1055
|
+
children: /* @__PURE__ */ e(Ke, {})
|
|
1070
1056
|
}
|
|
1071
1057
|
)
|
|
1072
1058
|
]
|
|
1073
1059
|
}
|
|
1074
1060
|
) : /* @__PURE__ */ e(
|
|
1075
|
-
|
|
1061
|
+
De,
|
|
1076
1062
|
{
|
|
1077
1063
|
onBackClick: a,
|
|
1078
1064
|
sx: { height: "100%", overflow: "auto" },
|
|
1079
1065
|
title: v.title,
|
|
1080
|
-
children: /* @__PURE__ */ e(
|
|
1066
|
+
children: /* @__PURE__ */ e(Wt, {})
|
|
1081
1067
|
}
|
|
1082
1068
|
);
|
|
1083
|
-
},
|
|
1084
|
-
class
|
|
1069
|
+
}, Hn = T($t);
|
|
1070
|
+
class Fn {
|
|
1085
1071
|
fetchInstance;
|
|
1086
|
-
constructor(n, t,
|
|
1087
|
-
this.fetchInstance = new
|
|
1072
|
+
constructor(n, t, i) {
|
|
1073
|
+
this.fetchInstance = new ft(n, t, void 0, i);
|
|
1088
1074
|
}
|
|
1089
|
-
addCashflowEvent = async (n) => this.fetchInstance.post(
|
|
1090
|
-
addCashflowSequence = async (n) => this.fetchInstance.post(
|
|
1091
|
-
getCashflowSequences = async () => this.fetchInstance.get(
|
|
1075
|
+
addCashflowEvent = async (n) => this.fetchInstance.post(z.CASHFLOW_EVENTS, { ...n }).then((t) => t);
|
|
1076
|
+
addCashflowSequence = async (n) => this.fetchInstance.post(z.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
|
|
1077
|
+
getCashflowSequences = async () => this.fetchInstance.get(z.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
|
|
1092
1078
|
getCashflowEventsByDateRange = async (n, t) => this.fetchInstance.get(
|
|
1093
|
-
`${
|
|
1094
|
-
).then((
|
|
1095
|
-
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${
|
|
1079
|
+
`${z.CASHFLOW_EVENTS}/from/${B(n)}/to/${B(t)}`
|
|
1080
|
+
).then((i) => i.cashflow_events);
|
|
1081
|
+
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${z.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
|
|
1096
1082
|
getProjectedCashflowEvents = async (n, t) => this.fetchInstance.get(
|
|
1097
|
-
`${
|
|
1083
|
+
`${z.CASHFLOW_SEQUENCES}/projected_events/from/${B(
|
|
1098
1084
|
n
|
|
1099
|
-
)}/to/${
|
|
1100
|
-
).then((
|
|
1101
|
-
updateCashflowSequence = async (n) => this.fetchInstance.put(`${
|
|
1085
|
+
)}/to/${B(t)}`
|
|
1086
|
+
).then((i) => i.cashflow_events);
|
|
1087
|
+
updateCashflowSequence = async (n) => this.fetchInstance.put(`${z.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
|
|
1102
1088
|
}
|
|
1103
1089
|
export {
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1090
|
+
Fn as CashflowApi,
|
|
1091
|
+
kn as CashflowMiniWidget,
|
|
1092
|
+
Wt as CashflowOnboarding,
|
|
1093
|
+
Mn as CashflowStore,
|
|
1094
|
+
Hn as CashflowWidget
|
|
1109
1095
|
};
|