@mx-cartographer/experiences 7.1.3-alpha.mm0 → 7.1.3
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 +9 -0
- package/dist/{Account-poVfvAtj.mjs → Account-8IUM_CLv.mjs} +1 -1
- package/dist/{AccountDetailsContent-BCMssB6a.mjs → AccountDetailsContent-CuZSSAEc.mjs} +8 -8
- package/dist/{AccountDetailsHeader-aR7xZ2nH.mjs → AccountDetailsHeader-BZBsIKdF.mjs} +6 -6
- package/dist/{AccountFields-_0YMlOBp.mjs → AccountFields-BD_0GT68.mjs} +2 -2
- package/dist/{AccountListItem-CnCbtSqL.mjs → AccountListItem-CllIBCao.mjs} +4 -4
- package/dist/{AccountStore-B6dq8GCk.mjs → AccountStore-BL0FE1QL.mjs} +53 -45
- package/dist/{Accounts-SjMpWUke.mjs → Accounts-Bvc9TJaO.mjs} +1 -1
- package/dist/{BudgetUtil-7AJdmjKN.mjs → BudgetUtil-psfk-Amb.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-DIy14j9q.mjs → CategorySelectorDrawer-BmenK5bu.mjs} +1 -1
- package/dist/{ConnectDrawer-BuGKZGC6.mjs → ConnectDrawer-CPTXh70j.mjs} +8 -8
- package/dist/{ConnectionsDrawer-BUFTeUlm.mjs → ConnectionsDrawer-Dkb4vBmt.mjs} +2 -2
- package/dist/{CurrencyInput-DXMb7tAQ.mjs → CurrencyInput-C4xNRL2W.mjs} +1 -1
- package/dist/{DebtsStore-DwQfw1Tf.mjs → DebtsStore-D4grpB4m.mjs} +1 -1
- package/dist/{ExportCsvAction-CaYiIpM7.mjs → ExportCsvAction-CBJAfyAw.mjs} +3 -3
- package/dist/{GoalStore-B11YqsSR.mjs → GoalStore-B5MZzPLZ.mjs} +2 -2
- package/dist/{Help-BeXRlMej.mjs → Help-CzBAsKA2.mjs} +1 -1
- package/dist/{LineChart-DoM2GvjT.mjs → LineChart-B35qvXik.mjs} +1 -1
- package/dist/{ListItemAction-BUj2koIg.mjs → ListItemAction-DSrYDGAP.mjs} +1 -1
- package/dist/{ManageIncome-Dn-1RlJI.mjs → ManageIncome-DUuT-yMV.mjs} +4 -4
- package/dist/{MicroWidgetContainer-BfjjvWDu.mjs → MicroWidgetContainer-C4QQHfD7.mjs} +1 -1
- package/dist/{MiniWidgetContainer-C98Eg9vO.mjs → MiniWidgetContainer-DTQdRK-3.mjs} +1 -1
- package/dist/{NetWorthStore-DqBVr9B4.mjs → NetWorthStore-Do1Gk8Te.mjs} +2 -2
- package/dist/{NotificationSettings-BpG12HXV.mjs → NotificationSettings-BuShgjn6.mjs} +3 -3
- package/dist/{OriginalBalanceAction-CG_yDuWi.mjs → OriginalBalanceAction-BsxcvNEF.mjs} +3 -3
- package/dist/{RecurringSettings-BtsTGf0P.mjs → RecurringSettings-BVOt46uV.mjs} +3 -3
- package/dist/{TransactionDetails-CBpH1fsq.mjs → TransactionDetails-_cXLXTd3.mjs} +5 -5
- package/dist/{TransactionStore-Cq_j5fna.mjs → TransactionStore-B-Tq_YFE.mjs} +2 -2
- package/dist/{TrendsStore-2geZbzUX.mjs → TrendsStore-ZZ8X36lJ.mjs} +1 -1
- package/dist/{User-CgKOp9Zi.mjs → User-DaJAQ09j.mjs} +1 -1
- package/dist/{WidgetContainer-CjvCN6aj.mjs → WidgetContainer-DtPnPQZY.mjs} +10 -10
- package/dist/accounts/index.es.js +13 -13
- package/dist/accounts/stores/AccountStore.d.ts +2 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +10 -10
- package/dist/cashflow/index.es.js +297 -295
- package/dist/categories/index.es.js +1 -1
- package/dist/common/context/GlobalDataProvider.d.ts +0 -1
- package/dist/common/context/hooks.d.ts +0 -3
- package/dist/common/context/index.d.ts +1 -1
- package/dist/common/index.es.js +49 -50
- package/dist/dashboard/index.es.js +7 -7
- package/dist/debts/index.es.js +9 -9
- package/dist/{exportTransactionsToCSV-BUuXqDYK.mjs → exportTransactionsToCSV-D8TTNrrE.mjs} +1 -1
- package/dist/finstrong/index.es.js +6 -6
- package/dist/goals/index.es.js +52 -52
- package/dist/help/index.es.js +3 -3
- package/dist/hooks-CE2TKk4a.mjs +74 -0
- package/dist/investments/index.es.js +3 -3
- package/dist/merchants/index.es.js +1 -1
- package/dist/networth/index.es.js +7 -7
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +8 -8
- package/dist/settings/index.es.js +6 -6
- package/dist/spending/index.es.js +4 -4
- package/dist/transactions/index.es.js +13 -13
- package/dist/trends/index.es.js +453 -453
- package/dist/{useAccountDisplayName-CZjVfLSX.mjs → useAccountDisplayName-BXGkZN5B.mjs} +2 -2
- package/dist/{useInsightsEnabled-DesBHW5l.mjs → useInsightsEnabled-DSnpkUq0.mjs} +1 -1
- package/package.json +1 -1
- package/dist/hooks-B3k6Se4_.mjs +0 -77
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { jsxs as o, Fragment as
|
|
1
|
+
import { jsxs as o, Fragment as B, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import p, { useState as J } from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as E } from "mobx-react-lite";
|
|
4
4
|
import { addMonths as qe } from "date-fns/addMonths";
|
|
5
5
|
import { startOfToday as $ } from "date-fns/startOfToday";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import I from "@mui/material/Box";
|
|
7
|
+
import D from "@mui/material/Divider";
|
|
8
8
|
import s from "@mui/material/Stack";
|
|
9
|
-
import
|
|
10
|
-
import { Text as
|
|
11
|
-
import { G as Ye, t as
|
|
12
|
-
import { C as
|
|
13
|
-
import { u as
|
|
9
|
+
import ce from "@mui/material/styles/useTheme";
|
|
10
|
+
import { Text as u, P as k, Icon as M, InstitutionLogo as xe, H1 as me, H2 as Xe } from "@mxenabled/mxui";
|
|
11
|
+
import { G as Ye, t as ue, u as O, p as le, d as Oe, b as Y, j as U, g as Ne, o as ke, h as He, a as Qe } from "../hooks-CE2TKk4a.mjs";
|
|
12
|
+
import { C as L } from "../CurrencyText-kyC1aseI.mjs";
|
|
13
|
+
import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
14
14
|
import { L as te } from "../Loader-DUaFpDGv.mjs";
|
|
15
|
-
import { I as
|
|
15
|
+
import { I as pe } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
16
16
|
import { C as Gn } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
17
|
-
import { b as
|
|
18
|
-
import { M as Ve } from "../MiniWidgetContainer-
|
|
17
|
+
import { b as G } from "../Localization-2MODESHW.mjs";
|
|
18
|
+
import { M as Ve } from "../MiniWidgetContainer-DTQdRK-3.mjs";
|
|
19
19
|
import { E as Ke } from "../EmptyState-DA_lfRBv.mjs";
|
|
20
|
-
import { R as Je } from "../RecurringSettings-
|
|
20
|
+
import { R as Je } from "../RecurringSettings-BVOt46uV.mjs";
|
|
21
21
|
import Ze from "@mui/material/Tabs";
|
|
22
|
-
import
|
|
23
|
-
import { getUnixTime as
|
|
22
|
+
import Ce from "@mui/material/Tab";
|
|
23
|
+
import { getUnixTime as z } from "date-fns/getUnixTime";
|
|
24
24
|
import ee from "@mui/material/List";
|
|
25
25
|
import ne from "@mui/material/ListItem";
|
|
26
|
-
import { A as et } from "../AccountListItem-
|
|
26
|
+
import { A as et } from "../AccountListItem-CllIBCao.mjs";
|
|
27
27
|
import { f as Q, D as V } from "../Dialog-CWW597AF.mjs";
|
|
28
28
|
import tt from "@mui/material/ListSubheader";
|
|
29
29
|
import { f as Z } from "../NumberFormatting-Buh7u8Oi.mjs";
|
|
30
30
|
import { isAfter as Fe } from "date-fns/isAfter";
|
|
31
31
|
import { isBefore as We } from "date-fns/isBefore";
|
|
32
32
|
import { isToday as $e } from "date-fns/isToday";
|
|
33
|
-
import { addDays as
|
|
33
|
+
import { addDays as ye } from "date-fns/addDays";
|
|
34
34
|
import { alpha as nt, keyframes as ot } from "@mui/material/styles";
|
|
35
35
|
import { DataGridPro as at } from "@mui/x-data-grid-pro";
|
|
36
|
-
import { T as
|
|
36
|
+
import { T as we } from "../TabContentContainer-j01JYR_7.mjs";
|
|
37
37
|
import W from "@mui/material/Button";
|
|
38
|
-
import { M as it, S as rt, i as st, d as
|
|
38
|
+
import { M as it, S as rt, i as st, d as Se, c as ct } from "../ManageIncome-DUuT-yMV.mjs";
|
|
39
39
|
import { D as Me } from "../Drawer-kEE73B87.mjs";
|
|
40
40
|
import { formatISO as lt } from "date-fns/formatISO";
|
|
41
41
|
import { fromUnixTime as _e } from "date-fns/fromUnixTime";
|
|
42
42
|
import { startOfMonth as dt } from "date-fns/startOfMonth";
|
|
43
43
|
import { subDays as Ge } from "date-fns/subDays";
|
|
44
|
-
import { S as mt, b as ut } from "../TransactionDetails-
|
|
44
|
+
import { S as mt, b as ut } from "../TransactionDetails-_cXLXTd3.mjs";
|
|
45
45
|
import { F as ht, R as Ie, e as De } from "../RecurringTransactions-ej39mgA6.mjs";
|
|
46
46
|
import { h as pt } from "../DateUtil-BcuH7ErC.mjs";
|
|
47
47
|
import { endOfToday as ft } from "date-fns/endOfToday";
|
|
48
|
-
import { W as ve, A as Ae } from "../WidgetContainer-
|
|
49
|
-
import { F as gt, A as
|
|
48
|
+
import { W as ve, A as Ae } from "../WidgetContainer-DtPnPQZY.mjs";
|
|
49
|
+
import { F as gt, A as j } from "../Fetch-87LIQbEA.mjs";
|
|
50
50
|
const K = () => {
|
|
51
51
|
if (!p.useContext(Ye))
|
|
52
52
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
53
|
-
return
|
|
53
|
+
return ue().uiStore;
|
|
54
54
|
}, bt = ({ remaining: a }) => {
|
|
55
|
-
const { cashflow: n } =
|
|
56
|
-
return /* @__PURE__ */ o(
|
|
55
|
+
const { cashflow: n } = O();
|
|
56
|
+
return /* @__PURE__ */ o(B, { children: [
|
|
57
57
|
/* @__PURE__ */ e(
|
|
58
|
-
|
|
58
|
+
I,
|
|
59
59
|
{
|
|
60
60
|
sx: {
|
|
61
61
|
borderRadius: "1px",
|
|
@@ -65,38 +65,38 @@ const K = () => {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
),
|
|
68
|
-
/* @__PURE__ */ e(
|
|
69
|
-
/* @__PURE__ */ e(
|
|
68
|
+
/* @__PURE__ */ e(u, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
|
|
69
|
+
/* @__PURE__ */ e(L, { amount: a, bold: !0, sx: { fontSize: 12 } })
|
|
70
70
|
] });
|
|
71
|
-
},
|
|
72
|
-
const a =
|
|
71
|
+
}, fe = E(bt), xt = () => {
|
|
72
|
+
const a = ce(), { availableWidth: n } = le(), { isMobile: t } = he(), { visibleCashAccounts: i, visibleCashBalance: f } = Oe(), { selectedAccounts: C, selectedAccountGuids: c, setSelectedAccounts: x } = Y(), { cashflow: l } = O(), {
|
|
73
73
|
daysUntilNextIncome: r,
|
|
74
74
|
expensesTilNextIncome: m,
|
|
75
75
|
selectedCashAccounts: d,
|
|
76
76
|
setNextIncome: g,
|
|
77
|
-
setSelectedCashAccounts:
|
|
78
|
-
setUpcomingExpenses:
|
|
79
|
-
} = K(), { isDataLoaded:
|
|
77
|
+
setSelectedCashAccounts: w,
|
|
78
|
+
setUpcomingExpenses: S
|
|
79
|
+
} = K(), { isDataLoaded: T, nextIncomeRecurrence: H, upcomingExpenses: F } = U();
|
|
80
80
|
p.useEffect(() => {
|
|
81
|
-
|
|
81
|
+
x(i);
|
|
82
82
|
}, [i]), p.useEffect(() => {
|
|
83
|
-
|
|
84
|
-
i.filter((
|
|
83
|
+
w(
|
|
84
|
+
i.filter((b) => c.includes(b.guid))
|
|
85
85
|
);
|
|
86
|
-
}, [i,
|
|
87
|
-
|
|
88
|
-
}, [
|
|
89
|
-
const
|
|
90
|
-
() => i.filter((
|
|
91
|
-
[c,
|
|
92
|
-
),
|
|
93
|
-
() => m.filter((
|
|
86
|
+
}, [i, C]), p.useEffect(() => {
|
|
87
|
+
H && g(H), S(F);
|
|
88
|
+
}, [H, F]);
|
|
89
|
+
const N = p.useMemo(
|
|
90
|
+
() => i.filter((b) => c.includes(b.guid)).reduce((b, P) => b + (P?.balance || 0), 0),
|
|
91
|
+
[c, F]
|
|
92
|
+
), h = p.useMemo(
|
|
93
|
+
() => m.filter((b) => c.includes(b.accountGuid || "")).reduce((b, P) => b + P.amount, 0),
|
|
94
94
|
[c, m]
|
|
95
|
-
),
|
|
96
|
-
() =>
|
|
97
|
-
[
|
|
95
|
+
), R = p.useMemo(
|
|
96
|
+
() => N - h,
|
|
97
|
+
[N, h]
|
|
98
98
|
);
|
|
99
|
-
return
|
|
99
|
+
return T ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
|
|
100
100
|
s,
|
|
101
101
|
{
|
|
102
102
|
border: `1px solid ${a.palette.border.light}`,
|
|
@@ -106,45 +106,45 @@ const K = () => {
|
|
|
106
106
|
px: 24,
|
|
107
107
|
children: [
|
|
108
108
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
109
|
-
/* @__PURE__ */ e(
|
|
110
|
-
/* @__PURE__ */ e(
|
|
109
|
+
/* @__PURE__ */ e(L, { amount: N, variant: "H2" }),
|
|
110
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: G(
|
|
111
111
|
l.total_cash_accounts,
|
|
112
112
|
d.length
|
|
113
113
|
) })
|
|
114
114
|
] }),
|
|
115
115
|
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(M, { name: "remove" }) }),
|
|
116
116
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
117
|
-
/* @__PURE__ */ e(
|
|
118
|
-
/* @__PURE__ */ e(
|
|
117
|
+
/* @__PURE__ */ e(L, { amount: h, variant: "H2" }),
|
|
118
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: G(l.expenses_due, m.length) })
|
|
119
119
|
] }),
|
|
120
120
|
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(M, { name: "equal" }) }),
|
|
121
121
|
/* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
|
|
122
|
-
/* @__PURE__ */ e(
|
|
122
|
+
/* @__PURE__ */ e(L, { amount: R, variant: "H2" }),
|
|
123
123
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
124
|
-
/* @__PURE__ */ e(
|
|
125
|
-
/* @__PURE__ */ e(
|
|
124
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: l.available_to_spend }),
|
|
125
|
+
/* @__PURE__ */ e(pe, { body: l.tooltip_body, title: l.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(
|
|
130
|
-
/* @__PURE__ */ e(
|
|
128
|
+
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(B, { children: [
|
|
129
|
+
/* @__PURE__ */ e(u, { variant: "H2", children: G(l.days, r) }),
|
|
130
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: l.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(
|
|
136
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: G(
|
|
137
137
|
l.total_cash_accounts,
|
|
138
138
|
d.length
|
|
139
139
|
) }),
|
|
140
|
-
/* @__PURE__ */ e(
|
|
140
|
+
/* @__PURE__ */ e(L, { amount: f, bold: !0, variant: "XSmall" })
|
|
141
141
|
] }),
|
|
142
|
-
/* @__PURE__ */ e(
|
|
142
|
+
/* @__PURE__ */ e(D, {}),
|
|
143
143
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
144
|
-
/* @__PURE__ */ e(
|
|
145
|
-
/* @__PURE__ */ e(
|
|
144
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: G(l.expenses_due, m.length) }),
|
|
145
|
+
/* @__PURE__ */ e(L, { amount: h, bold: !0, symbol: "-", variant: "XSmall" })
|
|
146
146
|
] }),
|
|
147
|
-
/* @__PURE__ */ e(
|
|
147
|
+
/* @__PURE__ */ e(D, {}),
|
|
148
148
|
/* @__PURE__ */ e(
|
|
149
149
|
s,
|
|
150
150
|
{
|
|
@@ -156,25 +156,25 @@ const K = () => {
|
|
|
156
156
|
justifyContent: "space-between",
|
|
157
157
|
px: 16,
|
|
158
158
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
159
|
-
children: /* @__PURE__ */ e(
|
|
159
|
+
children: /* @__PURE__ */ e(fe, { remaining: R })
|
|
160
160
|
}
|
|
161
161
|
),
|
|
162
|
-
/* @__PURE__ */ e(
|
|
162
|
+
/* @__PURE__ */ e(D, {}),
|
|
163
163
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
164
|
-
/* @__PURE__ */ e(
|
|
165
|
-
/* @__PURE__ */ e(
|
|
164
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: l.next_paycheck }),
|
|
165
|
+
/* @__PURE__ */ e(u, { bold: !0, variant: "XSmall", children: G(l.days, r) })
|
|
166
166
|
] })
|
|
167
167
|
] }) }) : /* @__PURE__ */ e(te, { height: t ? 210 : 120 });
|
|
168
|
-
},
|
|
168
|
+
}, Ct = E(xt), yt = ({
|
|
169
169
|
onPrimaryCtaClick: a,
|
|
170
170
|
onSecondaryCtaClick: n,
|
|
171
171
|
sx: t = {}
|
|
172
172
|
}) => {
|
|
173
|
-
const { cashflow: i } =
|
|
173
|
+
const { cashflow: i } = O(), { isCopyLoaded: f, isInitialized: C } = Y(), { loadRepeatingTransactions: c, income: x, isDataLoaded: l, setDateRange: r } = U();
|
|
174
174
|
p.useEffect(() => {
|
|
175
|
-
|
|
176
|
-
}, [
|
|
177
|
-
const m = l && !
|
|
175
|
+
C && (r({ start: $(), end: qe($(), 1) }), c().finally());
|
|
176
|
+
}, [C]);
|
|
177
|
+
const m = l && !x.length;
|
|
178
178
|
return f ? /* @__PURE__ */ o(
|
|
179
179
|
Ve,
|
|
180
180
|
{
|
|
@@ -196,11 +196,11 @@ const K = () => {
|
|
|
196
196
|
primaryButtonStartIcon: "add",
|
|
197
197
|
subText: i.create_description
|
|
198
198
|
}
|
|
199
|
-
) : /* @__PURE__ */ e(
|
|
199
|
+
) : /* @__PURE__ */ e(Ct, {}))
|
|
200
200
|
]
|
|
201
201
|
}
|
|
202
202
|
) : /* @__PURE__ */ e(te, {});
|
|
203
|
-
}, Hn =
|
|
203
|
+
}, Hn = E(yt), wt = ({ remaining: a }) => /* @__PURE__ */ e(
|
|
204
204
|
ne,
|
|
205
205
|
{
|
|
206
206
|
sx: {
|
|
@@ -213,19 +213,19 @@ const K = () => {
|
|
|
213
213
|
borderBottomRightRadius: "3px",
|
|
214
214
|
minHeight: "auto"
|
|
215
215
|
},
|
|
216
|
-
children: /* @__PURE__ */ e(
|
|
216
|
+
children: /* @__PURE__ */ e(fe, { remaining: a })
|
|
217
217
|
}
|
|
218
218
|
);
|
|
219
219
|
var oe = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a))(oe || {});
|
|
220
|
-
const
|
|
220
|
+
const St = ({ recurrence: a }) => /* @__PURE__ */ o(B, { children: [
|
|
221
221
|
/* @__PURE__ */ o(ne, { 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
|
-
/* @__PURE__ */ e(
|
|
224
|
-
/* @__PURE__ */ e(
|
|
223
|
+
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Q(a.expectedDate, V.MONTH) }),
|
|
224
|
+
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Q(a.expectedDate, V.DAY) })
|
|
225
225
|
] }),
|
|
226
|
-
/* @__PURE__ */ e(
|
|
226
|
+
/* @__PURE__ */ e(u, { sx: { flexGrow: 1, fontSize: 13 }, children: a.name }),
|
|
227
227
|
/* @__PURE__ */ e(
|
|
228
|
-
|
|
228
|
+
L,
|
|
229
229
|
{
|
|
230
230
|
amount: a.amount,
|
|
231
231
|
bold: !0,
|
|
@@ -233,10 +233,10 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
233
233
|
}
|
|
234
234
|
)
|
|
235
235
|
] }),
|
|
236
|
-
/* @__PURE__ */ e(
|
|
237
|
-
] }), Ee =
|
|
238
|
-
const { cashflow: t } =
|
|
239
|
-
return /* @__PURE__ */ o(
|
|
236
|
+
/* @__PURE__ */ e(D, {})
|
|
237
|
+
] }), Ee = E(St), _t = ({ total: a, type: n }) => {
|
|
238
|
+
const { cashflow: t } = O();
|
|
239
|
+
return /* @__PURE__ */ o(B, { children: [
|
|
240
240
|
/* @__PURE__ */ o(
|
|
241
241
|
tt,
|
|
242
242
|
{
|
|
@@ -250,32 +250,32 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
250
250
|
px: 24
|
|
251
251
|
},
|
|
252
252
|
children: [
|
|
253
|
-
/* @__PURE__ */ e(
|
|
254
|
-
/* @__PURE__ */ o(
|
|
253
|
+
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 12 }, children: n === oe.EXPENSE ? t.expenses : t.income }),
|
|
254
|
+
/* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 13 }, children: [
|
|
255
255
|
n === oe.EXPENSE ? "-" : "+",
|
|
256
256
|
Z(a, "0,0.00")
|
|
257
257
|
] })
|
|
258
258
|
]
|
|
259
259
|
}
|
|
260
260
|
),
|
|
261
|
-
/* @__PURE__ */ e(
|
|
261
|
+
/* @__PURE__ */ e(D, {})
|
|
262
262
|
] });
|
|
263
|
-
}, Te =
|
|
264
|
-
const { availableWidth: a } =
|
|
263
|
+
}, Te = E(_t), se = (a, n) => (t) => t.accountGuid === a.guid && ($e(t.expectedDate) || Fe(t.expectedDate, n.start)) && We(t.expectedDate, n.end), It = () => {
|
|
264
|
+
const { availableWidth: a } = le(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: i } = U(), { dateRange: f, selectedCashAccounts: C } = K();
|
|
265
265
|
return /* @__PURE__ */ o(s, { children: [
|
|
266
266
|
/* @__PURE__ */ o(s, { direction: a < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
267
|
-
/* @__PURE__ */ e(
|
|
268
|
-
/* @__PURE__ */ o(
|
|
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
269
|
Q(f.start, V.FULL_MONTH_DAY),
|
|
270
270
|
" -",
|
|
271
271
|
" ",
|
|
272
272
|
Q(f.end, V.FULL_MONTH_DAY)
|
|
273
273
|
] })
|
|
274
274
|
] }),
|
|
275
|
-
/* @__PURE__ */ e(s, { children:
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
), r =
|
|
275
|
+
/* @__PURE__ */ e(s, { children: C.map((c) => {
|
|
276
|
+
const x = i.filter(se(c, f)).sort((d, g) => z(d.expectedDate) - z(g.expectedDate)), l = t.filter(
|
|
277
|
+
se(c, f)
|
|
278
|
+
), r = x.reduce(
|
|
279
279
|
(d, g) => d + g.amount,
|
|
280
280
|
0
|
|
281
281
|
), m = l.reduce(
|
|
@@ -303,13 +303,13 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
),
|
|
306
|
-
/* @__PURE__ */ e(
|
|
307
|
-
|
|
306
|
+
/* @__PURE__ */ e(D, {}),
|
|
307
|
+
x.length > 0 && /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(
|
|
308
308
|
ee,
|
|
309
309
|
{
|
|
310
310
|
subheader: /* @__PURE__ */ e(Te, { total: r, type: oe.INCOME }),
|
|
311
311
|
sx: { width: "100%" },
|
|
312
|
-
children:
|
|
312
|
+
children: x.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
|
|
313
313
|
}
|
|
314
314
|
) }),
|
|
315
315
|
l.length > 0 && /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(
|
|
@@ -321,7 +321,7 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
321
321
|
}
|
|
322
322
|
) }),
|
|
323
323
|
/* @__PURE__ */ e(
|
|
324
|
-
|
|
324
|
+
wt,
|
|
325
325
|
{
|
|
326
326
|
remaining: (c.available_balance || c.balance || 0) + r - m
|
|
327
327
|
}
|
|
@@ -332,14 +332,14 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
332
332
|
);
|
|
333
333
|
}) })
|
|
334
334
|
] });
|
|
335
|
-
}, Dt =
|
|
336
|
-
const { availableWidth: a } =
|
|
335
|
+
}, Dt = E(It), vt = () => {
|
|
336
|
+
const { availableWidth: a } = le(), n = ce(), { cashflow: t } = O(), { upcomingExpenses: i, upcomingIncome: f } = U(), { dateRange: C, selectedCashAccounts: c } = K(), x = [
|
|
337
337
|
{
|
|
338
338
|
field: "account",
|
|
339
339
|
flex: 1.5,
|
|
340
340
|
headerName: t.accounts,
|
|
341
341
|
renderCell: ({ value: { name: r, nickname: m, institution_guid: d, account_number: g } }) => {
|
|
342
|
-
const
|
|
342
|
+
const w = m || r;
|
|
343
343
|
return /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 12, children: [
|
|
344
344
|
/* @__PURE__ */ e(
|
|
345
345
|
xe,
|
|
@@ -349,7 +349,7 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
349
349
|
size: 16
|
|
350
350
|
}
|
|
351
351
|
),
|
|
352
|
-
/* @__PURE__ */ e(
|
|
352
|
+
/* @__PURE__ */ e(u, { variant: "body2", children: `${w} ${g ? `*${g}` : ""}` })
|
|
353
353
|
] });
|
|
354
354
|
}
|
|
355
355
|
},
|
|
@@ -358,21 +358,21 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
358
358
|
flex: 1,
|
|
359
359
|
headerName: t.balance,
|
|
360
360
|
type: "number",
|
|
361
|
-
renderCell: (r) => /* @__PURE__ */ e(
|
|
361
|
+
renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: Z(r.value, "0,0.00") })
|
|
362
362
|
},
|
|
363
363
|
{
|
|
364
364
|
field: "income",
|
|
365
365
|
flex: 1,
|
|
366
366
|
headerName: t.projected_income,
|
|
367
367
|
type: "number",
|
|
368
|
-
renderCell: (r) => /* @__PURE__ */ e(
|
|
368
|
+
renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `+${Z(r.value, "0,0.00")}` })
|
|
369
369
|
},
|
|
370
370
|
{
|
|
371
371
|
field: "expenses",
|
|
372
372
|
flex: 1.1,
|
|
373
373
|
headerName: t.projected_expenses,
|
|
374
374
|
type: "number",
|
|
375
|
-
renderCell: (r) => /* @__PURE__ */ e(
|
|
375
|
+
renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `-${Z(r.value, "0,0.00")}` })
|
|
376
376
|
},
|
|
377
377
|
{
|
|
378
378
|
field: "remaining",
|
|
@@ -382,7 +382,7 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
382
382
|
renderCell: (r) => {
|
|
383
383
|
const m = r.row.balance + r.row.income - r.row.expenses;
|
|
384
384
|
return /* @__PURE__ */ e(
|
|
385
|
-
|
|
385
|
+
u,
|
|
386
386
|
{
|
|
387
387
|
color: Math.sign(m) === -1 ? n.palette.error.main : n.palette.text.primary,
|
|
388
388
|
variant: "Small",
|
|
@@ -393,10 +393,10 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
393
393
|
}
|
|
394
394
|
], l = p.useMemo(() => c.map((r) => {
|
|
395
395
|
const m = i.filter(
|
|
396
|
-
|
|
397
|
-
).reduce((
|
|
398
|
-
|
|
399
|
-
).reduce((
|
|
396
|
+
se(r, { start: $(), end: ye($(), 30) })
|
|
397
|
+
).reduce((w, S) => w + S.amount, 0), d = f.filter(
|
|
398
|
+
se(r, { start: $(), end: ye($(), 30) })
|
|
399
|
+
).reduce((w, S) => w + S.amount, 0), g = (r.balance || 0) + d - m;
|
|
400
400
|
return {
|
|
401
401
|
account: r,
|
|
402
402
|
balance: r.balance || 0,
|
|
@@ -407,7 +407,7 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
407
407
|
};
|
|
408
408
|
}), [c, i, f]);
|
|
409
409
|
return /* @__PURE__ */ o(
|
|
410
|
-
|
|
410
|
+
I,
|
|
411
411
|
{
|
|
412
412
|
sx: {
|
|
413
413
|
width: "100%"
|
|
@@ -422,7 +422,7 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
422
422
|
children: [
|
|
423
423
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
424
424
|
/* @__PURE__ */ e(
|
|
425
|
-
|
|
425
|
+
u,
|
|
426
426
|
{
|
|
427
427
|
bold: !0,
|
|
428
428
|
sx: {
|
|
@@ -433,18 +433,18 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
433
433
|
}
|
|
434
434
|
),
|
|
435
435
|
/* @__PURE__ */ e(
|
|
436
|
-
|
|
436
|
+
pe,
|
|
437
437
|
{
|
|
438
438
|
body: t.table_tooltip_body,
|
|
439
439
|
title: t.table_tooltip_title
|
|
440
440
|
}
|
|
441
441
|
)
|
|
442
442
|
] }),
|
|
443
|
-
/* @__PURE__ */ o(
|
|
444
|
-
Q(
|
|
443
|
+
/* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
|
|
444
|
+
Q(C.start, V.FULL_MONTH_DAY),
|
|
445
445
|
" -",
|
|
446
446
|
" ",
|
|
447
|
-
Q(
|
|
447
|
+
Q(C.end, V.FULL_MONTH_DAY)
|
|
448
448
|
] })
|
|
449
449
|
]
|
|
450
450
|
}
|
|
@@ -453,7 +453,7 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
453
453
|
at,
|
|
454
454
|
{
|
|
455
455
|
columnHeaderHeight: 48,
|
|
456
|
-
columns:
|
|
456
|
+
columns: x,
|
|
457
457
|
density: "standard",
|
|
458
458
|
disableColumnMenu: !0,
|
|
459
459
|
disableRowSelectionOnClick: !0,
|
|
@@ -480,7 +480,7 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
) : l.map((r) => {
|
|
483
|
-
const { name: m, nickname: d, institution_guid: g, account_number:
|
|
483
|
+
const { name: m, nickname: d, institution_guid: g, account_number: w } = r.account, S = d || m;
|
|
484
484
|
return /* @__PURE__ */ e(
|
|
485
485
|
ee,
|
|
486
486
|
{
|
|
@@ -509,13 +509,13 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
509
509
|
size: 16
|
|
510
510
|
}
|
|
511
511
|
),
|
|
512
|
-
/* @__PURE__ */ e(
|
|
512
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: `${S} ${w ? `*${w}` : ""}` })
|
|
513
513
|
] }),
|
|
514
|
-
/* @__PURE__ */ e(
|
|
514
|
+
/* @__PURE__ */ e(L, { amount: r.balance, bold: !0, variant: "Small" })
|
|
515
515
|
]
|
|
516
516
|
}
|
|
517
517
|
),
|
|
518
|
-
/* @__PURE__ */ e(
|
|
518
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
519
519
|
/* @__PURE__ */ o(
|
|
520
520
|
s,
|
|
521
521
|
{
|
|
@@ -525,12 +525,12 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
525
525
|
px: 16,
|
|
526
526
|
py: 12,
|
|
527
527
|
children: [
|
|
528
|
-
/* @__PURE__ */ e(
|
|
529
|
-
/* @__PURE__ */ e(
|
|
528
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: t.projected_income }),
|
|
529
|
+
/* @__PURE__ */ e(L, { amount: r.income, bold: !0, symbol: "+", variant: "Small" })
|
|
530
530
|
]
|
|
531
531
|
}
|
|
532
532
|
),
|
|
533
|
-
/* @__PURE__ */ e(
|
|
533
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
534
534
|
/* @__PURE__ */ o(
|
|
535
535
|
s,
|
|
536
536
|
{
|
|
@@ -540,12 +540,12 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
540
540
|
px: 16,
|
|
541
541
|
py: 12,
|
|
542
542
|
children: [
|
|
543
|
-
/* @__PURE__ */ e(
|
|
544
|
-
/* @__PURE__ */ e(
|
|
543
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: t.projected_expenses }),
|
|
544
|
+
/* @__PURE__ */ e(L, { amount: r.expenses, bold: !0, symbol: "-", variant: "Small" })
|
|
545
545
|
]
|
|
546
546
|
}
|
|
547
547
|
),
|
|
548
|
-
/* @__PURE__ */ e(
|
|
548
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
549
549
|
/* @__PURE__ */ e(
|
|
550
550
|
s,
|
|
551
551
|
{
|
|
@@ -557,7 +557,7 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
557
557
|
px: 16,
|
|
558
558
|
py: 12,
|
|
559
559
|
sx: { borderBottomLeftRadius: "4px", borderBottomRightRadius: "4px" },
|
|
560
|
-
children: /* @__PURE__ */ e(
|
|
560
|
+
children: /* @__PURE__ */ e(fe, { remaining: r.remaining })
|
|
561
561
|
}
|
|
562
562
|
)
|
|
563
563
|
] }) })
|
|
@@ -568,25 +568,25 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
568
568
|
]
|
|
569
569
|
}
|
|
570
570
|
);
|
|
571
|
-
}, At =
|
|
572
|
-
const { cashflow: a } =
|
|
573
|
-
f(
|
|
571
|
+
}, At = E(vt), Et = () => {
|
|
572
|
+
const { cashflow: a } = O(), { isDesktop: n } = he(), { onEvent: t } = Ne(), [i, f] = p.useState(0), C = (c, x) => {
|
|
573
|
+
f(x);
|
|
574
574
|
};
|
|
575
575
|
return p.useEffect(() => {
|
|
576
576
|
t(i === 0 ? "cash_flow_summary" : "cash_flow_details");
|
|
577
|
-
}, [i]), /* @__PURE__ */ o(
|
|
577
|
+
}, [i]), /* @__PURE__ */ o(I, { children: [
|
|
578
578
|
/* @__PURE__ */ o(
|
|
579
579
|
Ze,
|
|
580
580
|
{
|
|
581
581
|
"aria-label": a.cashflow_summary_and_details,
|
|
582
582
|
centered: !0,
|
|
583
|
-
onChange:
|
|
583
|
+
onChange: C,
|
|
584
584
|
textColor: "primary",
|
|
585
585
|
value: i,
|
|
586
586
|
variant: "fullWidth",
|
|
587
587
|
children: [
|
|
588
588
|
/* @__PURE__ */ e(
|
|
589
|
-
|
|
589
|
+
Ce,
|
|
590
590
|
{
|
|
591
591
|
"aria-controls": "cashflow-tabpanel-0",
|
|
592
592
|
id: "cashflow-tab-0",
|
|
@@ -597,7 +597,7 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
597
597
|
}
|
|
598
598
|
),
|
|
599
599
|
/* @__PURE__ */ e(
|
|
600
|
-
|
|
600
|
+
Ce,
|
|
601
601
|
{
|
|
602
602
|
"aria-controls": "cashflow-tabpanel-1",
|
|
603
603
|
id: "cashflow-tab-1",
|
|
@@ -610,17 +610,17 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
610
610
|
]
|
|
611
611
|
}
|
|
612
612
|
),
|
|
613
|
-
/* @__PURE__ */ e(
|
|
614
|
-
/* @__PURE__ */ e(
|
|
615
|
-
/* @__PURE__ */ e(
|
|
613
|
+
/* @__PURE__ */ e(I, { sx: { mb: 32 } }),
|
|
614
|
+
/* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(At, {}) }) }),
|
|
615
|
+
/* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Dt, {}) }) })
|
|
616
616
|
] });
|
|
617
|
-
}, Tt =
|
|
617
|
+
}, Tt = E(Et), re = ({
|
|
618
618
|
amount: a,
|
|
619
619
|
isMobile: n = !1,
|
|
620
620
|
isTotal: t = !1,
|
|
621
621
|
label: i,
|
|
622
622
|
symbol: f,
|
|
623
|
-
tooltip:
|
|
623
|
+
tooltip: C
|
|
624
624
|
}) => /* @__PURE__ */ o(
|
|
625
625
|
s,
|
|
626
626
|
{
|
|
@@ -630,48 +630,48 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
630
630
|
padding: n ? "14px 16px" : 0,
|
|
631
631
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
632
632
|
children: [
|
|
633
|
-
!n && /* @__PURE__ */ e(
|
|
633
|
+
!n && /* @__PURE__ */ e(L, { amount: a, component: "h2", variant: "H2" }),
|
|
634
634
|
/* @__PURE__ */ o(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
|
|
635
|
-
/* @__PURE__ */ e(
|
|
636
|
-
|
|
635
|
+
/* @__PURE__ */ e(u, { bold: t, variant: "Small", children: i }),
|
|
636
|
+
C
|
|
637
637
|
] }),
|
|
638
|
-
n && /* @__PURE__ */ e(
|
|
638
|
+
n && /* @__PURE__ */ e(L, { amount: a, component: "h2", symbol: f, variant: "Small" })
|
|
639
639
|
]
|
|
640
640
|
}
|
|
641
641
|
), Re = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && ($e(t.expectedDate) || Fe(t.expectedDate, n.start)) && We(t.expectedDate, n.end), Rt = () => {
|
|
642
|
-
const { availableWidth: a } =
|
|
643
|
-
() => f.filter(Re(c,
|
|
644
|
-
[
|
|
645
|
-
), S = p.useMemo(
|
|
646
|
-
() => y.filter(Re(c, b)),
|
|
647
|
-
[b, c, y]
|
|
642
|
+
const { availableWidth: a } = le(), { cashflow: n } = O(), { income: t, isDataLoaded: i, upcomingExpenses: f, upcomingIncome: C } = U(), { selectedAccountGuids: c } = Y(), { dateRange: x, selectedCashAccounts: l } = K(), { userProfile: r } = ke(), [m, d] = p.useState(!1), g = p.useMemo(
|
|
643
|
+
() => f.filter(Re(c, x)),
|
|
644
|
+
[x, c, f]
|
|
648
645
|
), w = p.useMemo(
|
|
649
|
-
() =>
|
|
646
|
+
() => C.filter(Re(c, x)),
|
|
647
|
+
[x, c, C]
|
|
648
|
+
), S = p.useMemo(
|
|
649
|
+
() => l.reduce((R, b) => R + (b?.balance || 0), 0),
|
|
650
650
|
[l]
|
|
651
|
-
),
|
|
652
|
-
return /* @__PURE__ */ o(s, { sx: { mx:
|
|
651
|
+
), T = g.reduce((R, b) => R + b.amount, 0), H = w.reduce((R, b) => R + b.amount, 0), F = S - T + H, N = i && !t.length, h = a < 725;
|
|
652
|
+
return /* @__PURE__ */ o(s, { sx: { mx: h ? 16 : 0, my: h ? 24 : 42 }, children: [
|
|
653
653
|
/* @__PURE__ */ o(
|
|
654
654
|
s,
|
|
655
655
|
{
|
|
656
|
-
border:
|
|
656
|
+
border: h ? "1px solid" : "none",
|
|
657
657
|
borderColor: "border.light",
|
|
658
658
|
borderRadius: 2,
|
|
659
|
-
flexDirection:
|
|
660
|
-
gap:
|
|
659
|
+
flexDirection: h ? "column" : "row",
|
|
660
|
+
gap: h ? 0 : 24,
|
|
661
661
|
justifyContent: "center",
|
|
662
662
|
children: [
|
|
663
663
|
/* @__PURE__ */ e(
|
|
664
|
-
|
|
664
|
+
re,
|
|
665
665
|
{
|
|
666
|
-
amount:
|
|
667
|
-
isMobile:
|
|
668
|
-
label:
|
|
666
|
+
amount: S,
|
|
667
|
+
isMobile: h,
|
|
668
|
+
label: G(n.cash_and_bank, l.length)
|
|
669
669
|
}
|
|
670
670
|
),
|
|
671
|
-
|
|
672
|
-
r?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(
|
|
673
|
-
!
|
|
674
|
-
i && (
|
|
671
|
+
h && /* @__PURE__ */ e(D, {}),
|
|
672
|
+
r?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(B, { children: [
|
|
673
|
+
!h && /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
674
|
+
i && (N ? /* @__PURE__ */ e(
|
|
675
675
|
W,
|
|
676
676
|
{
|
|
677
677
|
onClick: () => d(!0),
|
|
@@ -680,12 +680,12 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
680
680
|
children: n.add_income
|
|
681
681
|
}
|
|
682
682
|
) : /* @__PURE__ */ e(
|
|
683
|
-
|
|
683
|
+
re,
|
|
684
684
|
{
|
|
685
|
-
amount:
|
|
686
|
-
isMobile:
|
|
685
|
+
amount: H,
|
|
686
|
+
isMobile: h,
|
|
687
687
|
label: n.to_be_received,
|
|
688
|
-
symbol:
|
|
688
|
+
symbol: h ? "+" : void 0
|
|
689
689
|
}
|
|
690
690
|
))
|
|
691
691
|
] }) : /* @__PURE__ */ e(
|
|
@@ -697,26 +697,26 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
697
697
|
children: n.add_income
|
|
698
698
|
}
|
|
699
699
|
),
|
|
700
|
-
|
|
700
|
+
h ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
|
|
701
701
|
/* @__PURE__ */ e(
|
|
702
|
-
|
|
702
|
+
re,
|
|
703
703
|
{
|
|
704
|
-
amount:
|
|
705
|
-
isMobile:
|
|
706
|
-
label:
|
|
707
|
-
symbol:
|
|
704
|
+
amount: T,
|
|
705
|
+
isMobile: h,
|
|
706
|
+
label: G(n.to_be_paid_out, g.length),
|
|
707
|
+
symbol: h ? "-" : void 0
|
|
708
708
|
}
|
|
709
709
|
),
|
|
710
|
-
|
|
710
|
+
h ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
|
|
711
711
|
/* @__PURE__ */ e(
|
|
712
|
-
|
|
712
|
+
re,
|
|
713
713
|
{
|
|
714
|
-
amount:
|
|
715
|
-
isMobile:
|
|
716
|
-
isTotal:
|
|
714
|
+
amount: F,
|
|
715
|
+
isMobile: h,
|
|
716
|
+
isTotal: h,
|
|
717
717
|
label: n.remaining_cash,
|
|
718
718
|
tooltip: /* @__PURE__ */ e(
|
|
719
|
-
|
|
719
|
+
pe,
|
|
720
720
|
{
|
|
721
721
|
body: n.remaining_income_tooltip_body,
|
|
722
722
|
title: n.remaining_income_tooltip_title
|
|
@@ -739,10 +739,10 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
739
739
|
}
|
|
740
740
|
)
|
|
741
741
|
] });
|
|
742
|
-
}, Lt =
|
|
743
|
-
const { completeOnboarding: n } =
|
|
742
|
+
}, Lt = E(Rt), Ot = ({ handleNextStep: a }) => {
|
|
743
|
+
const { completeOnboarding: n } = ue(), { cashflow: t } = O(), i = ce();
|
|
744
744
|
return /* @__PURE__ */ o(s, { children: [
|
|
745
|
-
/* @__PURE__ */ e(
|
|
745
|
+
/* @__PURE__ */ e(me, { pb: 12, children: t.welcome_title }),
|
|
746
746
|
/* @__PURE__ */ e(
|
|
747
747
|
Xe,
|
|
748
748
|
{
|
|
@@ -753,11 +753,11 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
753
753
|
children: t.welcome_sub_title
|
|
754
754
|
}
|
|
755
755
|
),
|
|
756
|
-
/* @__PURE__ */ e(
|
|
756
|
+
/* @__PURE__ */ e(k, { pb: 32, children: t.welcome_description }),
|
|
757
757
|
/* @__PURE__ */ o(s, { direction: "column", mb: 32, spacing: 32, children: [
|
|
758
|
-
/* @__PURE__ */ o(
|
|
758
|
+
/* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
759
759
|
/* @__PURE__ */ e(
|
|
760
|
-
|
|
760
|
+
I,
|
|
761
761
|
{
|
|
762
762
|
bgcolor: i.palette.primary.lighter,
|
|
763
763
|
borderRadius: 1,
|
|
@@ -771,9 +771,9 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
771
771
|
),
|
|
772
772
|
t.bullet_one
|
|
773
773
|
] }),
|
|
774
|
-
/* @__PURE__ */ o(
|
|
774
|
+
/* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
775
775
|
/* @__PURE__ */ e(
|
|
776
|
-
|
|
776
|
+
I,
|
|
777
777
|
{
|
|
778
778
|
bgcolor: i.palette.primary.lighter,
|
|
779
779
|
borderRadius: 1,
|
|
@@ -787,9 +787,9 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
787
787
|
),
|
|
788
788
|
t.bullet_two
|
|
789
789
|
] }),
|
|
790
|
-
/* @__PURE__ */ o(
|
|
790
|
+
/* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
791
791
|
/* @__PURE__ */ e(
|
|
792
|
-
|
|
792
|
+
I,
|
|
793
793
|
{
|
|
794
794
|
bgcolor: i.palette.primary.lighter,
|
|
795
795
|
borderRadius: 1,
|
|
@@ -809,17 +809,17 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
809
809
|
/* @__PURE__ */ e(W, { onClick: n, variant: "outlined", children: t.skip_button })
|
|
810
810
|
] })
|
|
811
811
|
] });
|
|
812
|
-
},
|
|
812
|
+
}, Nt = E(Ot), Le = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", je = {
|
|
813
813
|
CASHFLOW_ONBOARDING: `${Le}/cashflow-onboarding.png`,
|
|
814
814
|
CASHFLOW_LOADING_ANIMATION: `${Le}/loading-animation.gif`
|
|
815
815
|
}, kt = () => {
|
|
816
|
-
const { cashflow: a } =
|
|
816
|
+
const { cashflow: a } = O();
|
|
817
817
|
return /* @__PURE__ */ o(p.Fragment, { children: [
|
|
818
818
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: je.CASHFLOW_LOADING_ANIMATION }) }),
|
|
819
|
-
/* @__PURE__ */ e(
|
|
820
|
-
/* @__PURE__ */ e(
|
|
819
|
+
/* @__PURE__ */ e(me, { pb: 12, children: a.loading_title }),
|
|
820
|
+
/* @__PURE__ */ e(k, { children: a.loading_description })
|
|
821
821
|
] });
|
|
822
|
-
}, Ht =
|
|
822
|
+
}, Ht = E(kt), Ft = ot`
|
|
823
823
|
from {
|
|
824
824
|
transform: rotate(0deg);
|
|
825
825
|
}
|
|
@@ -827,39 +827,39 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
827
827
|
transform: rotate(360deg);
|
|
828
828
|
}
|
|
829
829
|
`, Wt = () => {
|
|
830
|
-
const { addRepeatingTransaction: a, repeatingTransactions: n } =
|
|
831
|
-
() => d.find((
|
|
832
|
-
[
|
|
830
|
+
const { addRepeatingTransaction: a, repeatingTransactions: n } = U(), { cashflow: t, common: i } = O(), { completeOnboarding: f } = ue(), { isDirty: C } = K(), { isMobile: c } = he(), { isCopyLoaded: x, setDisplayedDate: l } = Y(), { filter: r, setFilter: m, transactions: d } = He(), g = ce(), [w, S] = J(!0), [T, H] = p.useState(ht.EveryMonth), [F, N] = p.useState(1), [h, R] = p.useState(15), [b, P] = J(!1), [q, ae] = J(1), [v, de] = J([]), [ie, X] = J(""), _ = p.useMemo(
|
|
831
|
+
() => d.find((y) => y.guid === ie),
|
|
832
|
+
[ie, d]
|
|
833
833
|
), ze = !!n.filter(
|
|
834
|
-
(
|
|
834
|
+
(y) => y.repeating_transaction_type === Ie.Income
|
|
835
835
|
).length, ge = async () => {
|
|
836
836
|
ae(2), l(
|
|
837
837
|
// Beginning of the month, 90 days before today
|
|
838
838
|
dt(Ge($(), 90)),
|
|
839
839
|
$()
|
|
840
|
-
), m({ ...r, custom:
|
|
840
|
+
), m({ ...r, custom: Se }), ae(3);
|
|
841
841
|
}, Be = async () => {
|
|
842
|
-
if (!(
|
|
843
|
-
|
|
844
|
-
for (let
|
|
845
|
-
const
|
|
846
|
-
account_guid:
|
|
847
|
-
amount:
|
|
848
|
-
merchant_guid:
|
|
849
|
-
description:
|
|
842
|
+
if (!(v.length < 1)) {
|
|
843
|
+
P(!0);
|
|
844
|
+
for (let y = 0; y < v.length; y++) {
|
|
845
|
+
const A = v[y], be = De(T, _e(A.date)), Pe = {
|
|
846
|
+
account_guid: A.account_guid,
|
|
847
|
+
amount: A.amount,
|
|
848
|
+
merchant_guid: A.merchant_guid,
|
|
849
|
+
description: A.feed_description || A.description,
|
|
850
850
|
predicted_occurs_on: lt(be, { representation: "date" }),
|
|
851
851
|
recurrence_day: be.getDay(),
|
|
852
|
-
recurrence_type:
|
|
852
|
+
recurrence_type: T,
|
|
853
853
|
repeating_transaction_type: Ie.Income,
|
|
854
|
-
transaction_type:
|
|
854
|
+
transaction_type: A.transaction_type
|
|
855
855
|
};
|
|
856
|
-
await a(Pe,
|
|
856
|
+
await a(Pe, A);
|
|
857
857
|
}
|
|
858
858
|
await f();
|
|
859
859
|
}
|
|
860
|
-
}, Ue = !
|
|
861
|
-
return
|
|
862
|
-
|
|
860
|
+
}, Ue = !_ && w || !_ && v.length < 1;
|
|
861
|
+
return x ? /* @__PURE__ */ o(
|
|
862
|
+
I,
|
|
863
863
|
{
|
|
864
864
|
sx: {
|
|
865
865
|
display: "flex",
|
|
@@ -872,17 +872,17 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
872
872
|
py: 24
|
|
873
873
|
},
|
|
874
874
|
children: [
|
|
875
|
-
|
|
876
|
-
|
|
875
|
+
q === 1 && /* @__PURE__ */ e(
|
|
876
|
+
I,
|
|
877
877
|
{
|
|
878
878
|
sx: {
|
|
879
879
|
...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
880
880
|
},
|
|
881
|
-
children: /* @__PURE__ */ e(
|
|
881
|
+
children: /* @__PURE__ */ e(Nt, { handleNextStep: ge })
|
|
882
882
|
}
|
|
883
883
|
),
|
|
884
|
-
|
|
885
|
-
|
|
884
|
+
q === 2 && /* @__PURE__ */ e(
|
|
885
|
+
I,
|
|
886
886
|
{
|
|
887
887
|
sx: {
|
|
888
888
|
...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
@@ -890,29 +890,29 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
890
890
|
children: /* @__PURE__ */ e(Ht, {})
|
|
891
891
|
}
|
|
892
892
|
),
|
|
893
|
-
|
|
894
|
-
|
|
893
|
+
q === 3 && /* @__PURE__ */ o(
|
|
894
|
+
I,
|
|
895
895
|
{
|
|
896
896
|
sx: {
|
|
897
897
|
...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
898
898
|
},
|
|
899
899
|
children: [
|
|
900
|
-
/* @__PURE__ */ e(
|
|
901
|
-
/* @__PURE__ */ e(
|
|
902
|
-
|
|
903
|
-
/* @__PURE__ */ e(ee, { children:
|
|
900
|
+
/* @__PURE__ */ e(me, { pb: 12, children: t.add_income_title }),
|
|
901
|
+
/* @__PURE__ */ e(k, { mb: 24, children: t.add_income_description }),
|
|
902
|
+
v.length > 0 && !_ && /* @__PURE__ */ o(B, { children: [
|
|
903
|
+
/* @__PURE__ */ e(ee, { children: v.map((y, A) => /* @__PURE__ */ o(p.Fragment, { children: [
|
|
904
904
|
/* @__PURE__ */ e(mt, { bgcolor: "background.paper", children: pt(
|
|
905
|
-
|
|
905
|
+
z(y.nextDate || y.date)
|
|
906
906
|
) }),
|
|
907
|
-
/* @__PURE__ */ e(ut, { transaction:
|
|
908
|
-
|
|
909
|
-
] },
|
|
907
|
+
/* @__PURE__ */ e(ut, { transaction: y }),
|
|
908
|
+
A !== v.length - 1 && /* @__PURE__ */ e(D, {})
|
|
909
|
+
] }, y.guid)) }),
|
|
910
910
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
|
|
911
|
-
/* @__PURE__ */ e(
|
|
911
|
+
/* @__PURE__ */ e(D, { sx: { flexGrow: 1 } }),
|
|
912
912
|
/* @__PURE__ */ e(
|
|
913
913
|
W,
|
|
914
914
|
{
|
|
915
|
-
onClick: () =>
|
|
915
|
+
onClick: () => S(!0),
|
|
916
916
|
startIcon: /* @__PURE__ */ e(M, { name: "add", size: 20 }),
|
|
917
917
|
children: t.add_income
|
|
918
918
|
}
|
|
@@ -923,42 +923,42 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
923
923
|
rt,
|
|
924
924
|
{
|
|
925
925
|
bgcolor: "background.paper",
|
|
926
|
-
onSearch: (
|
|
926
|
+
onSearch: (y) => m({
|
|
927
927
|
...r,
|
|
928
|
-
custom: (
|
|
928
|
+
custom: (A) => y ? st(A, y) : Se(A)
|
|
929
929
|
}),
|
|
930
|
-
onSelected: (
|
|
931
|
-
|
|
930
|
+
onSelected: (y) => {
|
|
931
|
+
X(y), S(!1);
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
934
|
),
|
|
935
|
-
!ze &&
|
|
936
|
-
|
|
935
|
+
!ze && C && /* @__PURE__ */ e(k, { color: "error", mt: 16, children: t.confirm_error }),
|
|
936
|
+
_ && /* @__PURE__ */ o(B, { children: [
|
|
937
937
|
/* @__PURE__ */ e(
|
|
938
938
|
ct,
|
|
939
939
|
{
|
|
940
940
|
bgcolor: "background.paper",
|
|
941
|
-
firstDay:
|
|
942
|
-
frequency:
|
|
943
|
-
onFirstDayChange:
|
|
944
|
-
onFrequencyChange:
|
|
945
|
-
onSecondDayChange:
|
|
946
|
-
secondDay:
|
|
947
|
-
transaction:
|
|
941
|
+
firstDay: F,
|
|
942
|
+
frequency: T,
|
|
943
|
+
onFirstDayChange: N,
|
|
944
|
+
onFrequencyChange: H,
|
|
945
|
+
onSecondDayChange: R,
|
|
946
|
+
secondDay: h,
|
|
947
|
+
transaction: _
|
|
948
948
|
}
|
|
949
949
|
),
|
|
950
950
|
/* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
951
951
|
/* @__PURE__ */ e(
|
|
952
952
|
W,
|
|
953
953
|
{
|
|
954
|
-
"aria-disabled": !
|
|
954
|
+
"aria-disabled": !_,
|
|
955
955
|
onClick: () => {
|
|
956
|
-
const
|
|
957
|
-
|
|
958
|
-
...
|
|
959
|
-
nextDate: De(
|
|
960
|
-
frequency:
|
|
961
|
-
}),
|
|
956
|
+
const y = [...v];
|
|
957
|
+
y.push({
|
|
958
|
+
..._,
|
|
959
|
+
nextDate: De(T, _e(_.date)),
|
|
960
|
+
frequency: T
|
|
961
|
+
}), de(y), X("");
|
|
962
962
|
},
|
|
963
963
|
variant: "contained",
|
|
964
964
|
children: i.confirm_button
|
|
@@ -968,7 +968,7 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
968
968
|
W,
|
|
969
969
|
{
|
|
970
970
|
onClick: () => {
|
|
971
|
-
|
|
971
|
+
X(""), S(!0), ge().finally();
|
|
972
972
|
},
|
|
973
973
|
variant: "outlined",
|
|
974
974
|
children: i.cancel_button
|
|
@@ -976,13 +976,13 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
976
976
|
)
|
|
977
977
|
] })
|
|
978
978
|
] }),
|
|
979
|
-
|
|
979
|
+
v.length > 0 && !_ && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
980
980
|
/* @__PURE__ */ e(
|
|
981
981
|
W,
|
|
982
982
|
{
|
|
983
|
-
"aria-disabled":
|
|
983
|
+
"aria-disabled": v.length < 1 || b,
|
|
984
984
|
onClick: Be,
|
|
985
|
-
startIcon:
|
|
985
|
+
startIcon: b ? /* @__PURE__ */ e(
|
|
986
986
|
M,
|
|
987
987
|
{
|
|
988
988
|
name: "progress_activity",
|
|
@@ -1003,41 +1003,51 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
1003
1003
|
]
|
|
1004
1004
|
}
|
|
1005
1005
|
) : /* @__PURE__ */ e(te, {});
|
|
1006
|
-
}, $t =
|
|
1006
|
+
}, $t = E(Wt), Mt = ({ onBackClick: a, sx: n = {} }) => {
|
|
1007
1007
|
const {
|
|
1008
1008
|
selectedAccounts: t,
|
|
1009
1009
|
selectedAccountGuids: i,
|
|
1010
1010
|
setSelectedAccounts: f,
|
|
1011
|
-
shouldDisableNextDate:
|
|
1011
|
+
shouldDisableNextDate: C,
|
|
1012
1012
|
shouldDisablePrevDate: c
|
|
1013
|
-
} = Y(), { onEvent:
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
}, [
|
|
1013
|
+
} = Y(), { onEvent: x } = Ne(), { clientConfig: l } = Qe(), { visibleCashAccounts: r } = Oe(), { setFilter: m } = He(), { userProfile: d } = ke(), { dateRange: g, setSelectedCashAccounts: w } = K(), { loadRepeatingTransactions: S, income: T, isDataLoaded: H, setDateRange: F } = U(), { cashflow: N, recurring: h } = O(), { isCopyLoaded: R, isInitialized: b } = Y(), q = l?.master?.deep_link_params?.view === "manage_income", [ae, v] = p.useState(q);
|
|
1014
|
+
p.useEffect(() => {
|
|
1015
|
+
b && (F(g), S().finally());
|
|
1016
|
+
}, [b]), p.useEffect(() => {
|
|
1017
1017
|
f(r);
|
|
1018
1018
|
}, [r]), p.useEffect(() => {
|
|
1019
|
-
const
|
|
1020
|
-
(
|
|
1019
|
+
const ie = r.map((_) => _.guid), X = t.filter(
|
|
1020
|
+
(_) => i.includes(_.guid) && ie.includes(_.guid)
|
|
1021
1021
|
);
|
|
1022
|
-
|
|
1022
|
+
w(X), m({
|
|
1023
1023
|
dateRange: { start: Ge($(), 90), end: ft() },
|
|
1024
|
-
accounts:
|
|
1024
|
+
accounts: X.map((_) => _.guid)
|
|
1025
1025
|
});
|
|
1026
|
-
}, [r, t])
|
|
1026
|
+
}, [r, t]);
|
|
1027
|
+
const de = H && !d?.has_completed_cash_flow_onboarding && !T.length;
|
|
1028
|
+
return !R || !b ? /* @__PURE__ */ e(te, {}) : de ? /* @__PURE__ */ e(
|
|
1029
|
+
ve,
|
|
1030
|
+
{
|
|
1031
|
+
onBackClick: a,
|
|
1032
|
+
sx: { height: "100%", overflow: "auto" },
|
|
1033
|
+
title: N.title,
|
|
1034
|
+
children: /* @__PURE__ */ e($t, {})
|
|
1035
|
+
}
|
|
1036
|
+
) : /* @__PURE__ */ o(
|
|
1027
1037
|
ve,
|
|
1028
1038
|
{
|
|
1029
1039
|
accountOptions: r,
|
|
1030
1040
|
actions: [
|
|
1031
1041
|
{
|
|
1032
|
-
label:
|
|
1042
|
+
label: h.action_title,
|
|
1033
1043
|
iconName: "credit_card_gear",
|
|
1034
1044
|
onClick: () => {
|
|
1035
|
-
|
|
1045
|
+
v(!0), x(Ae.CASH_FLOW_CLICK_SETTINGS);
|
|
1036
1046
|
}
|
|
1037
1047
|
}
|
|
1038
1048
|
],
|
|
1039
1049
|
calendarActions: {
|
|
1040
|
-
shouldDisableNext:
|
|
1050
|
+
shouldDisableNext: C,
|
|
1041
1051
|
shouldDisablePrevious: c,
|
|
1042
1052
|
shouldDisablePicker: !0,
|
|
1043
1053
|
onRangeChanged: () => {
|
|
@@ -1045,54 +1055,46 @@ const wt = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
1045
1055
|
},
|
|
1046
1056
|
dateRange: g,
|
|
1047
1057
|
dateRangeVariant: "readonly",
|
|
1048
|
-
onAccountsFilterClick: () =>
|
|
1058
|
+
onAccountsFilterClick: () => x(Ae.CASH_FLOW_CLICK_FILTER),
|
|
1049
1059
|
onBackClick: a,
|
|
1050
1060
|
sx: n,
|
|
1051
|
-
title:
|
|
1061
|
+
title: N.title,
|
|
1052
1062
|
children: [
|
|
1053
1063
|
/* @__PURE__ */ e(Lt, {}),
|
|
1054
1064
|
/* @__PURE__ */ e(Tt, {}),
|
|
1055
1065
|
/* @__PURE__ */ e(
|
|
1056
1066
|
Me,
|
|
1057
1067
|
{
|
|
1058
|
-
ariaLabelClose:
|
|
1059
|
-
isOpen:
|
|
1060
|
-
onClose: () =>
|
|
1068
|
+
ariaLabelClose: N.close_settings_aria,
|
|
1069
|
+
isOpen: ae,
|
|
1070
|
+
onClose: () => v(!1),
|
|
1061
1071
|
shouldShowHeaderBorders: !1,
|
|
1062
|
-
title:
|
|
1063
|
-
children: /* @__PURE__ */ e(Je, { defaultSelectedTab:
|
|
1072
|
+
title: h.action_title,
|
|
1073
|
+
children: /* @__PURE__ */ e(Je, { defaultSelectedTab: q ? 1 : 0 })
|
|
1064
1074
|
}
|
|
1065
1075
|
)
|
|
1066
1076
|
]
|
|
1067
1077
|
}
|
|
1068
|
-
) : /* @__PURE__ */ e(
|
|
1069
|
-
ve,
|
|
1070
|
-
{
|
|
1071
|
-
onBackClick: a,
|
|
1072
|
-
sx: { height: "100%", overflow: "auto" },
|
|
1073
|
-
title: T.title,
|
|
1074
|
-
children: /* @__PURE__ */ e($t, {})
|
|
1075
|
-
}
|
|
1076
1078
|
);
|
|
1077
|
-
}, Fn =
|
|
1079
|
+
}, Fn = E(Mt);
|
|
1078
1080
|
class Wn {
|
|
1079
1081
|
fetchInstance;
|
|
1080
1082
|
constructor(n, t, i) {
|
|
1081
1083
|
this.fetchInstance = new gt(n, t, void 0, i);
|
|
1082
1084
|
}
|
|
1083
|
-
addCashflowEvent = async (n) => this.fetchInstance.post(
|
|
1084
|
-
addCashflowSequence = async (n) => this.fetchInstance.post(
|
|
1085
|
-
getCashflowSequences = async () => this.fetchInstance.get(
|
|
1085
|
+
addCashflowEvent = async (n) => this.fetchInstance.post(j.CASHFLOW_EVENTS, { ...n }).then((t) => t);
|
|
1086
|
+
addCashflowSequence = async (n) => this.fetchInstance.post(j.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
|
|
1087
|
+
getCashflowSequences = async () => this.fetchInstance.get(j.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
|
|
1086
1088
|
getCashflowEventsByDateRange = async (n, t) => this.fetchInstance.get(
|
|
1087
|
-
`${
|
|
1089
|
+
`${j.CASHFLOW_EVENTS}/from/${z(n)}/to/${z(t)}`
|
|
1088
1090
|
).then((i) => i.cashflow_events);
|
|
1089
|
-
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${
|
|
1091
|
+
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${j.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
|
|
1090
1092
|
getProjectedCashflowEvents = async (n, t) => this.fetchInstance.get(
|
|
1091
|
-
`${
|
|
1093
|
+
`${j.CASHFLOW_SEQUENCES}/projected_events/from/${z(
|
|
1092
1094
|
n
|
|
1093
|
-
)}/to/${
|
|
1095
|
+
)}/to/${z(t)}`
|
|
1094
1096
|
).then((i) => i.cashflow_events);
|
|
1095
|
-
updateCashflowSequence = async (n) => this.fetchInstance.put(`${
|
|
1097
|
+
updateCashflowSequence = async (n) => this.fetchInstance.put(`${j.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
|
|
1096
1098
|
}
|
|
1097
1099
|
export {
|
|
1098
1100
|
Wn as CashflowApi,
|