@mx-cartographer/experiences 9.0.15-alpha.al0 → 9.0.15-alpha.al1
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/dist/recurringtransactions/index.es.js +177 -165
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as B } from "react/jsx-runtime";
|
|
2
2
|
import x from "react";
|
|
3
3
|
import { observer as T } from "mobx-react-lite";
|
|
4
4
|
import { endOfMonth as z } from "date-fns/endOfMonth";
|
|
@@ -6,9 +6,9 @@ import { endOfToday as J } from "date-fns/endOfToday";
|
|
|
6
6
|
import { startOfMonth as k } from "date-fns/startOfMonth";
|
|
7
7
|
import { startOfToday as Q } from "date-fns/startOfToday";
|
|
8
8
|
import { subDays as ee } from "date-fns/subDays";
|
|
9
|
-
import
|
|
9
|
+
import Be from "@mui/material/Alert";
|
|
10
10
|
import Fe from "@mui/material/Snackbar";
|
|
11
|
-
import { R as
|
|
11
|
+
import { R as De } from "../RecurringSettings-BWlg0zsv.mjs";
|
|
12
12
|
import { M as Jn } from "../RecurringSettings-BWlg0zsv.mjs";
|
|
13
13
|
import { addMonths as Ue } from "date-fns/addMonths";
|
|
14
14
|
import { subMonths as Ye } from "date-fns/subMonths";
|
|
@@ -20,7 +20,7 @@ import fe from "@mui/material/Tab";
|
|
|
20
20
|
import Ke from "@mui/material/Tabs";
|
|
21
21
|
import { Cancel as Se, CheckCircle as we, Schedule as Ve, MonetizationOn as qe, ChevronLeft as Ze, ChevronRight as Xe, CurrencyExchange as Je } from "@mxenabled/mx-icons";
|
|
22
22
|
import { Text as h, MerchantLogo as te, InstitutionLogo as Qe, H3 as et, H2 as tt, P as Z } from "@mxenabled/mxui";
|
|
23
|
-
import { g as nt, L as O, b as
|
|
23
|
+
import { g as nt, L as O, b as G } from "../Localization-DnoVyBNK.mjs";
|
|
24
24
|
import { getWeeksInMonth as xe } from "date-fns/getWeeksInMonth";
|
|
25
25
|
import { enCA as rt } from "date-fns/locale/en-CA";
|
|
26
26
|
import { enUS as be } from "date-fns/locale/en-US";
|
|
@@ -35,8 +35,8 @@ import { isSameDay as dt } from "date-fns/isSameDay";
|
|
|
35
35
|
import ut from "@mui/material/Badge";
|
|
36
36
|
import { PickersDay as mt } from "@mui/x-date-pickers/PickersDay";
|
|
37
37
|
import { I as F } from "../IconBacking-DgT8DCeh.mjs";
|
|
38
|
-
import { u as b, a as U, h as
|
|
39
|
-
import { b as E, a as
|
|
38
|
+
import { u as b, a as U, h as D, f as Y, D as Ie, g as re } from "../hooks-97sNJ_lf.mjs";
|
|
39
|
+
import { b as E, a as _, g as ye, e as pt, R as gt } from "../RecurringTransactionsUtil-CHWmqvW5.mjs";
|
|
40
40
|
import { f as I, D as M } from "../DateFormats-HudZ3Bjs.mjs";
|
|
41
41
|
import { T as W } from "../Sizes-DISGrlUg.mjs";
|
|
42
42
|
import { A as v } from "../Analytics-WeZYytR0.mjs";
|
|
@@ -49,7 +49,7 @@ import xt from "@mui/material/ListItemAvatar";
|
|
|
49
49
|
import bt from "@mui/material/ListItemButton";
|
|
50
50
|
import yt from "@mui/material/ListItemText";
|
|
51
51
|
import { f as L } from "../NumberFormatting--XMeeBfr.mjs";
|
|
52
|
-
import
|
|
52
|
+
import N from "@mui/material/Box";
|
|
53
53
|
import { u as ve } from "../useScreenSize-mWpmnh5w.mjs";
|
|
54
54
|
import { S as Le } from "../StatusBar-CPfSXe80.mjs";
|
|
55
55
|
import { d as Ct } from "../ManageIncome-Dn9Y3Z2U.mjs";
|
|
@@ -60,8 +60,8 @@ import { u as oe } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
|
60
60
|
import { L as ae } from "../Loader-CxeBwuPG.mjs";
|
|
61
61
|
import { W as Rt } from "../WidgetContainer-DJnp6t6c.mjs";
|
|
62
62
|
import { M as Tt } from "../MiniWidgetContainer-Bmv_WeUd.mjs";
|
|
63
|
-
import { u as
|
|
64
|
-
import { M as
|
|
63
|
+
import { u as _t } from "../useDimensions-CeDR9V8N.mjs";
|
|
64
|
+
import { M as Dt } from "../MicroWidgetContainer-B2NnKBgW.mjs";
|
|
65
65
|
const j = {
|
|
66
66
|
gridRow: 1,
|
|
67
67
|
gridColumn: 1,
|
|
@@ -106,18 +106,18 @@ const j = {
|
|
|
106
106
|
}
|
|
107
107
|
), St = T(
|
|
108
108
|
({ day: t, outsideCurrentMonth: n, ...r }) => {
|
|
109
|
-
const { recurring: i } = b(), { selectedAccountGuids: o } = U(), { recurrences:
|
|
110
|
-
() =>
|
|
111
|
-
[o,
|
|
109
|
+
const { recurring: i } = b(), { selectedAccountGuids: o } = U(), { recurrences: s, setSelectedDay: m } = D(), a = x.useMemo(
|
|
110
|
+
() => s.filter((f) => o.includes(f.accountGuid)),
|
|
111
|
+
[o, s]
|
|
112
112
|
).filter(
|
|
113
113
|
(f) => dt(f.occurredOnDate || f.expectedDate, t)
|
|
114
|
-
), l =
|
|
115
|
-
(f) => f.type !== E.Income && f.status ===
|
|
116
|
-
), u =
|
|
117
|
-
(f) => f.type !== E.Income && f.status ===
|
|
118
|
-
), g =
|
|
119
|
-
(f) => f.type !== E.Income && f.status ===
|
|
120
|
-
), y =
|
|
114
|
+
), l = a.some(
|
|
115
|
+
(f) => f.type !== E.Income && f.status === _.Upcoming
|
|
116
|
+
), u = a.some(
|
|
117
|
+
(f) => f.type !== E.Income && f.status === _.Missed
|
|
118
|
+
), g = a.some(
|
|
119
|
+
(f) => f.type !== E.Income && f.status === _.Paid
|
|
120
|
+
), y = a.some((f) => f.type === E.Income), C = (l ? 1 : 0) + (u ? 1 : 0) + (g ? 1 : 0) + (y ? 1 : 0), S = [
|
|
121
121
|
g && i.paid,
|
|
122
122
|
u && i.missed,
|
|
123
123
|
l && i.upcoming,
|
|
@@ -126,7 +126,7 @@ const j = {
|
|
|
126
126
|
return /* @__PURE__ */ e(
|
|
127
127
|
ut,
|
|
128
128
|
{
|
|
129
|
-
badgeContent:
|
|
129
|
+
badgeContent: a.length > 0 && /* @__PURE__ */ c(B, { children: [
|
|
130
130
|
u && /* @__PURE__ */ e(le, { isOffset: !0 }),
|
|
131
131
|
g && /* @__PURE__ */ e(de, { isOffset: !0 }),
|
|
132
132
|
l && /* @__PURE__ */ e(se, { isOffset: !0 }),
|
|
@@ -163,12 +163,12 @@ const j = {
|
|
|
163
163
|
}
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
|
-
),
|
|
166
|
+
), $ = ({ icon: t, label: n }) => /* @__PURE__ */ c(d, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
167
167
|
/* @__PURE__ */ e(t, {}),
|
|
168
168
|
/* @__PURE__ */ e(h, { variant: "caption", children: n })
|
|
169
169
|
] }), wt = T(() => {
|
|
170
170
|
const { recurring: t } = b();
|
|
171
|
-
return /* @__PURE__ */
|
|
171
|
+
return /* @__PURE__ */ c(
|
|
172
172
|
d,
|
|
173
173
|
{
|
|
174
174
|
alignItems: "center",
|
|
@@ -178,10 +178,10 @@ const j = {
|
|
|
178
178
|
justifyContent: "center",
|
|
179
179
|
mt: 12,
|
|
180
180
|
children: [
|
|
181
|
-
/* @__PURE__ */ e(
|
|
182
|
-
/* @__PURE__ */ e(
|
|
183
|
-
/* @__PURE__ */ e(
|
|
184
|
-
/* @__PURE__ */ e(
|
|
181
|
+
/* @__PURE__ */ e($, { icon: se, label: t.expense }),
|
|
182
|
+
/* @__PURE__ */ e($, { icon: ce, label: t.income }),
|
|
183
|
+
/* @__PURE__ */ e($, { icon: le, label: t.missed }),
|
|
184
|
+
/* @__PURE__ */ e($, { icon: de, label: t.paid })
|
|
185
185
|
]
|
|
186
186
|
}
|
|
187
187
|
);
|
|
@@ -195,14 +195,14 @@ const j = {
|
|
|
195
195
|
[O.ES]: it
|
|
196
196
|
}[t] || be;
|
|
197
197
|
}, Ee = T(() => {
|
|
198
|
-
const t = ne(), { onEvent: n } = Y(), { recurring: r } = b(), { selectedDay: i, setDateRange: o } =
|
|
198
|
+
const t = ne(), { onEvent: n } = Y(), { recurring: r } = b(), { selectedDay: i, setDateRange: o } = D(), [s, m] = x.useState(
|
|
199
199
|
xe(/* @__PURE__ */ new Date()) * W + Re
|
|
200
200
|
), p = (u) => {
|
|
201
201
|
m(xe(u) * W + Re), o({
|
|
202
202
|
start: k(u),
|
|
203
203
|
end: z(u)
|
|
204
|
-
}),
|
|
205
|
-
},
|
|
204
|
+
}), a(u), n(v.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
205
|
+
}, a = (u) => {
|
|
206
206
|
u && requestAnimationFrame(() => {
|
|
207
207
|
const g = document.getElementById("recurrence-list");
|
|
208
208
|
g?.setAttribute("tabindex", "-1"), g?.focus();
|
|
@@ -211,7 +211,7 @@ const j = {
|
|
|
211
211
|
ct,
|
|
212
212
|
{
|
|
213
213
|
minDate: k(/* @__PURE__ */ new Date()),
|
|
214
|
-
onChange:
|
|
214
|
+
onChange: a,
|
|
215
215
|
onMonthChange: p,
|
|
216
216
|
showDaysOutsideCurrentMonth: !0,
|
|
217
217
|
slots: {
|
|
@@ -241,10 +241,10 @@ const j = {
|
|
|
241
241
|
fontWeight: 600
|
|
242
242
|
},
|
|
243
243
|
"& .MuiDayCalendar-slideTransition": {
|
|
244
|
-
minHeight:
|
|
244
|
+
minHeight: s
|
|
245
245
|
},
|
|
246
246
|
"&.MuiDateCalendar-root": {
|
|
247
|
-
minHeight:
|
|
247
|
+
minHeight: s + W
|
|
248
248
|
},
|
|
249
249
|
"& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
|
|
250
250
|
height: W,
|
|
@@ -264,7 +264,7 @@ const j = {
|
|
|
264
264
|
views: ["day"]
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
|
-
return /* @__PURE__ */ e(d, { "aria-labelledby": "calendar-label", justifyContent: "center", role: "group", children: /* @__PURE__ */
|
|
267
|
+
return /* @__PURE__ */ e(d, { "aria-labelledby": "calendar-label", justifyContent: "center", role: "group", children: /* @__PURE__ */ c(lt, { adapterLocale: It(), dateAdapter: st, children: [
|
|
268
268
|
i && l,
|
|
269
269
|
!i && l,
|
|
270
270
|
/* @__PURE__ */ e(h, { id: "calendar-label", sx: { alignSelf: "center" }, variant: "body2", children: r.calendar_tooltip }),
|
|
@@ -274,30 +274,30 @@ const j = {
|
|
|
274
274
|
if (t.type === E.Income)
|
|
275
275
|
return /* @__PURE__ */ e(ce, {});
|
|
276
276
|
switch (t.status) {
|
|
277
|
-
case
|
|
277
|
+
case _.Missed:
|
|
278
278
|
return /* @__PURE__ */ e(le, {});
|
|
279
|
-
case
|
|
279
|
+
case _.Paid:
|
|
280
280
|
return /* @__PURE__ */ e(de, {});
|
|
281
281
|
default:
|
|
282
282
|
return /* @__PURE__ */ e(se, {});
|
|
283
283
|
}
|
|
284
284
|
}, vt = (t, n) => {
|
|
285
285
|
switch (t.status) {
|
|
286
|
-
case
|
|
287
|
-
return t.expectedDate ?
|
|
286
|
+
case _.Paid:
|
|
287
|
+
return t.expectedDate ? G(
|
|
288
288
|
n.paid_on,
|
|
289
289
|
I(
|
|
290
290
|
t.occurredOnDate || t.expectedDate,
|
|
291
291
|
M.MONTH_DAY
|
|
292
292
|
)
|
|
293
293
|
) : n.paid;
|
|
294
|
-
case
|
|
295
|
-
return
|
|
294
|
+
case _.Missed:
|
|
295
|
+
return G(
|
|
296
296
|
n.missed_on,
|
|
297
297
|
I(t.expectedDate, M.MONTH_DAY)
|
|
298
298
|
);
|
|
299
|
-
case
|
|
300
|
-
return
|
|
299
|
+
case _.Upcoming:
|
|
300
|
+
return G(
|
|
301
301
|
n.upcoming_on,
|
|
302
302
|
I(t.expectedDate, M.MONTH_DAY)
|
|
303
303
|
);
|
|
@@ -311,13 +311,13 @@ const j = {
|
|
|
311
311
|
},
|
|
312
312
|
showOrdinal: i = !1
|
|
313
313
|
}) => {
|
|
314
|
-
const { recurring: o } = b(), { detailedRepeatingTransactions:
|
|
315
|
-
() =>
|
|
316
|
-
[t,
|
|
317
|
-
), p = t.type === E.Income,
|
|
314
|
+
const { recurring: o } = b(), { detailedRepeatingTransactions: s } = D(), m = x.useMemo(
|
|
315
|
+
() => s.find((C) => C.guid === t.repeatingTransactionGuid),
|
|
316
|
+
[t, s]
|
|
317
|
+
), p = t.type === E.Income, a = t.status === _.Paid, l = t.status === _.Missed, u = t.status === _.Upcoming;
|
|
318
318
|
let g = o.paid?.toLowerCase();
|
|
319
319
|
return l ? g = o.missed?.toLowerCase() : u && (g = i ? ye(o, m || {}, !0) : ye(o, m || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
320
|
-
/* @__PURE__ */ e(Me, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ e(Me, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(bt, { onClick: () => {
|
|
321
321
|
r(t);
|
|
322
322
|
}, children: [
|
|
323
323
|
/* @__PURE__ */ e(xt, { children: /* @__PURE__ */ e(
|
|
@@ -327,23 +327,23 @@ const j = {
|
|
|
327
327
|
merchantGuid: t.merchantGuid
|
|
328
328
|
}
|
|
329
329
|
) }),
|
|
330
|
-
/* @__PURE__ */ e(yt, { children: /* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ e(yt, { children: /* @__PURE__ */ c(
|
|
331
331
|
d,
|
|
332
332
|
{
|
|
333
333
|
direction: "row",
|
|
334
334
|
gap: 4,
|
|
335
335
|
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
336
336
|
children: [
|
|
337
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ c(d, { direction: "column", width: "50%", children: [
|
|
338
338
|
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: t.name }),
|
|
339
|
-
/* @__PURE__ */ e(d, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ e(d, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ c(d, { direction: "row", gap: 4, children: [
|
|
340
340
|
Mt(t),
|
|
341
341
|
/* @__PURE__ */ e(h, { variant: "caption", children: vt(t, o) })
|
|
342
|
-
] }) : /* @__PURE__ */
|
|
342
|
+
] }) : /* @__PURE__ */ c(B, { children: [
|
|
343
343
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
344
344
|
Qe,
|
|
345
345
|
{
|
|
346
|
-
alt:
|
|
346
|
+
alt: "",
|
|
347
347
|
institutionGuid: t.institutionGuid,
|
|
348
348
|
size: 12
|
|
349
349
|
}
|
|
@@ -351,12 +351,12 @@ const j = {
|
|
|
351
351
|
/* @__PURE__ */ e(h, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
|
|
352
352
|
] }) })
|
|
353
353
|
] }),
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ c(d, { alignItems: "flex-end", width: "100%", children: [
|
|
355
|
+
/* @__PURE__ */ c(h, { bold: !0, color: p ? "success.main" : "text.primary", variant: "body1", children: [
|
|
356
356
|
p ? "+" : "",
|
|
357
357
|
L(t.amount, "0,0.00")
|
|
358
358
|
] }),
|
|
359
|
-
!n && /* @__PURE__ */
|
|
359
|
+
!n && /* @__PURE__ */ c(
|
|
360
360
|
d,
|
|
361
361
|
{
|
|
362
362
|
direction: "row",
|
|
@@ -368,7 +368,7 @@ const j = {
|
|
|
368
368
|
width: "100%"
|
|
369
369
|
},
|
|
370
370
|
children: [
|
|
371
|
-
|
|
371
|
+
a && /* @__PURE__ */ e(we, { color: "success", filled: !0, size: 12 }),
|
|
372
372
|
l && /* @__PURE__ */ e(Se, { color: "error", filled: !0, size: 12 }),
|
|
373
373
|
/* @__PURE__ */ e(h, { bold: !0, color: "text.secondary", variant: "caption", children: g })
|
|
374
374
|
]
|
|
@@ -386,11 +386,11 @@ const j = {
|
|
|
386
386
|
onResetClick: r,
|
|
387
387
|
onRecurrenceClick: i,
|
|
388
388
|
sx: o = {},
|
|
389
|
-
title:
|
|
389
|
+
title: s
|
|
390
390
|
}) => {
|
|
391
391
|
const { recurring: m } = b(), p = x.useMemo(() => pt(t), [t]);
|
|
392
|
-
return /* @__PURE__ */
|
|
393
|
-
|
|
392
|
+
return /* @__PURE__ */ c(d, { id: "recurrence-list", sx: { gap: 8, mt: 4, ...o }, tabIndex: -1, children: [
|
|
393
|
+
s && /* @__PURE__ */ c(
|
|
394
394
|
d,
|
|
395
395
|
{
|
|
396
396
|
sx: {
|
|
@@ -400,28 +400,38 @@ const j = {
|
|
|
400
400
|
px: 24
|
|
401
401
|
},
|
|
402
402
|
children: [
|
|
403
|
-
/* @__PURE__ */ e(et, { bold: !0, variant: "body1", children:
|
|
403
|
+
/* @__PURE__ */ e(et, { bold: !0, variant: "body1", children: s }),
|
|
404
404
|
r && /* @__PURE__ */ e(ht, { onClick: r, size: "small", variant: "text", children: m.reset })
|
|
405
405
|
]
|
|
406
406
|
}
|
|
407
407
|
),
|
|
408
|
-
t.length === 0 ? /* @__PURE__ */ e(h, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: m.no_activities }) : /* @__PURE__ */ e(Ce, { "aria-label":
|
|
408
|
+
t.length === 0 ? /* @__PURE__ */ e(h, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: m.no_activities }) : /* @__PURE__ */ e(Ce, { "aria-label": s, children: n ? t.map((a, l) => /* @__PURE__ */ c(x.Fragment, { children: [
|
|
409
409
|
/* @__PURE__ */ e(
|
|
410
410
|
Te,
|
|
411
411
|
{
|
|
412
412
|
isMini: n,
|
|
413
413
|
onRecurrenceClick: i,
|
|
414
|
-
recurrence:
|
|
414
|
+
recurrence: a
|
|
415
415
|
}
|
|
416
416
|
),
|
|
417
417
|
/* @__PURE__ */ e(X, { sx: { mx: 24 } })
|
|
418
|
-
] }, `recurrence-${l}`)) : p.map((
|
|
418
|
+
] }, `recurrence-${l}`)) : p.map((a, l) => /* @__PURE__ */ c(x.Fragment, { children: [
|
|
419
419
|
/* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(
|
|
420
420
|
Ce,
|
|
421
421
|
{
|
|
422
|
-
|
|
422
|
+
"aria-labelledby": `date-group-header-${a.id}`,
|
|
423
|
+
subheader: /* @__PURE__ */ e(
|
|
424
|
+
ft,
|
|
425
|
+
{
|
|
426
|
+
"aria-hidden": "true",
|
|
427
|
+
id: `date-group-header-${a.id}`,
|
|
428
|
+
role: "presentation",
|
|
429
|
+
sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 },
|
|
430
|
+
children: /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: I(a.date, M.DAY_OF_WEEK_MONTH_DAY) })
|
|
431
|
+
}
|
|
432
|
+
),
|
|
423
433
|
sx: { width: "100%" },
|
|
424
|
-
children:
|
|
434
|
+
children: a.recurrences.map((u, g) => /* @__PURE__ */ e(x.Fragment, { children: /* @__PURE__ */ e(
|
|
425
435
|
Te,
|
|
426
436
|
{
|
|
427
437
|
isMini: n,
|
|
@@ -430,45 +440,45 @@ const j = {
|
|
|
430
440
|
}
|
|
431
441
|
) }, `day-recurrence-${g}`))
|
|
432
442
|
}
|
|
433
|
-
) },
|
|
443
|
+
) }, a.id),
|
|
434
444
|
/* @__PURE__ */ e(X, { sx: { mx: 24 } })
|
|
435
445
|
] }, `recurrence-${l}`)) })
|
|
436
446
|
] });
|
|
437
447
|
}
|
|
438
|
-
),
|
|
439
|
-
({ expected: t, isExpense: n = !0, missed: r, paid: i, title: o, total:
|
|
440
|
-
const p = ne(), { isSmallMobile:
|
|
448
|
+
), _e = T(
|
|
449
|
+
({ expected: t, isExpense: n = !0, missed: r, paid: i, title: o, total: s, upcoming: m }) => {
|
|
450
|
+
const p = ne(), { isSmallMobile: a } = ve(), { recurring: l } = b(), u = x.useMemo(() => {
|
|
441
451
|
const g = [{ color: p.palette.success.main, percentage: `${i / t}` }];
|
|
442
452
|
return r && g.push({ color: p.palette.error.main, percentage: `${r / t}` }), g;
|
|
443
453
|
}, [i, t, r]);
|
|
444
|
-
return /* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
-
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: `${o} (${
|
|
454
|
+
return /* @__PURE__ */ c(d, { children: [
|
|
455
|
+
/* @__PURE__ */ c(d, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
456
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "body1", children: `${o} (${s})` }),
|
|
447
457
|
/* @__PURE__ */ e(h, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${L(t, "0,0.00")}` })
|
|
448
458
|
] }),
|
|
449
459
|
/* @__PURE__ */ e(Le, { data: u, height: 12 }),
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */ e(
|
|
452
|
-
!
|
|
460
|
+
/* @__PURE__ */ c(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
461
|
+
/* @__PURE__ */ e(N, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
462
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
|
|
453
463
|
/* @__PURE__ */ e(h, { variant: "caption", children: l.paid?.toLowerCase() }),
|
|
454
|
-
r !== void 0 && /* @__PURE__ */
|
|
455
|
-
/* @__PURE__ */ e(
|
|
456
|
-
!
|
|
464
|
+
r !== void 0 && /* @__PURE__ */ c(B, { children: [
|
|
465
|
+
/* @__PURE__ */ e(N, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
466
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(r, "0,0.00") }),
|
|
457
467
|
/* @__PURE__ */ e(h, { variant: "caption", children: l.missed?.toLowerCase() })
|
|
458
468
|
] }),
|
|
459
|
-
/* @__PURE__ */ e(
|
|
460
|
-
!
|
|
469
|
+
/* @__PURE__ */ e(N, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
470
|
+
!a && /* @__PURE__ */ e(h, { bold: !0, variant: "body2", children: L(m, "0,0.00") }),
|
|
461
471
|
/* @__PURE__ */ e(h, { variant: "caption", children: l.upcoming?.toLowerCase() })
|
|
462
472
|
] })
|
|
463
473
|
] });
|
|
464
474
|
}
|
|
465
|
-
),
|
|
475
|
+
), Ge = T(() => {
|
|
466
476
|
const { recurring: t } = b(), {
|
|
467
477
|
selectedRecurrence: n,
|
|
468
478
|
selectedRepeatingTransaction: r,
|
|
469
479
|
setSelectedRecurrence: i,
|
|
470
480
|
setSelectedRepeatingTransactionGuid: o
|
|
471
|
-
} =
|
|
481
|
+
} = D(), s = () => {
|
|
472
482
|
o(null), i(null);
|
|
473
483
|
};
|
|
474
484
|
return /* @__PURE__ */ e(
|
|
@@ -476,12 +486,12 @@ const j = {
|
|
|
476
486
|
{
|
|
477
487
|
ariaLabelClose: t.close_drawer_aria,
|
|
478
488
|
isOpen: !!r,
|
|
479
|
-
onClose:
|
|
489
|
+
onClose: s,
|
|
480
490
|
title: r?.repeating_transaction_type === gt.Income ? t.income_details : t.expense_details,
|
|
481
491
|
children: r && /* @__PURE__ */ e(
|
|
482
492
|
Ct,
|
|
483
493
|
{
|
|
484
|
-
onDeleted:
|
|
494
|
+
onDeleted: s,
|
|
485
495
|
recurringTransaction: r,
|
|
486
496
|
selectedRecurrence: n
|
|
487
497
|
}
|
|
@@ -489,10 +499,10 @@ const j = {
|
|
|
489
499
|
}
|
|
490
500
|
);
|
|
491
501
|
}), Lt = T(() => {
|
|
492
|
-
const { recurring: t } = b(), { availableWidth: n } = Ie(), { isDesktop: r, isSmallMobile: i, isMobile: o } = ve(n), { onEvent:
|
|
502
|
+
const { recurring: t } = b(), { availableWidth: n } = Ie(), { isDesktop: r, isSmallMobile: i, isMobile: o } = ve(n), { onEvent: s } = Y(), {
|
|
493
503
|
currentMonthExpenses: m,
|
|
494
504
|
currentMonthIncome: p,
|
|
495
|
-
dateRange:
|
|
505
|
+
dateRange: a,
|
|
496
506
|
expenseTotal: l,
|
|
497
507
|
incomeTotal: u,
|
|
498
508
|
missedExpenseTotal: g,
|
|
@@ -504,33 +514,33 @@ const j = {
|
|
|
504
514
|
setDateRange: w,
|
|
505
515
|
setSelectedRecurrence: H,
|
|
506
516
|
setSelectedRepeatingTransactionGuid: ue,
|
|
507
|
-
upcomingExpenseTotal:
|
|
517
|
+
upcomingExpenseTotal: Ne,
|
|
508
518
|
upcomingIncomeTotal: ke,
|
|
509
519
|
upcomingRecurrences: me
|
|
510
|
-
} =
|
|
511
|
-
Oe(
|
|
520
|
+
} = D(), [V, Oe] = x.useState(0), We = je(a.start, /* @__PURE__ */ new Date()), Pe = (R, $e) => {
|
|
521
|
+
Oe($e);
|
|
512
522
|
}, pe = (R) => {
|
|
513
|
-
ue(R.repeatingTransactionGuid), H(R),
|
|
523
|
+
ue(R.repeatingTransactionGuid), H(R), s(v.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
514
524
|
transaction_guid: R.transaction?.guid
|
|
515
525
|
});
|
|
516
526
|
}, ge = (R) => {
|
|
517
|
-
ue(R.repeatingTransactionGuid), H(R),
|
|
527
|
+
ue(R.repeatingTransactionGuid), H(R), s(v.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
518
528
|
transaction_guid: R.transaction?.guid
|
|
519
529
|
});
|
|
520
530
|
}, ze = () => {
|
|
521
|
-
const R = Ue(
|
|
531
|
+
const R = Ue(a.start, 1);
|
|
522
532
|
w({
|
|
523
533
|
start: k(R),
|
|
524
534
|
end: z(R)
|
|
525
535
|
});
|
|
526
536
|
}, He = () => {
|
|
527
|
-
const R = Ye(
|
|
537
|
+
const R = Ye(a.start, 1);
|
|
528
538
|
w({
|
|
529
539
|
start: k(R),
|
|
530
540
|
end: z(R)
|
|
531
541
|
});
|
|
532
542
|
};
|
|
533
|
-
return /* @__PURE__ */
|
|
543
|
+
return /* @__PURE__ */ c(
|
|
534
544
|
q,
|
|
535
545
|
{
|
|
536
546
|
container: !0,
|
|
@@ -538,14 +548,14 @@ const j = {
|
|
|
538
548
|
pt: 16
|
|
539
549
|
},
|
|
540
550
|
children: [
|
|
541
|
-
/* @__PURE__ */
|
|
542
|
-
/* @__PURE__ */
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
/* @__PURE__ */ e(tt, { variant: "h3", children:
|
|
551
|
+
/* @__PURE__ */ c(q, { size: { sm: 12, md: "grow" }, width: "100%", children: [
|
|
552
|
+
/* @__PURE__ */ c(d, { sx: { gap: 16, px: r ? 48 : 24 }, children: [
|
|
553
|
+
/* @__PURE__ */ c(d, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
554
|
+
/* @__PURE__ */ e(tt, { variant: "h3", children: G(
|
|
545
555
|
t.header_title,
|
|
546
|
-
I(
|
|
556
|
+
I(a.start, M.MONTH_LONG)
|
|
547
557
|
) }),
|
|
548
|
-
!r && /* @__PURE__ */
|
|
558
|
+
!r && /* @__PURE__ */ c(d, { direction: "row", gap: 4, children: [
|
|
549
559
|
/* @__PURE__ */ e(
|
|
550
560
|
he,
|
|
551
561
|
{
|
|
@@ -559,18 +569,18 @@ const j = {
|
|
|
559
569
|
] })
|
|
560
570
|
] }),
|
|
561
571
|
/* @__PURE__ */ e(
|
|
562
|
-
|
|
572
|
+
_e,
|
|
563
573
|
{
|
|
564
574
|
expected: l,
|
|
565
575
|
missed: g,
|
|
566
576
|
paid: C,
|
|
567
577
|
title: t.expenses,
|
|
568
578
|
total: m.length,
|
|
569
|
-
upcoming:
|
|
579
|
+
upcoming: Ne
|
|
570
580
|
}
|
|
571
581
|
),
|
|
572
582
|
/* @__PURE__ */ e(
|
|
573
|
-
|
|
583
|
+
_e,
|
|
574
584
|
{
|
|
575
585
|
expected: u,
|
|
576
586
|
isExpense: !1,
|
|
@@ -589,8 +599,8 @@ const j = {
|
|
|
589
599
|
}
|
|
590
600
|
)
|
|
591
601
|
] }),
|
|
592
|
-
!r && /* @__PURE__ */
|
|
593
|
-
/* @__PURE__ */
|
|
602
|
+
!r && /* @__PURE__ */ c(d, { sx: { px: o ? 0 : 24 }, children: [
|
|
603
|
+
/* @__PURE__ */ c(Ke, { onChange: Pe, value: V, variant: "fullWidth", children: [
|
|
594
604
|
/* @__PURE__ */ e(
|
|
595
605
|
fe,
|
|
596
606
|
{
|
|
@@ -608,50 +618,52 @@ const j = {
|
|
|
608
618
|
P,
|
|
609
619
|
{
|
|
610
620
|
onRecurrenceClick: pe,
|
|
611
|
-
recurrences: me
|
|
621
|
+
recurrences: me,
|
|
622
|
+
title: i ? t.upcoming : t.upcoming_activity
|
|
612
623
|
}
|
|
613
624
|
),
|
|
614
625
|
V === 1 && /* @__PURE__ */ e(
|
|
615
626
|
P,
|
|
616
627
|
{
|
|
617
628
|
onRecurrenceClick: ge,
|
|
618
|
-
recurrences: y
|
|
629
|
+
recurrences: y,
|
|
630
|
+
title: i ? t.past : t.past_transactions
|
|
619
631
|
}
|
|
620
632
|
)
|
|
621
633
|
] })
|
|
622
634
|
] }),
|
|
623
|
-
r && /* @__PURE__ */ e(q, { size: { xs: "auto" }, sx: { minWidth: 450 }, children: /* @__PURE__ */
|
|
635
|
+
r && /* @__PURE__ */ e(q, { size: { xs: "auto" }, sx: { minWidth: 450 }, children: /* @__PURE__ */ c(d, { gap: 24, children: [
|
|
624
636
|
/* @__PURE__ */ e(Ee, {}),
|
|
625
637
|
/* @__PURE__ */ e(
|
|
626
638
|
P,
|
|
627
639
|
{
|
|
628
640
|
onRecurrenceClick: ge,
|
|
629
641
|
recurrences: f || y,
|
|
630
|
-
title: A ?
|
|
642
|
+
title: A ? G(
|
|
631
643
|
t.day_transactions,
|
|
632
644
|
I(A, M.MONTH_DAY)
|
|
633
645
|
) : t.past_transactions
|
|
634
646
|
}
|
|
635
647
|
)
|
|
636
648
|
] }) }),
|
|
637
|
-
/* @__PURE__ */ e(
|
|
649
|
+
/* @__PURE__ */ e(Ge, {})
|
|
638
650
|
]
|
|
639
651
|
}
|
|
640
652
|
);
|
|
641
653
|
}), jn = T(
|
|
642
654
|
({ onBackClick: t, onMenuClick: n, sx: r = {} }) => {
|
|
643
|
-
const { recurring: i } = b(), { isInitialized: o, selectedAccountGuids:
|
|
655
|
+
const { recurring: i } = b(), { isInitialized: o, selectedAccountGuids: s } = U(), { alert: m, isDataLoaded: p, loadRepeatingTransactionData: a, setAlert: l, setDateRange: u } = D(), { setFilter: g } = re(), { onEvent: y } = Y(), [C, S] = x.useState(!1);
|
|
644
656
|
return oe({
|
|
645
657
|
widgetName: "RecurringTransactionsWidget",
|
|
646
658
|
isLoaded: p
|
|
647
659
|
}), x.useEffect(() => {
|
|
648
|
-
p ||
|
|
660
|
+
p || a().finally();
|
|
649
661
|
}, []), x.useEffect(() => {
|
|
650
662
|
g({
|
|
651
663
|
dateRange: { start: ee(Q(), 90), end: J() },
|
|
652
|
-
accounts:
|
|
664
|
+
accounts: s
|
|
653
665
|
}), u({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) });
|
|
654
|
-
}, [
|
|
666
|
+
}, [s]), o ? /* @__PURE__ */ c(
|
|
655
667
|
Rt,
|
|
656
668
|
{
|
|
657
669
|
actions: [
|
|
@@ -679,7 +691,7 @@ const j = {
|
|
|
679
691
|
onClose: () => S(!1),
|
|
680
692
|
shouldShowHeaderBorders: !1,
|
|
681
693
|
title: i.action_title,
|
|
682
|
-
children: /* @__PURE__ */ e(
|
|
694
|
+
children: /* @__PURE__ */ e(De, {})
|
|
683
695
|
}
|
|
684
696
|
),
|
|
685
697
|
/* @__PURE__ */ e(
|
|
@@ -689,7 +701,7 @@ const j = {
|
|
|
689
701
|
autoHideDuration: 3500,
|
|
690
702
|
onClose: () => l(""),
|
|
691
703
|
open: !!m.message,
|
|
692
|
-
children: /* @__PURE__ */ e(
|
|
704
|
+
children: /* @__PURE__ */ e(Be, { onClose: () => l(""), severity: m.severity, variant: "filled", children: m.message })
|
|
693
705
|
}
|
|
694
706
|
)
|
|
695
707
|
]
|
|
@@ -701,24 +713,24 @@ const j = {
|
|
|
701
713
|
selectedDay: r,
|
|
702
714
|
selectedDayRecurrences: i,
|
|
703
715
|
setSelectedDay: o,
|
|
704
|
-
setSelectedRecurrence:
|
|
716
|
+
setSelectedRecurrence: s,
|
|
705
717
|
setSelectedRepeatingTransactionGuid: m,
|
|
706
718
|
upcomingRecurrences: p
|
|
707
|
-
} =
|
|
708
|
-
m(u.repeatingTransactionGuid),
|
|
719
|
+
} = D(), a = (u) => {
|
|
720
|
+
m(u.repeatingTransactionGuid), s(u);
|
|
709
721
|
}, l = n < 750;
|
|
710
|
-
return /* @__PURE__ */
|
|
722
|
+
return /* @__PURE__ */ c(d, { flexDirection: l ? "column" : "row", width: "100%", children: [
|
|
711
723
|
/* @__PURE__ */ e(Ee, {}),
|
|
712
724
|
!l && /* @__PURE__ */ e(X, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
713
725
|
/* @__PURE__ */ e(
|
|
714
726
|
P,
|
|
715
727
|
{
|
|
716
728
|
isMini: !0,
|
|
717
|
-
onRecurrenceClick:
|
|
729
|
+
onRecurrenceClick: a,
|
|
718
730
|
onResetClick: r ? () => o(r) : void 0,
|
|
719
731
|
recurrences: i || p.slice(0, 5),
|
|
720
732
|
sx: { width: l ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
721
|
-
title: r ?
|
|
733
|
+
title: r ? G(
|
|
722
734
|
t.day_transactions,
|
|
723
735
|
I(r, M.MONTH_DAY)
|
|
724
736
|
) : t.upcoming_activity
|
|
@@ -727,18 +739,18 @@ const j = {
|
|
|
727
739
|
] });
|
|
728
740
|
}), Kn = T(
|
|
729
741
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
730
|
-
const { recurring: r } = b(), { setFilter: i } = re(), { isDataLoaded: o, loadRepeatingTransactionData:
|
|
742
|
+
const { recurring: r } = b(), { setFilter: i } = re(), { isDataLoaded: o, loadRepeatingTransactionData: s } = D(), { isInitialized: m, selectedAccountGuids: p } = U();
|
|
731
743
|
return oe({
|
|
732
744
|
widgetName: "RecurringTransactionsMiniWidget",
|
|
733
745
|
isLoaded: o
|
|
734
746
|
}), x.useEffect(() => {
|
|
735
|
-
o ||
|
|
747
|
+
o || s().finally();
|
|
736
748
|
}, []), x.useEffect(() => {
|
|
737
749
|
p.length > 0 && i({
|
|
738
750
|
dateRange: { start: ee(Q(), 90), end: J() },
|
|
739
751
|
accounts: p
|
|
740
752
|
});
|
|
741
|
-
}, [p]), m ? /* @__PURE__ */
|
|
753
|
+
}, [p]), m ? /* @__PURE__ */ c(
|
|
742
754
|
Tt,
|
|
743
755
|
{
|
|
744
756
|
className: "mx-exp-recurring-transactions-miniwidget",
|
|
@@ -750,29 +762,29 @@ const j = {
|
|
|
750
762
|
title: r.mini_title,
|
|
751
763
|
children: [
|
|
752
764
|
o ? /* @__PURE__ */ e(At, {}) : /* @__PURE__ */ e(Ae, { sx: { mx: 16 }, variant: "list" }),
|
|
753
|
-
/* @__PURE__ */ e(
|
|
765
|
+
/* @__PURE__ */ e(Ge, {})
|
|
754
766
|
]
|
|
755
767
|
}
|
|
756
768
|
) : /* @__PURE__ */ e(ae, {});
|
|
757
769
|
}
|
|
758
770
|
), Et = T(() => {
|
|
759
771
|
const { recurring: t } = b();
|
|
760
|
-
return /* @__PURE__ */
|
|
772
|
+
return /* @__PURE__ */ c(d, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
761
773
|
/* @__PURE__ */ e(Je, { size: 32 }),
|
|
762
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ c(d, { children: [
|
|
763
775
|
/* @__PURE__ */ e(Z, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
764
776
|
/* @__PURE__ */ e(Z, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
765
777
|
] })
|
|
766
778
|
] });
|
|
767
|
-
}),
|
|
779
|
+
}), Gt = ({
|
|
768
780
|
amount: t,
|
|
769
781
|
bgcolor: n,
|
|
770
782
|
isLargeScreen: r,
|
|
771
783
|
isSmallScreen: i,
|
|
772
784
|
label: o
|
|
773
|
-
}) => /* @__PURE__ */
|
|
785
|
+
}) => /* @__PURE__ */ c(d, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
774
786
|
/* @__PURE__ */ e(
|
|
775
|
-
|
|
787
|
+
N,
|
|
776
788
|
{
|
|
777
789
|
sx: {
|
|
778
790
|
borderRadius: "2px",
|
|
@@ -782,29 +794,29 @@ const j = {
|
|
|
782
794
|
}
|
|
783
795
|
}
|
|
784
796
|
),
|
|
785
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ c(d, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
786
798
|
!i && /* @__PURE__ */ e(h, { bold: !0, variant: "caption", children: L(t, t === 0 || !r ? "0,0" : "0,0.00") }),
|
|
787
799
|
/* @__PURE__ */ e(h, { variant: "caption", children: o })
|
|
788
800
|
] })
|
|
789
|
-
] }),
|
|
801
|
+
] }), Nt = ({
|
|
790
802
|
upcomingRecurrences: t,
|
|
791
803
|
logoSize: n = 32,
|
|
792
804
|
maxLogos: r = 3
|
|
793
805
|
}) => {
|
|
794
806
|
const i = (o) => o * (n / 2);
|
|
795
807
|
return /* @__PURE__ */ e(
|
|
796
|
-
|
|
808
|
+
N,
|
|
797
809
|
{
|
|
798
810
|
sx: {
|
|
799
811
|
position: "relative",
|
|
800
812
|
width: 64
|
|
801
813
|
},
|
|
802
|
-
children: t.map((o,
|
|
803
|
-
|
|
814
|
+
children: t.map((o, s) => s < r ? /* @__PURE__ */ e(
|
|
815
|
+
N,
|
|
804
816
|
{
|
|
805
817
|
sx: {
|
|
806
818
|
borderRadius: "4px",
|
|
807
|
-
left: i(
|
|
819
|
+
left: i(s),
|
|
808
820
|
outlineColor: "common.white",
|
|
809
821
|
outlineStyle: "solid",
|
|
810
822
|
outlineWidth: 2,
|
|
@@ -819,7 +831,7 @@ const j = {
|
|
|
819
831
|
}
|
|
820
832
|
)
|
|
821
833
|
},
|
|
822
|
-
`${o.categoryGuid}-${o.merchantGuid}-${
|
|
834
|
+
`${o.categoryGuid}-${o.merchantGuid}-${s}`
|
|
823
835
|
) : null)
|
|
824
836
|
}
|
|
825
837
|
);
|
|
@@ -834,28 +846,28 @@ const j = {
|
|
|
834
846
|
},
|
|
835
847
|
`${r.categoryGuid}-${r.merchantGuid}-${i}`
|
|
836
848
|
)) }), Ot = T(() => {
|
|
837
|
-
const t = ne(), [n, { width: r }] =
|
|
849
|
+
const t = ne(), [n, { width: r }] = _t(), {
|
|
838
850
|
upcomingRecurrences: i,
|
|
839
851
|
expenseTotal: o,
|
|
840
|
-
missedExpenseTotal:
|
|
852
|
+
missedExpenseTotal: s,
|
|
841
853
|
paidExpenseTotal: m,
|
|
842
854
|
upcomingExpenseTotal: p
|
|
843
|
-
} =
|
|
855
|
+
} = D(), { recurring: a } = b(), l = r <= 288, u = r >= 450, g = 32, y = i.length > 0, C = x.useMemo(() => L(o, o === 0 ? "0,0" : "0,0.00"), [o]), S = x.useMemo(() => {
|
|
844
856
|
const w = [
|
|
845
857
|
{ color: t.palette.success.main, percentage: `${m / o}` }
|
|
846
858
|
];
|
|
847
|
-
return
|
|
859
|
+
return s && w.push({
|
|
848
860
|
color: t.palette.error.main,
|
|
849
|
-
percentage: `${
|
|
861
|
+
percentage: `${s / o}`
|
|
850
862
|
}), w;
|
|
851
863
|
}, [
|
|
852
864
|
m,
|
|
853
865
|
o,
|
|
854
|
-
|
|
866
|
+
s,
|
|
855
867
|
t.palette.success.main,
|
|
856
868
|
t.palette.error.main
|
|
857
869
|
]), A = () => y ? l ? /* @__PURE__ */ e(
|
|
858
|
-
|
|
870
|
+
Nt,
|
|
859
871
|
{
|
|
860
872
|
logoSize: g,
|
|
861
873
|
maxLogos: 3,
|
|
@@ -865,22 +877,22 @@ const j = {
|
|
|
865
877
|
{
|
|
866
878
|
amount: m,
|
|
867
879
|
bgColor: "success.main",
|
|
868
|
-
label:
|
|
880
|
+
label: a.paid
|
|
869
881
|
},
|
|
870
882
|
{
|
|
871
|
-
amount:
|
|
883
|
+
amount: s,
|
|
872
884
|
bgColor: "error.main",
|
|
873
|
-
label:
|
|
885
|
+
label: a.missed
|
|
874
886
|
},
|
|
875
887
|
{
|
|
876
888
|
amount: p,
|
|
877
889
|
bgColor: "neutral.light",
|
|
878
|
-
label:
|
|
890
|
+
label: a.upcoming
|
|
879
891
|
}
|
|
880
892
|
];
|
|
881
|
-
return /* @__PURE__ */
|
|
882
|
-
/* @__PURE__ */
|
|
883
|
-
/* @__PURE__ */
|
|
893
|
+
return /* @__PURE__ */ c(B, { children: [
|
|
894
|
+
/* @__PURE__ */ c(d, { ref: n, sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
895
|
+
/* @__PURE__ */ c(
|
|
884
896
|
d,
|
|
885
897
|
{
|
|
886
898
|
sx: [
|
|
@@ -901,13 +913,13 @@ const j = {
|
|
|
901
913
|
children: C
|
|
902
914
|
}
|
|
903
915
|
),
|
|
904
|
-
/* @__PURE__ */ e(Z, { sx: { pr: 12 }, variant: "caption", children:
|
|
916
|
+
/* @__PURE__ */ e(Z, { sx: { pr: 12 }, variant: "caption", children: a.expected })
|
|
905
917
|
]
|
|
906
918
|
}
|
|
907
919
|
),
|
|
908
920
|
A()
|
|
909
921
|
] }),
|
|
910
|
-
/* @__PURE__ */
|
|
922
|
+
/* @__PURE__ */ c(d, { sx: { pt: 12 }, children: [
|
|
911
923
|
/* @__PURE__ */ e(Le, { data: S }),
|
|
912
924
|
/* @__PURE__ */ e(
|
|
913
925
|
d,
|
|
@@ -919,7 +931,7 @@ const j = {
|
|
|
919
931
|
mt: 4
|
|
920
932
|
},
|
|
921
933
|
children: f.map((w, H) => /* @__PURE__ */ e(
|
|
922
|
-
|
|
934
|
+
Gt,
|
|
923
935
|
{
|
|
924
936
|
amount: w.amount,
|
|
925
937
|
bgcolor: w.bgColor,
|
|
@@ -937,18 +949,18 @@ const j = {
|
|
|
937
949
|
({ onCTAClick: t }) => {
|
|
938
950
|
const { onEvent: n } = Y(), { isInitialized: r, selectedAccountGuids: i } = U(), {
|
|
939
951
|
loadRepeatingTransactionData: o,
|
|
940
|
-
upcomingRecurrences:
|
|
952
|
+
upcomingRecurrences: s,
|
|
941
953
|
repeatingTransactions: m,
|
|
942
954
|
setDateRange: p,
|
|
943
|
-
isDataLoaded:
|
|
944
|
-
} =
|
|
955
|
+
isDataLoaded: a
|
|
956
|
+
} = D(), { setFilter: l } = re(), { recurring: u, budgets: g } = b();
|
|
945
957
|
oe({
|
|
946
958
|
widgetName: "RecurringTransactionsMicroWidget",
|
|
947
|
-
isLoaded:
|
|
959
|
+
isLoaded: a
|
|
948
960
|
}), x.useEffect(() => {
|
|
949
|
-
|
|
961
|
+
a || o().finally(() => {
|
|
950
962
|
n(v.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
951
|
-
state:
|
|
963
|
+
state: s.length > 0 ? "default" : "zeroState"
|
|
952
964
|
});
|
|
953
965
|
});
|
|
954
966
|
}, []), x.useEffect(() => {
|
|
@@ -959,13 +971,13 @@ const j = {
|
|
|
959
971
|
}, [r, i]);
|
|
960
972
|
const y = () => {
|
|
961
973
|
n(
|
|
962
|
-
|
|
974
|
+
s.length > 0 ? v.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : v.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
963
975
|
), t();
|
|
964
976
|
};
|
|
965
|
-
if (!r || !
|
|
977
|
+
if (!r || !a) return /* @__PURE__ */ e(ae, { height: 100 });
|
|
966
978
|
const C = !m?.length;
|
|
967
979
|
return /* @__PURE__ */ e(
|
|
968
|
-
|
|
980
|
+
Dt,
|
|
969
981
|
{
|
|
970
982
|
className: "mx-recurring-transaction-microwidget",
|
|
971
983
|
ctaLabel: C ? g.get_started_cta : u.primary_cta,
|
|
@@ -985,7 +997,7 @@ const j = {
|
|
|
985
997
|
isOpen: t,
|
|
986
998
|
onClose: n,
|
|
987
999
|
title: i.cashflow_settings,
|
|
988
|
-
children: /* @__PURE__ */ e(
|
|
1000
|
+
children: /* @__PURE__ */ e(De, { defaultSelectedTab: r })
|
|
989
1001
|
}
|
|
990
1002
|
);
|
|
991
1003
|
}
|
|
@@ -994,7 +1006,7 @@ export {
|
|
|
994
1006
|
er as AddRecurringTransactionDetails,
|
|
995
1007
|
Jn as ManageExpenses,
|
|
996
1008
|
tr as ManageIncome,
|
|
997
|
-
|
|
1009
|
+
De as RecurringSettings,
|
|
998
1010
|
qn as RecurringSettingsDrawer,
|
|
999
1011
|
Vn as RecurringTransactionsMicroWidget,
|
|
1000
1012
|
Kn as RecurringTransactionsMiniWidget,
|