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