@mx-cartographer/experiences 7.0.31 → 7.0.32-alpha-recurring-transactions-navigation-issue-ram2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/recurringtransactions/index.es.js +736 -458
- package/package.json +1 -1
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import h from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as R } from "mobx-react-lite";
|
|
4
4
|
import { endOfMonth as z } from "date-fns/endOfMonth";
|
|
5
|
-
import { endOfToday as
|
|
5
|
+
import { endOfToday as de } from "date-fns/endOfToday";
|
|
6
6
|
import { startOfMonth as k } from "date-fns/startOfMonth";
|
|
7
|
-
import { startOfToday as
|
|
8
|
-
import { subDays as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
7
|
+
import { startOfToday as ue } from "date-fns/startOfToday";
|
|
8
|
+
import { subDays as le } from "date-fns/subDays";
|
|
9
|
+
import ie from "@mui/material/Skeleton";
|
|
10
|
+
import s from "@mui/material/Stack";
|
|
11
11
|
import { R as He } from "../RecurringSettings-ClbdFNWX.mjs";
|
|
12
|
-
import { M as
|
|
12
|
+
import { M as Nn } from "../RecurringSettings-ClbdFNWX.mjs";
|
|
13
13
|
import { addMonths as ze } from "date-fns/addMonths";
|
|
14
14
|
import { subMonths as Be } from "date-fns/subMonths";
|
|
15
15
|
import { isBefore as Ue } from "date-fns/isBefore";
|
|
16
16
|
import oe from "@mui/material/Unstable_Grid2";
|
|
17
|
-
import
|
|
17
|
+
import xe from "@mui/material/IconButton";
|
|
18
18
|
import Re from "@mui/material/Tab";
|
|
19
19
|
import Fe from "@mui/material/Tabs";
|
|
20
|
-
import { Schedule as
|
|
21
|
-
import { Text as p, MerchantLogo as
|
|
22
|
-
import { getWeeksInMonth as
|
|
23
|
-
import
|
|
24
|
-
import { AdapterDateFns as
|
|
25
|
-
import { DateCalendar as
|
|
26
|
-
import { LocalizationProvider as
|
|
27
|
-
import { isSameDay as
|
|
28
|
-
import
|
|
29
|
-
import { PickersDay as
|
|
30
|
-
import { I as
|
|
31
|
-
import { u as
|
|
32
|
-
import { c as
|
|
33
|
-
import { T as
|
|
34
|
-
import { R as
|
|
35
|
-
import { A as
|
|
36
|
-
import
|
|
20
|
+
import { Schedule as qe, MonetizationOn as je, Cancel as Me, CheckCircle as Ne, ChevronLeft as Ke, ChevronRight as Ye, CurrencyExchange as Ve } from "@mxenabled/mx-icons";
|
|
21
|
+
import { Text as p, MerchantLogo as me, InstitutionLogo as Xe, H3 as Je, P as ce } from "@mxenabled/mxui";
|
|
22
|
+
import { getWeeksInMonth as Ge } from "date-fns/getWeeksInMonth";
|
|
23
|
+
import fe from "@mui/material/styles/useTheme";
|
|
24
|
+
import { AdapterDateFns as Qe } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
25
|
+
import { DateCalendar as et } from "@mui/x-date-pickers/DateCalendar";
|
|
26
|
+
import { LocalizationProvider as tt } from "@mui/x-date-pickers/LocalizationProvider";
|
|
27
|
+
import { isSameDay as nt } from "date-fns/isSameDay";
|
|
28
|
+
import at from "@mui/material/Badge";
|
|
29
|
+
import { PickersDay as rt } from "@mui/x-date-pickers/PickersDay";
|
|
30
|
+
import { I as K } from "../IconBacking-B9oC6uL2.mjs";
|
|
31
|
+
import { u as G, a as Y, i as _, f as V, p as ve, c as pe, g as ge } from "../hooks-DlI63qSB.mjs";
|
|
32
|
+
import { c as A, a as x, g as Ie, f as it } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
33
|
+
import { T as $ } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
34
|
+
import { R as Ln } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
35
|
+
import { A as S, W as ot } from "../WidgetContainer-CBpf3h1Y.mjs";
|
|
36
|
+
import ct from "@mui/material/Button";
|
|
37
37
|
import se from "@mui/material/Divider";
|
|
38
|
-
import
|
|
38
|
+
import we from "@mui/material/List";
|
|
39
39
|
import Le from "@mui/material/ListItem";
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
40
|
+
import st from "@mui/material/ListSubheader";
|
|
41
|
+
import dt from "@mui/material/ListItemAvatar";
|
|
42
|
+
import ut from "@mui/material/ListItemButton";
|
|
43
|
+
import lt from "@mui/material/ListItemText";
|
|
44
44
|
import { b as mt } from "../ManageIncome-Byw3lVtR.mjs";
|
|
45
|
-
import { c as On, M as
|
|
46
|
-
import { f as
|
|
47
|
-
import { D as
|
|
48
|
-
import { b as
|
|
49
|
-
import { f as
|
|
50
|
-
import
|
|
51
|
-
import { S as
|
|
52
|
-
import { u as
|
|
53
|
-
import { L as
|
|
54
|
-
import { M as
|
|
55
|
-
import { u as
|
|
56
|
-
import { M as
|
|
57
|
-
const
|
|
45
|
+
import { c as On, M as Pn, S as kn } from "../ManageIncome-Byw3lVtR.mjs";
|
|
46
|
+
import { f as M } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
47
|
+
import { D as Ee } from "../Drawer-kEE73B87.mjs";
|
|
48
|
+
import { b as O } from "../Localization-2MODESHW.mjs";
|
|
49
|
+
import { f as N, D as v } from "../Dialog-CWW597AF.mjs";
|
|
50
|
+
import P from "@mui/material/Box";
|
|
51
|
+
import { S as Oe } from "../StatusBar-BK_uYHAB.mjs";
|
|
52
|
+
import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
53
|
+
import { L as q } from "../Loader-DUaFpDGv.mjs";
|
|
54
|
+
import { M as ft } from "../MiniWidgetContainer-BzW7V_04.mjs";
|
|
55
|
+
import { u as pt } from "../useDimensions-27p2evRx.mjs";
|
|
56
|
+
import { M as gt } from "../MicroWidgetContainer-DPDsZIiS.mjs";
|
|
57
|
+
const X = {
|
|
58
58
|
gridRow: 1,
|
|
59
59
|
gridColumn: 1,
|
|
60
60
|
zIndex: 2
|
|
61
|
-
},
|
|
62
|
-
|
|
61
|
+
}, J = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, be = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(K, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(qe, { color: "primary", filled: !0, sx: { fontSize: n, ...X } }) }), ye = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(K, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(
|
|
62
|
+
je,
|
|
63
63
|
{
|
|
64
64
|
filled: !0,
|
|
65
|
-
sx: { color: "categories.income", fontSize: n, ...
|
|
65
|
+
sx: { color: "categories.income", fontSize: n, ...X }
|
|
66
66
|
}
|
|
67
|
-
) }),
|
|
68
|
-
({ day: t, outsideCurrentMonth: n, ...
|
|
69
|
-
const { recurring:
|
|
70
|
-
() =>
|
|
71
|
-
[r,
|
|
67
|
+
) }), Te = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(K, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Me, { color: "error", filled: !0, sx: { fontSize: n, ...X } }) }), Ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(K, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Ne, { color: "success", filled: !0, sx: { fontSize: n, ...X } }) }), ht = R(
|
|
68
|
+
({ day: t, outsideCurrentMonth: n, ...a }) => {
|
|
69
|
+
const { recurring: o } = G(), { selectedAccountGuids: r } = Y(), { recurrences: d, setSelectedDay: f } = _(), c = h.useMemo(
|
|
70
|
+
() => d.filter((u) => r.includes(u.accountGuid)),
|
|
71
|
+
[r, d]
|
|
72
72
|
).filter(
|
|
73
|
-
(
|
|
74
|
-
),
|
|
75
|
-
(
|
|
76
|
-
),
|
|
77
|
-
(
|
|
78
|
-
),
|
|
79
|
-
(
|
|
80
|
-
),
|
|
73
|
+
(u) => nt(u.occurredOnDate || u.expectedDate, t)
|
|
74
|
+
), l = c.some(
|
|
75
|
+
(u) => u.type !== A.Income && u.status === x.Upcoming
|
|
76
|
+
), g = c.some(
|
|
77
|
+
(u) => u.type !== A.Income && u.status === x.Missed
|
|
78
|
+
), b = c.some(
|
|
79
|
+
(u) => u.type !== A.Income && u.status === x.Paid
|
|
80
|
+
), T = c.some((u) => u.type === A.Income), y = (l ? 1 : 0) + (g ? 1 : 0) + (b ? 1 : 0) + (T ? 1 : 0);
|
|
81
81
|
return /* @__PURE__ */ e(
|
|
82
|
-
|
|
82
|
+
at,
|
|
83
83
|
{
|
|
84
|
-
badgeContent:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
badgeContent: c.length > 0 && /* @__PURE__ */ i(j, { children: [
|
|
85
|
+
g && /* @__PURE__ */ e(Te, { isOffset: !0 }),
|
|
86
|
+
b && /* @__PURE__ */ e(Ce, { isOffset: !0 }),
|
|
87
|
+
l && /* @__PURE__ */ e(be, { isOffset: !0 }),
|
|
88
|
+
T && /* @__PURE__ */ e(ye, { isOffset: !0 })
|
|
89
89
|
] }),
|
|
90
90
|
overlap: "circular",
|
|
91
91
|
sx: {
|
|
@@ -96,15 +96,15 @@ const Z = {
|
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
children: /* @__PURE__ */ e(
|
|
99
|
-
|
|
99
|
+
rt,
|
|
100
100
|
{
|
|
101
101
|
"aria-label": `
|
|
102
|
-
${
|
|
103
|
-
${
|
|
104
|
-
${
|
|
105
|
-
${
|
|
102
|
+
${b && o.paid},
|
|
103
|
+
${g && o.missed},
|
|
104
|
+
${l && o.upcoming},
|
|
105
|
+
${T && o.income}`,
|
|
106
106
|
day: t,
|
|
107
|
-
onClick: () =>
|
|
107
|
+
onClick: () => f(t),
|
|
108
108
|
outsideCurrentMonth: n,
|
|
109
109
|
sx: {
|
|
110
110
|
"&.MuiPickersDay-root": {
|
|
@@ -113,19 +113,19 @@ const Z = {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
|
-
...
|
|
116
|
+
...a
|
|
117
117
|
}
|
|
118
118
|
)
|
|
119
119
|
}
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
|
-
), F = ({ icon: t, label: n }) => /* @__PURE__ */
|
|
122
|
+
), F = ({ icon: t, label: n }) => /* @__PURE__ */ i(s, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
123
123
|
/* @__PURE__ */ e(t, {}),
|
|
124
124
|
/* @__PURE__ */ e(p, { variant: "XSmall", children: n })
|
|
125
|
-
] }),
|
|
126
|
-
const { recurring: t } =
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
-
|
|
125
|
+
] }), bt = R(() => {
|
|
126
|
+
const { recurring: t } = G();
|
|
127
|
+
return /* @__PURE__ */ i(
|
|
128
|
+
s,
|
|
129
129
|
{
|
|
130
130
|
alignItems: "center",
|
|
131
131
|
"aria-hidden": !0,
|
|
@@ -134,29 +134,29 @@ const Z = {
|
|
|
134
134
|
justifyContent: "center",
|
|
135
135
|
mt: 12,
|
|
136
136
|
children: [
|
|
137
|
-
/* @__PURE__ */ e(F, { icon:
|
|
138
|
-
/* @__PURE__ */ e(F, { icon:
|
|
139
|
-
/* @__PURE__ */ e(F, { icon:
|
|
140
|
-
/* @__PURE__ */ e(F, { icon:
|
|
137
|
+
/* @__PURE__ */ e(F, { icon: be, label: t.expense }),
|
|
138
|
+
/* @__PURE__ */ e(F, { icon: ye, label: t.income }),
|
|
139
|
+
/* @__PURE__ */ e(F, { icon: Te, label: t.missed }),
|
|
140
|
+
/* @__PURE__ */ e(F, { icon: Ce, label: t.paid })
|
|
141
141
|
]
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
|
-
}),
|
|
145
|
-
const t =
|
|
146
|
-
|
|
147
|
-
),
|
|
148
|
-
|
|
149
|
-
start: k(
|
|
150
|
-
end: z(
|
|
151
|
-
}), n(
|
|
152
|
-
},
|
|
153
|
-
|
|
144
|
+
}), Se = 58, Pe = R(() => {
|
|
145
|
+
const t = fe(), { onEvent: n } = V(), { selectedDay: a, setDateRange: o } = _(), [r, d] = h.useState(
|
|
146
|
+
Ge(/* @__PURE__ */ new Date()) * $ + Se
|
|
147
|
+
), f = (c) => {
|
|
148
|
+
d(Ge(c) * $ + Se), o({
|
|
149
|
+
start: k(c),
|
|
150
|
+
end: z(c)
|
|
151
|
+
}), n(S.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
152
|
+
}, m = /* @__PURE__ */ e(
|
|
153
|
+
et,
|
|
154
154
|
{
|
|
155
155
|
minDate: k(/* @__PURE__ */ new Date()),
|
|
156
|
-
onMonthChange:
|
|
156
|
+
onMonthChange: f,
|
|
157
157
|
showDaysOutsideCurrentMonth: !0,
|
|
158
158
|
slots: {
|
|
159
|
-
day:
|
|
159
|
+
day: ht
|
|
160
160
|
},
|
|
161
161
|
sx: {
|
|
162
162
|
"& .MuiPickersArrowSwitcher-button": {
|
|
@@ -184,11 +184,11 @@ const Z = {
|
|
|
184
184
|
minHeight: r
|
|
185
185
|
},
|
|
186
186
|
"&.MuiDateCalendar-root": {
|
|
187
|
-
minHeight: r +
|
|
187
|
+
minHeight: r + $
|
|
188
188
|
},
|
|
189
189
|
"& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
|
|
190
|
-
height:
|
|
191
|
-
width:
|
|
190
|
+
height: $,
|
|
191
|
+
width: $,
|
|
192
192
|
margin: 0
|
|
193
193
|
},
|
|
194
194
|
"& .MuiDayCalendar-weekDayLabel": {
|
|
@@ -196,45 +196,45 @@ const Z = {
|
|
|
196
196
|
fontSize: t.typography.body2.fontSize
|
|
197
197
|
}
|
|
198
198
|
},
|
|
199
|
-
value:
|
|
199
|
+
value: a,
|
|
200
200
|
views: ["day"]
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
|
-
return /* @__PURE__ */ e(
|
|
204
|
-
|
|
205
|
-
!
|
|
206
|
-
/* @__PURE__ */ e(
|
|
203
|
+
return /* @__PURE__ */ e(s, { justifyContent: "center", children: /* @__PURE__ */ i(tt, { dateAdapter: Qe, children: [
|
|
204
|
+
a && m,
|
|
205
|
+
!a && m,
|
|
206
|
+
/* @__PURE__ */ e(bt, {})
|
|
207
207
|
] }) });
|
|
208
208
|
}), yt = (t) => {
|
|
209
|
-
if (t.type ===
|
|
210
|
-
return /* @__PURE__ */ e(
|
|
209
|
+
if (t.type === A.Income)
|
|
210
|
+
return /* @__PURE__ */ e(ye, {});
|
|
211
211
|
switch (t.status) {
|
|
212
|
-
case
|
|
213
|
-
return /* @__PURE__ */ e(
|
|
214
|
-
case
|
|
215
|
-
return /* @__PURE__ */ e(
|
|
212
|
+
case x.Missed:
|
|
213
|
+
return /* @__PURE__ */ e(Te, {});
|
|
214
|
+
case x.Paid:
|
|
215
|
+
return /* @__PURE__ */ e(Ce, {});
|
|
216
216
|
default:
|
|
217
|
-
return /* @__PURE__ */ e(
|
|
217
|
+
return /* @__PURE__ */ e(be, {});
|
|
218
218
|
}
|
|
219
|
-
},
|
|
219
|
+
}, Tt = (t, n) => {
|
|
220
220
|
switch (t.status) {
|
|
221
|
-
case
|
|
222
|
-
return t.expectedDate ?
|
|
221
|
+
case x.Paid:
|
|
222
|
+
return t.expectedDate ? O(
|
|
223
223
|
n.paid_on,
|
|
224
|
-
|
|
224
|
+
N(
|
|
225
225
|
t.occurredOnDate || t.expectedDate,
|
|
226
|
-
|
|
226
|
+
v.MONTH_DAY
|
|
227
227
|
)
|
|
228
228
|
) : n.paid;
|
|
229
|
-
case
|
|
230
|
-
return
|
|
229
|
+
case x.Missed:
|
|
230
|
+
return O(
|
|
231
231
|
n.missed_on,
|
|
232
|
-
|
|
232
|
+
N(t.expectedDate, v.MONTH_DAY)
|
|
233
233
|
);
|
|
234
|
-
case
|
|
235
|
-
return
|
|
234
|
+
case x.Upcoming:
|
|
235
|
+
return O(
|
|
236
236
|
n.upcoming_on,
|
|
237
|
-
|
|
237
|
+
N(t.expectedDate, v.MONTH_DAY)
|
|
238
238
|
);
|
|
239
239
|
default:
|
|
240
240
|
return n.unknown;
|
|
@@ -242,42 +242,42 @@ const Z = {
|
|
|
242
242
|
}, _e = ({
|
|
243
243
|
recurrence: t,
|
|
244
244
|
isMini: n = !1,
|
|
245
|
-
onRecurrenceClick:
|
|
245
|
+
onRecurrenceClick: a = () => {
|
|
246
246
|
},
|
|
247
|
-
showOrdinal:
|
|
247
|
+
showOrdinal: o = !1
|
|
248
248
|
}) => {
|
|
249
|
-
const { recurring: r } =
|
|
250
|
-
() =>
|
|
251
|
-
[t,
|
|
252
|
-
),
|
|
249
|
+
const { recurring: r } = G(), { repeatingTransactions: d } = _(), [f, m] = h.useState(!1), c = h.useMemo(
|
|
250
|
+
() => d.find((D) => D.guid === t.repeatingTransactionGuid),
|
|
251
|
+
[t, d]
|
|
252
|
+
), l = t.type === A.Income, g = t.status === x.Paid, b = t.status === x.Missed, T = t.status === x.Upcoming;
|
|
253
253
|
let y = r.paid?.toLowerCase();
|
|
254
|
-
return
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
|
|
254
|
+
return b ? y = r.missed?.toLowerCase() : T && (y = o ? Ie(r, c || {}, !0) : Ie(r, c || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
255
|
+
/* @__PURE__ */ i(Le, { disableGutters: !0, disablePadding: !0, children: [
|
|
256
|
+
/* @__PURE__ */ i(ut, { onClick: () => {
|
|
257
|
+
m(!0), a(t);
|
|
258
258
|
}, children: [
|
|
259
|
-
/* @__PURE__ */ e(
|
|
260
|
-
|
|
259
|
+
/* @__PURE__ */ e(dt, { children: /* @__PURE__ */ e(
|
|
260
|
+
me,
|
|
261
261
|
{
|
|
262
262
|
categoryGuid: t.categoryGuid,
|
|
263
263
|
merchantGuid: t.merchantGuid
|
|
264
264
|
}
|
|
265
265
|
) }),
|
|
266
|
-
/* @__PURE__ */ e(
|
|
267
|
-
|
|
266
|
+
/* @__PURE__ */ e(lt, { children: /* @__PURE__ */ i(
|
|
267
|
+
s,
|
|
268
268
|
{
|
|
269
269
|
direction: "row",
|
|
270
270
|
gap: 4,
|
|
271
271
|
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
272
272
|
children: [
|
|
273
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ i(s, { direction: "column", width: "50%", children: [
|
|
274
274
|
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: t.name }),
|
|
275
|
-
/* @__PURE__ */ e(
|
|
275
|
+
/* @__PURE__ */ e(s, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ i(s, { direction: "row", gap: 4, children: [
|
|
276
276
|
yt(t),
|
|
277
|
-
/* @__PURE__ */ e(p, { variant: "caption", children:
|
|
278
|
-
] }) : /* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: Tt(t, r) })
|
|
278
|
+
] }) : /* @__PURE__ */ i(j, { children: [
|
|
279
279
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
280
|
-
|
|
280
|
+
Xe,
|
|
281
281
|
{
|
|
282
282
|
alt: t.institutionName,
|
|
283
283
|
institutionGuid: t.institutionGuid,
|
|
@@ -287,13 +287,13 @@ const Z = {
|
|
|
287
287
|
/* @__PURE__ */ e(p, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
|
|
288
288
|
] }) })
|
|
289
289
|
] }),
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
|
|
293
|
-
|
|
290
|
+
/* @__PURE__ */ i(s, { alignItems: "flex-end", width: "100%", children: [
|
|
291
|
+
/* @__PURE__ */ i(p, { bold: !0, color: l ? "success.main" : "text.primary", variant: "body1", children: [
|
|
292
|
+
l ? "+" : "",
|
|
293
|
+
M(t.amount, "0,0.00")
|
|
294
294
|
] }),
|
|
295
|
-
!n && /* @__PURE__ */
|
|
296
|
-
|
|
295
|
+
!n && /* @__PURE__ */ i(
|
|
296
|
+
s,
|
|
297
297
|
{
|
|
298
298
|
direction: "row",
|
|
299
299
|
sx: {
|
|
@@ -304,8 +304,8 @@ const Z = {
|
|
|
304
304
|
width: "100%"
|
|
305
305
|
},
|
|
306
306
|
children: [
|
|
307
|
-
|
|
308
|
-
|
|
307
|
+
g && /* @__PURE__ */ e(Ne, { color: "success", filled: !0, size: 12 }),
|
|
308
|
+
b && /* @__PURE__ */ e(Me, { color: "error", filled: !0, size: 12 }),
|
|
309
309
|
/* @__PURE__ */ e(p, { bold: !0, color: "text.secondary", variant: "caption", children: y })
|
|
310
310
|
]
|
|
311
311
|
}
|
|
@@ -316,360 +316,638 @@ const Z = {
|
|
|
316
316
|
) })
|
|
317
317
|
] }),
|
|
318
318
|
/* @__PURE__ */ e(
|
|
319
|
-
|
|
319
|
+
Ee,
|
|
320
320
|
{
|
|
321
321
|
ariaLabelClose: r.close_drawer_aria,
|
|
322
|
-
isOpen:
|
|
323
|
-
onClose: () =>
|
|
324
|
-
title: t.type ===
|
|
325
|
-
children:
|
|
322
|
+
isOpen: f,
|
|
323
|
+
onClose: () => m(!1),
|
|
324
|
+
title: t.type === A.Income ? r.income_details : r.expense_details,
|
|
325
|
+
children: c && /* @__PURE__ */ e(
|
|
326
326
|
mt,
|
|
327
327
|
{
|
|
328
|
-
onDeleted: () =>
|
|
329
|
-
recurringTransaction:
|
|
328
|
+
onDeleted: () => m(!1),
|
|
329
|
+
recurringTransaction: c
|
|
330
330
|
}
|
|
331
331
|
)
|
|
332
332
|
}
|
|
333
333
|
)
|
|
334
334
|
] });
|
|
335
|
-
}, H =
|
|
335
|
+
}, H = R(
|
|
336
336
|
({
|
|
337
337
|
recurrences: t,
|
|
338
338
|
isMini: n = !1,
|
|
339
|
-
onResetClick:
|
|
340
|
-
onRecurrenceClick:
|
|
339
|
+
onResetClick: a,
|
|
340
|
+
onRecurrenceClick: o,
|
|
341
341
|
sx: r = {},
|
|
342
|
-
title:
|
|
342
|
+
title: d
|
|
343
343
|
}) => {
|
|
344
|
-
const { recurring:
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
344
|
+
const { recurring: f } = G(), m = h.useMemo(() => it(t), [t]);
|
|
345
|
+
console.log(t, "recurrences"), console.log(m, "grouped recurrences");
|
|
346
|
+
const c = [
|
|
347
|
+
{
|
|
348
|
+
date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
349
|
+
id: "date-2025-10-01",
|
|
350
|
+
recurrences: [
|
|
351
|
+
{
|
|
352
|
+
accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
|
|
353
|
+
amount: 73,
|
|
354
|
+
categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
355
|
+
expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
356
|
+
frequency: 3,
|
|
357
|
+
institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
|
|
358
|
+
institutionName: "Gringotts Mortgage *1568",
|
|
359
|
+
merchantGuid: "",
|
|
360
|
+
name: "Interest Charge",
|
|
361
|
+
recurrenceDay: 1,
|
|
362
|
+
repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
|
|
363
|
+
secondRecurrenceDay: 15,
|
|
364
|
+
status: 2,
|
|
365
|
+
type: 0
|
|
366
|
+
}
|
|
367
|
+
]
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
371
|
+
id: "date-2025-10-02",
|
|
372
|
+
recurrences: [
|
|
373
|
+
{
|
|
374
|
+
accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
|
|
375
|
+
amount: 73,
|
|
376
|
+
categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
377
|
+
expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
378
|
+
frequency: 3,
|
|
379
|
+
institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
|
|
380
|
+
institutionName: "Gringotts Mortgage *1568",
|
|
381
|
+
merchantGuid: "",
|
|
382
|
+
name: "Interest Charge",
|
|
383
|
+
recurrenceDay: 1,
|
|
384
|
+
repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
|
|
385
|
+
secondRecurrenceDay: 15,
|
|
386
|
+
status: 2,
|
|
387
|
+
type: 0
|
|
388
|
+
}
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
393
|
+
id: "date-2025-10-03",
|
|
394
|
+
recurrences: [
|
|
395
|
+
{
|
|
396
|
+
accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
|
|
397
|
+
amount: 73,
|
|
398
|
+
categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
399
|
+
expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
400
|
+
frequency: 3,
|
|
401
|
+
institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
|
|
402
|
+
institutionName: "Gringotts Mortgage *1568",
|
|
403
|
+
merchantGuid: "",
|
|
404
|
+
name: "Interest Charge",
|
|
405
|
+
recurrenceDay: 1,
|
|
406
|
+
repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
|
|
407
|
+
secondRecurrenceDay: 15,
|
|
408
|
+
status: 2,
|
|
409
|
+
type: 0
|
|
410
|
+
}
|
|
411
|
+
]
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
415
|
+
id: "date-2025-10-04",
|
|
416
|
+
recurrences: [
|
|
417
|
+
{
|
|
418
|
+
accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
|
|
419
|
+
amount: 73,
|
|
420
|
+
categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
421
|
+
expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
422
|
+
frequency: 3,
|
|
423
|
+
institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
|
|
424
|
+
institutionName: "Gringotts Mortgage *1568",
|
|
425
|
+
merchantGuid: "",
|
|
426
|
+
name: "Interest Charge",
|
|
427
|
+
recurrenceDay: 1,
|
|
428
|
+
repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
|
|
429
|
+
secondRecurrenceDay: 15,
|
|
430
|
+
status: 2,
|
|
431
|
+
type: 0
|
|
432
|
+
}
|
|
433
|
+
]
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
437
|
+
id: "date-2025-10-05",
|
|
438
|
+
recurrences: [
|
|
439
|
+
{
|
|
440
|
+
accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
|
|
441
|
+
amount: 73,
|
|
442
|
+
categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
443
|
+
expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
444
|
+
frequency: 3,
|
|
445
|
+
institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
|
|
446
|
+
institutionName: "Gringotts Mortgage *1568",
|
|
447
|
+
merchantGuid: "",
|
|
448
|
+
name: "Interest Charge",
|
|
449
|
+
recurrenceDay: 1,
|
|
450
|
+
repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
|
|
451
|
+
secondRecurrenceDay: 15,
|
|
452
|
+
status: 2,
|
|
453
|
+
type: 0
|
|
454
|
+
}
|
|
455
|
+
]
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
459
|
+
id: "date-2025-10-06",
|
|
460
|
+
recurrences: [
|
|
461
|
+
{
|
|
462
|
+
accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
|
|
463
|
+
amount: 73,
|
|
464
|
+
categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
465
|
+
expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
466
|
+
frequency: 3,
|
|
467
|
+
institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
|
|
468
|
+
institutionName: "Gringotts Mortgage *1568",
|
|
469
|
+
merchantGuid: "",
|
|
470
|
+
name: "Interest Charge",
|
|
471
|
+
recurrenceDay: 1,
|
|
472
|
+
repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
|
|
473
|
+
secondRecurrenceDay: 15,
|
|
474
|
+
status: 2,
|
|
475
|
+
type: 0
|
|
476
|
+
}
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
481
|
+
id: "date-2025-10-07",
|
|
482
|
+
recurrences: [
|
|
483
|
+
{
|
|
484
|
+
accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
|
|
485
|
+
amount: 73,
|
|
486
|
+
categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
487
|
+
expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
488
|
+
frequency: 3,
|
|
489
|
+
institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
|
|
490
|
+
institutionName: "Gringotts Mortgage *1568",
|
|
491
|
+
merchantGuid: "",
|
|
492
|
+
name: "Interest Charge",
|
|
493
|
+
recurrenceDay: 1,
|
|
494
|
+
repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
|
|
495
|
+
secondRecurrenceDay: 15,
|
|
496
|
+
status: 2,
|
|
497
|
+
type: 0
|
|
498
|
+
}
|
|
499
|
+
]
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
503
|
+
id: "date-2025-10-08",
|
|
504
|
+
recurrences: [
|
|
505
|
+
{
|
|
506
|
+
accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
|
|
507
|
+
amount: 73,
|
|
508
|
+
categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
509
|
+
expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
510
|
+
frequency: 3,
|
|
511
|
+
institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
|
|
512
|
+
institutionName: "Gringotts Mortgage *1568",
|
|
513
|
+
merchantGuid: "",
|
|
514
|
+
name: "Interest Charge",
|
|
515
|
+
recurrenceDay: 1,
|
|
516
|
+
repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
|
|
517
|
+
secondRecurrenceDay: 15,
|
|
518
|
+
status: 2,
|
|
519
|
+
type: 0
|
|
520
|
+
}
|
|
521
|
+
]
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
525
|
+
id: "date-2025-10-09",
|
|
526
|
+
recurrences: [
|
|
527
|
+
{
|
|
528
|
+
accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
|
|
529
|
+
amount: 73,
|
|
530
|
+
categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
531
|
+
expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
532
|
+
frequency: 3,
|
|
533
|
+
institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
|
|
534
|
+
institutionName: "Gringotts Mortgage *1568",
|
|
535
|
+
merchantGuid: "",
|
|
536
|
+
name: "Interest Charge",
|
|
537
|
+
recurrenceDay: 1,
|
|
538
|
+
repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
|
|
539
|
+
secondRecurrenceDay: 15,
|
|
540
|
+
status: 2,
|
|
541
|
+
type: 0
|
|
542
|
+
}
|
|
543
|
+
]
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
547
|
+
id: "date-2025-10-10",
|
|
548
|
+
recurrences: [
|
|
549
|
+
{
|
|
550
|
+
accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
|
|
551
|
+
amount: 73,
|
|
552
|
+
categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
553
|
+
expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
554
|
+
frequency: 3,
|
|
555
|
+
institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
|
|
556
|
+
institutionName: "Gringotts Mortgage *1568",
|
|
557
|
+
merchantGuid: "",
|
|
558
|
+
name: "Interest Charge",
|
|
559
|
+
recurrenceDay: 1,
|
|
560
|
+
repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
|
|
561
|
+
secondRecurrenceDay: 15,
|
|
562
|
+
status: 2,
|
|
563
|
+
type: 0
|
|
564
|
+
}
|
|
565
|
+
]
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
569
|
+
id: "date-2025-10-11",
|
|
570
|
+
recurrences: [
|
|
571
|
+
{
|
|
572
|
+
accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
|
|
573
|
+
amount: 73,
|
|
574
|
+
categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
575
|
+
expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
576
|
+
frequency: 3,
|
|
577
|
+
institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
|
|
578
|
+
institutionName: "Gringotts Mortgage *1568",
|
|
579
|
+
merchantGuid: "",
|
|
580
|
+
name: "Interest Charge",
|
|
581
|
+
recurrenceDay: 1,
|
|
582
|
+
repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
|
|
583
|
+
secondRecurrenceDay: 15,
|
|
584
|
+
status: 2,
|
|
585
|
+
type: 0
|
|
586
|
+
}
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
591
|
+
id: "date-2025-10-12",
|
|
592
|
+
recurrences: [
|
|
593
|
+
{
|
|
594
|
+
accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
|
|
595
|
+
amount: 73,
|
|
596
|
+
categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
|
|
597
|
+
expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
|
|
598
|
+
frequency: 3,
|
|
599
|
+
institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
|
|
600
|
+
institutionName: "Gringotts Mortgage *1568",
|
|
601
|
+
merchantGuid: "",
|
|
602
|
+
name: "Interest Charge",
|
|
603
|
+
recurrenceDay: 1,
|
|
604
|
+
repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
|
|
605
|
+
secondRecurrenceDay: 15,
|
|
606
|
+
status: 2,
|
|
607
|
+
type: 0
|
|
608
|
+
}
|
|
609
|
+
]
|
|
610
|
+
}
|
|
611
|
+
];
|
|
612
|
+
return /* @__PURE__ */ i(s, { sx: { gap: 8, mt: 4, ...r }, children: [
|
|
613
|
+
d && /* @__PURE__ */ i(
|
|
614
|
+
s,
|
|
348
615
|
{
|
|
349
616
|
sx: { alignItems: "top", direction: "row", justifyContent: "space-between", px: 24 },
|
|
350
617
|
children: [
|
|
351
|
-
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children:
|
|
352
|
-
|
|
618
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: d }),
|
|
619
|
+
a && /* @__PURE__ */ e(ct, { onClick: a, sx: { mt: -12 }, variant: "text", children: f.reset })
|
|
353
620
|
]
|
|
354
621
|
}
|
|
355
622
|
),
|
|
356
|
-
|
|
623
|
+
c.length === 0 ? /* @__PURE__ */ e(p, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: f.no_activities }) : /* @__PURE__ */ e(we, { children: n ? t.map((l, g) => /* @__PURE__ */ i(h.Fragment, { children: [
|
|
357
624
|
/* @__PURE__ */ e(
|
|
358
625
|
_e,
|
|
359
626
|
{
|
|
360
627
|
isMini: n,
|
|
361
|
-
onRecurrenceClick:
|
|
362
|
-
recurrence:
|
|
628
|
+
onRecurrenceClick: o,
|
|
629
|
+
recurrence: l
|
|
363
630
|
}
|
|
364
631
|
),
|
|
365
632
|
/* @__PURE__ */ e(se, { sx: { mx: 24 } })
|
|
366
|
-
] }, `recurrence-${
|
|
633
|
+
] }, `recurrence-${g}`)) : c.map((l, g) => /* @__PURE__ */ i(h.Fragment, { children: [
|
|
367
634
|
/* @__PURE__ */ e(Le, { children: /* @__PURE__ */ e(
|
|
368
|
-
|
|
635
|
+
we,
|
|
369
636
|
{
|
|
370
|
-
subheader: /* @__PURE__ */ e(
|
|
637
|
+
subheader: /* @__PURE__ */ e(st, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: N(l.date, v.DAY_OF_WEEK_MONTH_DAY) }) }),
|
|
371
638
|
sx: { width: "100%" },
|
|
372
|
-
children:
|
|
639
|
+
children: l.recurrences.map((b, T) => /* @__PURE__ */ e(h.Fragment, { children: /* @__PURE__ */ e(
|
|
373
640
|
_e,
|
|
374
641
|
{
|
|
375
642
|
isMini: n,
|
|
376
|
-
onRecurrenceClick:
|
|
377
|
-
recurrence:
|
|
643
|
+
onRecurrenceClick: o,
|
|
644
|
+
recurrence: b
|
|
378
645
|
}
|
|
379
|
-
) }, `day-recurrence-${
|
|
646
|
+
) }, `day-recurrence-${T}`))
|
|
380
647
|
}
|
|
381
|
-
) },
|
|
648
|
+
) }, l.id),
|
|
382
649
|
/* @__PURE__ */ e(se, { sx: { mx: 24 } })
|
|
383
|
-
] }, `recurrence-${
|
|
650
|
+
] }, `recurrence-${g}`)) })
|
|
384
651
|
] });
|
|
385
652
|
}
|
|
386
|
-
),
|
|
387
|
-
({ expected: t, isExpense: n = !0, missed:
|
|
388
|
-
const
|
|
389
|
-
const
|
|
390
|
-
return
|
|
391
|
-
}, [
|
|
392
|
-
return /* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: `${r} (${
|
|
395
|
-
/* @__PURE__ */ e(p, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${
|
|
653
|
+
), Ae = R(
|
|
654
|
+
({ expected: t, isExpense: n = !0, missed: a, paid: o, title: r, total: d, upcoming: f }) => {
|
|
655
|
+
const m = fe(), { isSmallMobile: c } = he(), { recurring: l } = G(), g = h.useMemo(() => {
|
|
656
|
+
const b = [{ color: m.palette.success.main, percentage: `${o / t}` }];
|
|
657
|
+
return a && b.push({ color: m.palette.error.main, percentage: `${a / t}` }), b;
|
|
658
|
+
}, [o, t, a]);
|
|
659
|
+
return /* @__PURE__ */ i(s, { children: [
|
|
660
|
+
/* @__PURE__ */ i(s, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
661
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: `${r} (${d})` }),
|
|
662
|
+
/* @__PURE__ */ e(p, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${M(t, "0,0.00")}` })
|
|
396
663
|
] }),
|
|
397
|
-
/* @__PURE__ */ e(
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
/* @__PURE__ */ e(
|
|
400
|
-
!
|
|
401
|
-
/* @__PURE__ */ e(p, { variant: "caption", children:
|
|
402
|
-
|
|
403
|
-
/* @__PURE__ */ e(
|
|
404
|
-
!
|
|
405
|
-
/* @__PURE__ */ e(p, { variant: "caption", children:
|
|
664
|
+
/* @__PURE__ */ e(Oe, { data: g, height: 12 }),
|
|
665
|
+
/* @__PURE__ */ i(s, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
666
|
+
/* @__PURE__ */ e(P, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
667
|
+
!c && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: M(o, "0,0.00") }),
|
|
668
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: l.paid?.toLowerCase() }),
|
|
669
|
+
a !== void 0 && /* @__PURE__ */ i(j, { children: [
|
|
670
|
+
/* @__PURE__ */ e(P, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
671
|
+
!c && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: M(a, "0,0.00") }),
|
|
672
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: l.missed?.toLowerCase() })
|
|
406
673
|
] }),
|
|
407
|
-
/* @__PURE__ */ e(
|
|
408
|
-
!
|
|
409
|
-
/* @__PURE__ */ e(p, { variant: "caption", children:
|
|
674
|
+
/* @__PURE__ */ e(P, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
675
|
+
!c && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: M(f, "0,0.00") }),
|
|
676
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: l.upcoming })
|
|
410
677
|
] })
|
|
411
678
|
] });
|
|
412
679
|
}
|
|
413
|
-
),
|
|
414
|
-
const { recurring: t } =
|
|
415
|
-
currentMonthExpenses:
|
|
416
|
-
currentMonthIncome:
|
|
417
|
-
dateRange:
|
|
418
|
-
expenseTotal:
|
|
419
|
-
incomeTotal:
|
|
420
|
-
missedExpenseTotal:
|
|
421
|
-
pastRecurrences:
|
|
422
|
-
paidExpenseTotal:
|
|
423
|
-
paidIncomeTotal:
|
|
424
|
-
selectedDay:
|
|
425
|
-
selectedDayRecurrences:
|
|
426
|
-
setDateRange:
|
|
427
|
-
upcomingExpenseTotal:
|
|
428
|
-
upcomingIncomeTotal:
|
|
680
|
+
), Ct = R(() => {
|
|
681
|
+
const { recurring: t } = G(), { availableWidth: n } = ve(), { isDesktop: a, isSmallMobile: o } = he(n), { onEvent: r } = V(), {
|
|
682
|
+
currentMonthExpenses: d,
|
|
683
|
+
currentMonthIncome: f,
|
|
684
|
+
dateRange: m,
|
|
685
|
+
expenseTotal: c,
|
|
686
|
+
incomeTotal: l,
|
|
687
|
+
missedExpenseTotal: g,
|
|
688
|
+
pastRecurrences: b,
|
|
689
|
+
paidExpenseTotal: T,
|
|
690
|
+
paidIncomeTotal: y,
|
|
691
|
+
selectedDay: u,
|
|
692
|
+
selectedDayRecurrences: D,
|
|
693
|
+
setDateRange: L,
|
|
694
|
+
upcomingExpenseTotal: Q,
|
|
695
|
+
upcomingIncomeTotal: ee,
|
|
429
696
|
upcomingRecurrences: B
|
|
430
|
-
} =
|
|
431
|
-
|
|
432
|
-
},
|
|
433
|
-
|
|
697
|
+
} = _(), [W, te] = h.useState(0), I = Ue(m.start, /* @__PURE__ */ new Date()), ne = (C, re) => {
|
|
698
|
+
te(re);
|
|
699
|
+
}, w = (C) => {
|
|
700
|
+
r(S.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
434
701
|
transaction_guid: C.transaction?.guid
|
|
435
702
|
});
|
|
436
|
-
},
|
|
437
|
-
|
|
703
|
+
}, U = (C) => {
|
|
704
|
+
r(S.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
438
705
|
transaction_guid: C.transaction?.guid
|
|
439
706
|
});
|
|
440
|
-
},
|
|
441
|
-
const C = ze(
|
|
442
|
-
|
|
707
|
+
}, ae = () => {
|
|
708
|
+
const C = ze(m.start, 1);
|
|
709
|
+
L({
|
|
443
710
|
start: k(C),
|
|
444
711
|
end: z(C)
|
|
445
712
|
});
|
|
446
|
-
},
|
|
447
|
-
const C = Be(
|
|
448
|
-
|
|
713
|
+
}, Z = () => {
|
|
714
|
+
const C = Be(m.start, 1);
|
|
715
|
+
L({
|
|
449
716
|
start: k(C),
|
|
450
717
|
end: z(C)
|
|
451
718
|
});
|
|
452
719
|
};
|
|
453
|
-
return /* @__PURE__ */
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
720
|
+
return /* @__PURE__ */ i(
|
|
721
|
+
oe,
|
|
722
|
+
{
|
|
723
|
+
container: !0,
|
|
724
|
+
sx: {
|
|
725
|
+
pt: 16,
|
|
726
|
+
px: a ? 48 : 24
|
|
727
|
+
},
|
|
728
|
+
children: [
|
|
729
|
+
/* @__PURE__ */ e(oe, { md: !0, sm: 12, width: "100%", children: /* @__PURE__ */ i(s, { sx: { gap: 16 }, children: [
|
|
730
|
+
/* @__PURE__ */ i(s, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
731
|
+
/* @__PURE__ */ e(Je, { children: O(
|
|
732
|
+
t.header_title,
|
|
733
|
+
N(m.start, v.MONTH_LONG)
|
|
734
|
+
) }),
|
|
735
|
+
!a && /* @__PURE__ */ i(s, { direction: "row", gap: 4, children: [
|
|
736
|
+
/* @__PURE__ */ e(
|
|
737
|
+
xe,
|
|
738
|
+
{
|
|
739
|
+
color: "primary",
|
|
740
|
+
disabled: I,
|
|
741
|
+
onClick: Z,
|
|
742
|
+
children: /* @__PURE__ */ e(Ke, {})
|
|
743
|
+
}
|
|
744
|
+
),
|
|
745
|
+
/* @__PURE__ */ e(xe, { color: "primary", onClick: ae, children: /* @__PURE__ */ e(Ye, {}) })
|
|
746
|
+
] })
|
|
747
|
+
] }),
|
|
461
748
|
/* @__PURE__ */ e(
|
|
462
|
-
|
|
749
|
+
Ae,
|
|
463
750
|
{
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
751
|
+
expected: c,
|
|
752
|
+
missed: g,
|
|
753
|
+
paid: T,
|
|
754
|
+
title: t.expenses,
|
|
755
|
+
total: d.length,
|
|
756
|
+
upcoming: Q
|
|
468
757
|
}
|
|
469
758
|
),
|
|
470
|
-
/* @__PURE__ */ e(be, { color: "primary", onClick: te, children: /* @__PURE__ */ e(Ve, {}) })
|
|
471
|
-
] })
|
|
472
|
-
] }),
|
|
473
|
-
/* @__PURE__ */ e(
|
|
474
|
-
we,
|
|
475
|
-
{
|
|
476
|
-
expected: g,
|
|
477
|
-
missed: m,
|
|
478
|
-
paid: x,
|
|
479
|
-
title: t.expenses,
|
|
480
|
-
total: r.length,
|
|
481
|
-
upcoming: W
|
|
482
|
-
}
|
|
483
|
-
),
|
|
484
|
-
/* @__PURE__ */ e(
|
|
485
|
-
we,
|
|
486
|
-
{
|
|
487
|
-
expected: s,
|
|
488
|
-
isExpense: !1,
|
|
489
|
-
paid: b,
|
|
490
|
-
title: t.deposits,
|
|
491
|
-
total: l.length,
|
|
492
|
-
upcoming: J
|
|
493
|
-
}
|
|
494
|
-
),
|
|
495
|
-
n && /* @__PURE__ */ e(
|
|
496
|
-
H,
|
|
497
|
-
{
|
|
498
|
-
onRecurrenceClick: U,
|
|
499
|
-
recurrences: B,
|
|
500
|
-
title: t.upcoming_activity
|
|
501
|
-
}
|
|
502
|
-
),
|
|
503
|
-
!n && /* @__PURE__ */ o(c, { children: [
|
|
504
|
-
/* @__PURE__ */ o(Fe, { onChange: I, value: $, variant: "fullWidth", children: [
|
|
505
759
|
/* @__PURE__ */ e(
|
|
506
|
-
|
|
760
|
+
Ae,
|
|
761
|
+
{
|
|
762
|
+
expected: l,
|
|
763
|
+
isExpense: !1,
|
|
764
|
+
paid: y,
|
|
765
|
+
title: t.deposits,
|
|
766
|
+
total: f.length,
|
|
767
|
+
upcoming: ee
|
|
768
|
+
}
|
|
769
|
+
),
|
|
770
|
+
a && /* @__PURE__ */ e(
|
|
771
|
+
H,
|
|
507
772
|
{
|
|
508
|
-
|
|
773
|
+
onRecurrenceClick: w,
|
|
774
|
+
recurrences: B,
|
|
775
|
+
title: t.upcoming_activity
|
|
509
776
|
}
|
|
510
777
|
),
|
|
778
|
+
!a && /* @__PURE__ */ i(s, { children: [
|
|
779
|
+
/* @__PURE__ */ i(Fe, { onChange: ne, value: W, variant: "fullWidth", children: [
|
|
780
|
+
/* @__PURE__ */ e(
|
|
781
|
+
Re,
|
|
782
|
+
{
|
|
783
|
+
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: o ? t.upcoming : t.upcoming_activity })
|
|
784
|
+
}
|
|
785
|
+
),
|
|
786
|
+
/* @__PURE__ */ e(
|
|
787
|
+
Re,
|
|
788
|
+
{
|
|
789
|
+
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: o ? t.past : t.past_transactions })
|
|
790
|
+
}
|
|
791
|
+
)
|
|
792
|
+
] }),
|
|
793
|
+
W === 0 && /* @__PURE__ */ e(
|
|
794
|
+
H,
|
|
795
|
+
{
|
|
796
|
+
onRecurrenceClick: w,
|
|
797
|
+
recurrences: B
|
|
798
|
+
}
|
|
799
|
+
),
|
|
800
|
+
W === 1 && /* @__PURE__ */ e(
|
|
801
|
+
H,
|
|
802
|
+
{
|
|
803
|
+
onRecurrenceClick: U,
|
|
804
|
+
recurrences: b
|
|
805
|
+
}
|
|
806
|
+
)
|
|
807
|
+
] })
|
|
808
|
+
] }) }),
|
|
809
|
+
a && /* @__PURE__ */ e(oe, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ i(s, { gap: 24, children: [
|
|
810
|
+
/* @__PURE__ */ e(Pe, {}),
|
|
511
811
|
/* @__PURE__ */ e(
|
|
512
|
-
|
|
812
|
+
H,
|
|
513
813
|
{
|
|
514
|
-
|
|
814
|
+
onRecurrenceClick: U,
|
|
815
|
+
recurrences: D || b,
|
|
816
|
+
title: u ? O(
|
|
817
|
+
t.day_transactions,
|
|
818
|
+
N(u, v.MONTH_DAY)
|
|
819
|
+
) : t.past_transactions
|
|
515
820
|
}
|
|
516
821
|
)
|
|
517
|
-
] })
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
}
|
|
524
|
-
),
|
|
525
|
-
$ === 1 && /* @__PURE__ */ e(
|
|
526
|
-
H,
|
|
527
|
-
{
|
|
528
|
-
onRecurrenceClick: _,
|
|
529
|
-
recurrences: f
|
|
530
|
-
}
|
|
531
|
-
)
|
|
532
|
-
] })
|
|
533
|
-
] }) }),
|
|
534
|
-
n && /* @__PURE__ */ e(oe, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ o(c, { gap: 24, children: [
|
|
535
|
-
/* @__PURE__ */ e(Ne, {}),
|
|
536
|
-
/* @__PURE__ */ e(
|
|
537
|
-
H,
|
|
538
|
-
{
|
|
539
|
-
onRecurrenceClick: _,
|
|
540
|
-
recurrences: d || f,
|
|
541
|
-
title: y ? N(
|
|
542
|
-
t.day_transactions,
|
|
543
|
-
A(y, E.MONTH_DAY)
|
|
544
|
-
) : t.past_transactions
|
|
545
|
-
}
|
|
546
|
-
)
|
|
547
|
-
] }) })
|
|
548
|
-
] });
|
|
549
|
-
}), _n = T(({ onBackClick: t, sx: n = {} }) => {
|
|
550
|
-
const { accounts: i } = pe(), { recurring: a } = D(), { isCopyLoaded: r, isInitialized: l, selectedAccountGuids: u, setSelectedAccounts: g } = V(), { isDataLoaded: s, loadRepeatingTransactions: m, setDateRange: f } = v(), { setFilter: x } = ge(), { onEvent: b } = X(), [y, d] = h.useState(!1);
|
|
822
|
+
] }) })
|
|
823
|
+
]
|
|
824
|
+
}
|
|
825
|
+
);
|
|
826
|
+
}), wn = R(({ onBackClick: t, sx: n = {} }) => {
|
|
827
|
+
const { accounts: a } = pe(), { recurring: o } = G(), { isCopyLoaded: r, isInitialized: d, selectedAccountGuids: f, setSelectedAccounts: m } = Y(), { isDataLoaded: c, loadRepeatingTransactions: l, setDateRange: g } = _(), { setFilter: b } = ge(), { onEvent: T } = V(), { isMobile: y } = he(), [u, D] = h.useState(!1);
|
|
551
828
|
return h.useEffect(() => {
|
|
552
|
-
|
|
553
|
-
}, [
|
|
554
|
-
|
|
555
|
-
dateRange: { start:
|
|
556
|
-
accounts:
|
|
557
|
-
}),
|
|
558
|
-
}, [
|
|
559
|
-
|
|
829
|
+
m(a);
|
|
830
|
+
}, [a]), h.useEffect(() => {
|
|
831
|
+
d && (b({
|
|
832
|
+
dateRange: { start: le(ue(), 90), end: de() },
|
|
833
|
+
accounts: f
|
|
834
|
+
}), g({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), l().finally());
|
|
835
|
+
}, [d]), r ? /* @__PURE__ */ i(
|
|
836
|
+
ot,
|
|
560
837
|
{
|
|
561
|
-
accountOptions:
|
|
838
|
+
accountOptions: a,
|
|
562
839
|
actions: [
|
|
563
840
|
{
|
|
564
|
-
label:
|
|
841
|
+
label: o.action_title,
|
|
565
842
|
iconName: "credit_card_gear",
|
|
566
843
|
onClick: () => {
|
|
567
|
-
|
|
844
|
+
D(!0), T(S.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
568
845
|
}
|
|
569
846
|
}
|
|
570
847
|
],
|
|
571
|
-
|
|
848
|
+
hasDivider: y,
|
|
849
|
+
onAccountsFilterClick: () => T(S.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
572
850
|
onBackClick: t,
|
|
573
851
|
sx: n,
|
|
574
|
-
title:
|
|
852
|
+
title: o.title,
|
|
575
853
|
children: [
|
|
576
|
-
|
|
577
|
-
/* @__PURE__ */ e(
|
|
578
|
-
/* @__PURE__ */ e(
|
|
579
|
-
/* @__PURE__ */ e(
|
|
854
|
+
d && c ? /* @__PURE__ */ e(Ct, {}) : /* @__PURE__ */ i(s, { direction: "column", p: 48, spacing: 24, children: [
|
|
855
|
+
/* @__PURE__ */ e(ie, { height: 100, variant: "rounded", width: "100%" }),
|
|
856
|
+
/* @__PURE__ */ e(ie, { height: 100, variant: "rounded", width: "100%" }),
|
|
857
|
+
/* @__PURE__ */ e(ie, { height: 600, variant: "rounded", width: "100%" })
|
|
580
858
|
] }),
|
|
581
859
|
/* @__PURE__ */ e(
|
|
582
|
-
|
|
860
|
+
Ee,
|
|
583
861
|
{
|
|
584
|
-
ariaLabelClose:
|
|
585
|
-
isOpen:
|
|
586
|
-
onClose: () =>
|
|
862
|
+
ariaLabelClose: o.close_drawer_aria,
|
|
863
|
+
isOpen: u,
|
|
864
|
+
onClose: () => D(!1),
|
|
587
865
|
shouldShowHeaderBorders: !1,
|
|
588
|
-
title:
|
|
866
|
+
title: o.action_title,
|
|
589
867
|
children: /* @__PURE__ */ e(He, {})
|
|
590
868
|
}
|
|
591
869
|
)
|
|
592
870
|
]
|
|
593
871
|
}
|
|
594
|
-
) : /* @__PURE__ */ e(
|
|
595
|
-
}),
|
|
596
|
-
const { recurring: t } =
|
|
597
|
-
return /* @__PURE__ */
|
|
598
|
-
/* @__PURE__ */ e(
|
|
599
|
-
!
|
|
872
|
+
) : /* @__PURE__ */ e(q, {});
|
|
873
|
+
}), Dt = R(() => {
|
|
874
|
+
const { recurring: t } = G(), { availableWidth: n } = ve(), { selectedDay: a, selectedDayRecurrences: o, setSelectedDay: r, upcomingRecurrences: d } = _(), f = n < 750;
|
|
875
|
+
return /* @__PURE__ */ i(s, { flexDirection: f ? "column" : "row", width: "100%", children: [
|
|
876
|
+
/* @__PURE__ */ e(Pe, {}),
|
|
877
|
+
!f && /* @__PURE__ */ e(se, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
600
878
|
/* @__PURE__ */ e(
|
|
601
879
|
H,
|
|
602
880
|
{
|
|
603
881
|
isMini: !0,
|
|
604
|
-
onResetClick:
|
|
605
|
-
recurrences:
|
|
606
|
-
sx: { width:
|
|
607
|
-
title:
|
|
882
|
+
onResetClick: a ? () => r(a) : void 0,
|
|
883
|
+
recurrences: o || d.slice(0, 5),
|
|
884
|
+
sx: { width: f ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
885
|
+
title: a ? O(
|
|
608
886
|
t.day_transactions,
|
|
609
|
-
|
|
887
|
+
N(a, v.MONTH_DAY)
|
|
610
888
|
) : t.upcoming_activity
|
|
611
889
|
}
|
|
612
890
|
)
|
|
613
891
|
] });
|
|
614
|
-
}),
|
|
892
|
+
}), Sn = R(
|
|
615
893
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
616
|
-
const { accounts:
|
|
894
|
+
const { accounts: a } = pe(), { recurring: o } = G(), { setFilter: r } = ge(), { isDataLoaded: d, loadRepeatingTransactions: f } = _(), { isCopyLoaded: m, isInitialized: c, setSelectedAccounts: l, selectedAccountGuids: g } = Y();
|
|
617
895
|
return h.useEffect(() => {
|
|
618
|
-
|
|
619
|
-
}, [
|
|
620
|
-
|
|
621
|
-
dateRange: { start:
|
|
622
|
-
accounts:
|
|
623
|
-
}),
|
|
624
|
-
}, [
|
|
625
|
-
|
|
896
|
+
c && l(a);
|
|
897
|
+
}, [c]), h.useEffect(() => {
|
|
898
|
+
g.length > 0 && (r({
|
|
899
|
+
dateRange: { start: le(ue(), 90), end: de() },
|
|
900
|
+
accounts: g
|
|
901
|
+
}), f().finally());
|
|
902
|
+
}, [g]), !m || !c ? /* @__PURE__ */ e(q, {}) : /* @__PURE__ */ e(
|
|
903
|
+
ft,
|
|
626
904
|
{
|
|
627
905
|
className: "mx-exp-recurring-transactions-miniwidget",
|
|
628
906
|
onPrimaryCtaClick: t,
|
|
629
|
-
primaryCtaLabel:
|
|
630
|
-
subTitle:
|
|
907
|
+
primaryCtaLabel: o.primary_cta,
|
|
908
|
+
subTitle: o.sub_title,
|
|
631
909
|
sx: n,
|
|
632
|
-
title:
|
|
633
|
-
children:
|
|
910
|
+
title: o.mini_title,
|
|
911
|
+
children: d ? /* @__PURE__ */ e(Dt, {}) : /* @__PURE__ */ e(q, {})
|
|
634
912
|
}
|
|
635
913
|
);
|
|
636
914
|
}
|
|
637
|
-
),
|
|
915
|
+
), xt = ({
|
|
638
916
|
upcomingRecurrences: t,
|
|
639
917
|
maxLogos: n = 3
|
|
640
|
-
}) => /* @__PURE__ */ e(
|
|
641
|
-
|
|
918
|
+
}) => /* @__PURE__ */ e(s, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((a, o) => /* @__PURE__ */ e(
|
|
919
|
+
me,
|
|
642
920
|
{
|
|
643
|
-
categoryGuid:
|
|
644
|
-
merchantGuid:
|
|
921
|
+
categoryGuid: a.categoryGuid || "",
|
|
922
|
+
merchantGuid: a.merchantGuid || ""
|
|
645
923
|
},
|
|
646
|
-
`${
|
|
647
|
-
)) }),
|
|
924
|
+
`${a.categoryGuid}-${a.merchantGuid}-${o}`
|
|
925
|
+
)) }), Rt = ({
|
|
648
926
|
upcomingRecurrences: t,
|
|
649
927
|
logoSize: n = 32,
|
|
650
|
-
maxLogos:
|
|
928
|
+
maxLogos: a = 3
|
|
651
929
|
}) => {
|
|
652
|
-
const
|
|
930
|
+
const o = (r) => r * (n / 2);
|
|
653
931
|
return /* @__PURE__ */ e(
|
|
654
|
-
|
|
932
|
+
P,
|
|
655
933
|
{
|
|
656
934
|
sx: {
|
|
657
935
|
position: "relative",
|
|
658
936
|
width: 64
|
|
659
937
|
},
|
|
660
|
-
children: t.map((r,
|
|
661
|
-
|
|
938
|
+
children: t.map((r, d) => d < a ? /* @__PURE__ */ e(
|
|
939
|
+
P,
|
|
662
940
|
{
|
|
663
941
|
sx: {
|
|
664
942
|
borderRadius: "4px",
|
|
665
|
-
left:
|
|
943
|
+
left: o(d),
|
|
666
944
|
outlineColor: "common.white",
|
|
667
945
|
outlineStyle: "solid",
|
|
668
946
|
outlineWidth: 2,
|
|
669
947
|
position: "absolute"
|
|
670
948
|
},
|
|
671
949
|
children: /* @__PURE__ */ e(
|
|
672
|
-
|
|
950
|
+
me,
|
|
673
951
|
{
|
|
674
952
|
categoryGuid: r.categoryGuid || "",
|
|
675
953
|
merchantGuid: r.merchantGuid || "",
|
|
@@ -677,19 +955,19 @@ const Z = {
|
|
|
677
955
|
}
|
|
678
956
|
)
|
|
679
957
|
},
|
|
680
|
-
`${r.categoryGuid}-${r.merchantGuid}-${
|
|
958
|
+
`${r.categoryGuid}-${r.merchantGuid}-${d}`
|
|
681
959
|
) : null)
|
|
682
960
|
}
|
|
683
961
|
);
|
|
684
|
-
},
|
|
962
|
+
}, Gt = ({
|
|
685
963
|
amount: t,
|
|
686
964
|
bgcolor: n,
|
|
687
|
-
isLargeScreen:
|
|
688
|
-
isSmallScreen:
|
|
965
|
+
isLargeScreen: a,
|
|
966
|
+
isSmallScreen: o,
|
|
689
967
|
label: r
|
|
690
|
-
}) => /* @__PURE__ */
|
|
968
|
+
}) => /* @__PURE__ */ i(s, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
691
969
|
/* @__PURE__ */ e(
|
|
692
|
-
|
|
970
|
+
P,
|
|
693
971
|
{
|
|
694
972
|
sx: {
|
|
695
973
|
borderRadius: "2px",
|
|
@@ -699,110 +977,110 @@ const Z = {
|
|
|
699
977
|
}
|
|
700
978
|
}
|
|
701
979
|
),
|
|
702
|
-
/* @__PURE__ */
|
|
703
|
-
!
|
|
980
|
+
/* @__PURE__ */ i(s, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
981
|
+
!o && /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: M(t, t === 0 || !a ? "0,0" : "0,0.00") }),
|
|
704
982
|
/* @__PURE__ */ e(p, { variant: "caption", children: r })
|
|
705
983
|
] })
|
|
706
|
-
] }), It =
|
|
707
|
-
const { recurring: t } =
|
|
708
|
-
return /* @__PURE__ */
|
|
709
|
-
/* @__PURE__ */ e(
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
-
/* @__PURE__ */ e(
|
|
712
|
-
/* @__PURE__ */ e(
|
|
984
|
+
] }), It = R(() => {
|
|
985
|
+
const { recurring: t } = G();
|
|
986
|
+
return /* @__PURE__ */ i(s, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
987
|
+
/* @__PURE__ */ e(Ve, { size: 32 }),
|
|
988
|
+
/* @__PURE__ */ i(s, { children: [
|
|
989
|
+
/* @__PURE__ */ e(ce, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
990
|
+
/* @__PURE__ */ e(ce, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
713
991
|
] })
|
|
714
992
|
] });
|
|
715
|
-
}),
|
|
993
|
+
}), _n = R(
|
|
716
994
|
({ onCTAClick: t }) => {
|
|
717
|
-
const [n,
|
|
718
|
-
loadRepeatingTransactions:
|
|
995
|
+
const [n, a] = h.useState(!1), { onEvent: o } = V(), r = fe(), { accounts: d } = pe(), [f, { width: m }] = pt(), { isCopyLoaded: c, isInitialized: l, selectedAccountGuids: g, setSelectedAccounts: b } = Y(), {
|
|
996
|
+
loadRepeatingTransactions: T,
|
|
719
997
|
upcomingRecurrences: y,
|
|
720
|
-
expenseTotal:
|
|
721
|
-
missedExpenseTotal:
|
|
722
|
-
paidExpenseTotal:
|
|
723
|
-
repeatingTransactions:
|
|
724
|
-
setDateRange:
|
|
725
|
-
upcomingExpenseTotal:
|
|
726
|
-
isDataLoaded:
|
|
727
|
-
} =
|
|
998
|
+
expenseTotal: u,
|
|
999
|
+
missedExpenseTotal: D,
|
|
1000
|
+
paidExpenseTotal: L,
|
|
1001
|
+
repeatingTransactions: Q,
|
|
1002
|
+
setDateRange: ee,
|
|
1003
|
+
upcomingExpenseTotal: B,
|
|
1004
|
+
isDataLoaded: W
|
|
1005
|
+
} = _(), { setFilter: te } = ge(), { recurring: I, budgets: ne } = G();
|
|
728
1006
|
h.useEffect(() => {
|
|
729
|
-
|
|
1007
|
+
b(d);
|
|
1008
|
+
}, [d]), h.useEffect(() => {
|
|
1009
|
+
l && (te({
|
|
1010
|
+
dateRange: { start: le(ue(), 90), end: de() },
|
|
1011
|
+
accounts: g
|
|
1012
|
+
}), ee({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), T().finally(), a(!0));
|
|
730
1013
|
}, [l]), h.useEffect(() => {
|
|
731
|
-
|
|
732
|
-
dateRange: { start: de(le(), 90), end: ce() },
|
|
733
|
-
accounts: f
|
|
734
|
-
}), B({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), b().finally(), i(!0));
|
|
735
|
-
}, [m]), h.useEffect(() => {
|
|
736
|
-
n && a(w.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
1014
|
+
n && o(S.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
737
1015
|
state: y.length > 0 ? "default" : "zeroState"
|
|
738
1016
|
});
|
|
739
1017
|
}, [n]);
|
|
740
|
-
const
|
|
741
|
-
const
|
|
742
|
-
{ color: r.palette.success.main, percentage: `${
|
|
1018
|
+
const w = m <= 288, U = m >= 450, ae = h.useMemo(() => {
|
|
1019
|
+
const E = [
|
|
1020
|
+
{ color: r.palette.success.main, percentage: `${L / u}` }
|
|
743
1021
|
];
|
|
744
|
-
return
|
|
1022
|
+
return D && E.push({
|
|
745
1023
|
color: r.palette.error.main,
|
|
746
|
-
percentage: `${
|
|
747
|
-
}),
|
|
1024
|
+
percentage: `${D / u}`
|
|
1025
|
+
}), E;
|
|
748
1026
|
}, [
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
1027
|
+
L,
|
|
1028
|
+
u,
|
|
1029
|
+
D,
|
|
752
1030
|
r.palette.success.main,
|
|
753
1031
|
r.palette.error.main
|
|
754
|
-
]),
|
|
755
|
-
|
|
756
|
-
y.length > 0 ?
|
|
1032
|
+
]), Z = h.useMemo(() => M(u, u === 0 ? "0,0" : "0,0.00"), [u]), C = () => {
|
|
1033
|
+
o(
|
|
1034
|
+
y.length > 0 ? S.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : S.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
757
1035
|
), t();
|
|
758
1036
|
};
|
|
759
|
-
if (!
|
|
760
|
-
const
|
|
761
|
-
|
|
1037
|
+
if (!c || !n || !W) return /* @__PURE__ */ e(q, { height: 100 });
|
|
1038
|
+
const re = 32, ke = y.length > 0, We = () => ke ? w ? /* @__PURE__ */ e(
|
|
1039
|
+
Rt,
|
|
762
1040
|
{
|
|
763
|
-
logoSize:
|
|
1041
|
+
logoSize: re,
|
|
764
1042
|
maxLogos: 3,
|
|
765
1043
|
upcomingRecurrences: y.slice(0, 3)
|
|
766
1044
|
}
|
|
767
|
-
) : /* @__PURE__ */ e(
|
|
1045
|
+
) : /* @__PURE__ */ e(xt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(s, { sx: { width: w ? 64 : 104 } }), Ze = [
|
|
768
1046
|
{
|
|
769
|
-
amount:
|
|
1047
|
+
amount: L,
|
|
770
1048
|
bgColor: "success.main",
|
|
771
1049
|
label: I.paid
|
|
772
1050
|
},
|
|
773
1051
|
{
|
|
774
|
-
amount:
|
|
1052
|
+
amount: D,
|
|
775
1053
|
bgColor: "error.main",
|
|
776
1054
|
label: I.missed
|
|
777
1055
|
},
|
|
778
1056
|
{
|
|
779
|
-
amount:
|
|
1057
|
+
amount: B,
|
|
780
1058
|
bgColor: "border.light",
|
|
781
1059
|
label: I.upcoming
|
|
782
1060
|
}
|
|
783
|
-
],
|
|
1061
|
+
], De = !Q?.length;
|
|
784
1062
|
return /* @__PURE__ */ e(
|
|
785
|
-
|
|
1063
|
+
gt,
|
|
786
1064
|
{
|
|
787
1065
|
className: "mx-recurring-transaction-microwidget",
|
|
788
|
-
ctaLabel:
|
|
789
|
-
onCTAClick:
|
|
1066
|
+
ctaLabel: De ? ne.get_started_cta : I.primary_cta,
|
|
1067
|
+
onCTAClick: C,
|
|
790
1068
|
title: I.recurring_expenses,
|
|
791
|
-
children:
|
|
792
|
-
/* @__PURE__ */
|
|
793
|
-
|
|
1069
|
+
children: De ? /* @__PURE__ */ e(It, {}) : /* @__PURE__ */ i(j, { children: [
|
|
1070
|
+
/* @__PURE__ */ i(
|
|
1071
|
+
s,
|
|
794
1072
|
{
|
|
795
|
-
ref:
|
|
1073
|
+
ref: f,
|
|
796
1074
|
sx: {
|
|
797
1075
|
flexDirection: "row",
|
|
798
1076
|
justifyContent: "space-between"
|
|
799
1077
|
},
|
|
800
1078
|
children: [
|
|
801
|
-
/* @__PURE__ */
|
|
802
|
-
|
|
1079
|
+
/* @__PURE__ */ i(
|
|
1080
|
+
s,
|
|
803
1081
|
{
|
|
804
1082
|
sx: [
|
|
805
|
-
|
|
1083
|
+
Z.length >= 10 && w ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
|
|
806
1084
|
{
|
|
807
1085
|
alignItems: "baseline",
|
|
808
1086
|
overflow: "hidden",
|
|
@@ -815,12 +1093,12 @@ const Z = {
|
|
|
815
1093
|
p,
|
|
816
1094
|
{
|
|
817
1095
|
sx: { width: "100%" },
|
|
818
|
-
variant:
|
|
819
|
-
children:
|
|
1096
|
+
variant: Z.length >= 10 && w ? "H3" : "H2",
|
|
1097
|
+
children: Z
|
|
820
1098
|
}
|
|
821
1099
|
),
|
|
822
1100
|
/* @__PURE__ */ e(
|
|
823
|
-
|
|
1101
|
+
ce,
|
|
824
1102
|
{
|
|
825
1103
|
sx: {
|
|
826
1104
|
pr: 12
|
|
@@ -836,10 +1114,10 @@ const Z = {
|
|
|
836
1114
|
]
|
|
837
1115
|
}
|
|
838
1116
|
),
|
|
839
|
-
/* @__PURE__ */
|
|
840
|
-
/* @__PURE__ */ e(
|
|
1117
|
+
/* @__PURE__ */ i(s, { sx: { pt: 12 }, children: [
|
|
1118
|
+
/* @__PURE__ */ e(Oe, { data: ae }),
|
|
841
1119
|
/* @__PURE__ */ e(
|
|
842
|
-
|
|
1120
|
+
s,
|
|
843
1121
|
{
|
|
844
1122
|
sx: {
|
|
845
1123
|
alignItems: "center",
|
|
@@ -847,16 +1125,16 @@ const Z = {
|
|
|
847
1125
|
gap: 16,
|
|
848
1126
|
mt: 4
|
|
849
1127
|
},
|
|
850
|
-
children:
|
|
851
|
-
|
|
1128
|
+
children: Ze.map((E, $e) => /* @__PURE__ */ e(
|
|
1129
|
+
Gt,
|
|
852
1130
|
{
|
|
853
|
-
amount:
|
|
854
|
-
bgcolor:
|
|
855
|
-
isLargeScreen:
|
|
856
|
-
isSmallScreen:
|
|
857
|
-
label:
|
|
1131
|
+
amount: E.amount,
|
|
1132
|
+
bgcolor: E.bgColor,
|
|
1133
|
+
isLargeScreen: U,
|
|
1134
|
+
isSmallScreen: w,
|
|
1135
|
+
label: E.label
|
|
858
1136
|
},
|
|
859
|
-
`recurrence-legend-${
|
|
1137
|
+
`recurrence-legend-${$e}`
|
|
860
1138
|
))
|
|
861
1139
|
}
|
|
862
1140
|
)
|
|
@@ -868,12 +1146,12 @@ const Z = {
|
|
|
868
1146
|
);
|
|
869
1147
|
export {
|
|
870
1148
|
On as AddRecurringTransactionDetails,
|
|
871
|
-
|
|
872
|
-
|
|
1149
|
+
Nn as ManageExpenses,
|
|
1150
|
+
Pn as ManageIncome,
|
|
873
1151
|
He as RecurringSettings,
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
1152
|
+
_n as RecurringTransactionsMicroWidget,
|
|
1153
|
+
Sn as RecurringTransactionsMiniWidget,
|
|
1154
|
+
Ln as RecurringTransactionsStore,
|
|
1155
|
+
wn as RecurringTransactionsWidget,
|
|
1156
|
+
kn as SelectTransaction
|
|
879
1157
|
};
|