@mx-cartographer/experiences 4.4.0 → 5.0.0
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 +7 -0
- package/dist/categories/constants/Analytics.d.ts +52 -1
- package/dist/common/components/daterangeselector/DateRangeSelector.d.ts +1 -1
- package/dist/common/constants/Category.d.ts +161 -3
- package/dist/goals/util/GoalsUtil.d.ts +2 -3
- package/dist/index.es.js +317 -313
- package/dist/index.es.js.map +1 -1
- package/dist/microinsights/constants/Analytics.d.ts +13 -1
- package/dist/transactions/constants/Analytics.d.ts +197 -1
- package/package.json +53 -50
package/dist/index.es.js
CHANGED
|
@@ -6,7 +6,7 @@ import M from "@mui/material/Divider";
|
|
|
6
6
|
import nA from "@mui/material/List";
|
|
7
7
|
import De from "@mui/material/ListSubheader";
|
|
8
8
|
import Bn from "@mui/system/Stack";
|
|
9
|
-
import { AccountsIcon as Ma, P as vA, Icon as T, useTokens as VA, Text as v, H2 as Qt, CategoryIcon as ue, DialogHeader as Ga, DialogFooter as Na, Drawer as Sa, Footer as Ya, DateRangePicker as Vn, H3 as pe, H1 as Je, TextField as st, IconWeight as te, MerchantLogo as dt, CategoryIconVariants as ao, InstitutionLogo as Xe, THEMES as Un, createMXTheme as Ba } from "@
|
|
9
|
+
import { AccountsIcon as Ma, P as vA, Icon as T, useTokens as VA, Text as v, H2 as Qt, CategoryIcon as ue, DialogHeader as Ga, DialogFooter as Na, Drawer as Sa, Footer as Ya, DateRangePicker as Vn, H3 as pe, H1 as Je, TextField as st, IconWeight as te, MerchantLogo as dt, CategoryIconVariants as ao, InstitutionLogo as Xe, THEMES as Un, createMXTheme as Ba } from "@mxenabled/mxui";
|
|
10
10
|
import Va from "bowser";
|
|
11
11
|
import { getUnixTime as PA } from "date-fns/getUnixTime";
|
|
12
12
|
import { intlFormat as Ua } from "date-fns/intlFormat";
|
|
@@ -16,7 +16,7 @@ import rA from "@mui/material/Button";
|
|
|
16
16
|
import Dt from "@mui/material/Tooltip";
|
|
17
17
|
import FA from "@mui/material/IconButton";
|
|
18
18
|
import Zi from "@mui/material/FormControlLabel";
|
|
19
|
-
import
|
|
19
|
+
import k from "@mui/material/ListItem";
|
|
20
20
|
import oA from "@mui/material/ListItemButton";
|
|
21
21
|
import iA from "@mui/material/ListItemText";
|
|
22
22
|
import so from "@mui/material/Popover";
|
|
@@ -80,7 +80,7 @@ import me from "@mui/material/Avatar";
|
|
|
80
80
|
import mA from "@mui/material/ListItemAvatar";
|
|
81
81
|
import de from "@mui/material/ListItemIcon";
|
|
82
82
|
import { ChevronRight as he, Payments as ps, NoteStack as zs, Person as ms, CheckCircle as ys, Icon as Zn, ExpandLess as ws, ExpandMore as Qs, AccountBalance as Ds, AddBox as lo } from "@mxenabled/mx-icons";
|
|
83
|
-
import { makeAutoObservable as wA, runInAction as
|
|
83
|
+
import { makeAutoObservable as wA, runInAction as U, reaction as Xs, observable as Ls } from "mobx";
|
|
84
84
|
import { differenceInDays as xs } from "date-fns/differenceInDays";
|
|
85
85
|
import bi from "@mui/icons-material/ChevronRight";
|
|
86
86
|
import fn from "@mui/icons-material/ExpandMore";
|
|
@@ -769,7 +769,7 @@ const j7 = {
|
|
|
769
769
|
[H.UNCATEGORIZED]: "category",
|
|
770
770
|
UNKNOWN: "help"
|
|
771
771
|
}, nr = 9999999999e-2;
|
|
772
|
-
var di = /* @__PURE__ */ ((A) => (A.CAD = "CAD", A.USD = "USD", A))(di || {}),
|
|
772
|
+
var di = /* @__PURE__ */ ((A) => (A.CAD = "CAD", A.USD = "USD", A))(di || {}), V = /* @__PURE__ */ ((A) => (A[A.Unknown = 0] = "Unknown", A[A.EveryWeek = 1] = "EveryWeek", A[A.EveryOtherWeek = 2] = "EveryOtherWeek", A[A.EveryMonth = 3] = "EveryMonth", A[A.EveryOtherMonth = 4] = "EveryOtherMonth", A[A.EveryQuarter = 5] = "EveryQuarter", A[A.EveryOtherQuarter = 6] = "EveryOtherQuarter", A[A.EveryYear = 7] = "EveryYear", A))(V || {});
|
|
773
773
|
const q7 = [
|
|
774
774
|
{ id: 0, copy: "frequency_unknown" },
|
|
775
775
|
{ id: 1, copy: "frequency_every_week" },
|
|
@@ -1156,7 +1156,7 @@ const Yi = (A, t) => A.reduce((i, n) => (i[n.guid] = t?.includes(n.guid), i), {}
|
|
|
1156
1156
|
}
|
|
1157
1157
|
},
|
|
1158
1158
|
children: [
|
|
1159
|
-
/* @__PURE__ */ e(
|
|
1159
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ e(
|
|
1160
1160
|
Zi,
|
|
1161
1161
|
{
|
|
1162
1162
|
control: /* @__PURE__ */ e(
|
|
@@ -1187,7 +1187,7 @@ const Yi = (A, t) => A.reduce((i, n) => (i[n.guid] = t?.includes(n.guid), i), {}
|
|
|
1187
1187
|
const m = E[P], Q = m.every(
|
|
1188
1188
|
(w) => d[w.guid]
|
|
1189
1189
|
);
|
|
1190
|
-
return /* @__PURE__ */ e(
|
|
1190
|
+
return /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ e(
|
|
1191
1191
|
nA,
|
|
1192
1192
|
{
|
|
1193
1193
|
"aria-label": p(i.accountTypeAccounts, P),
|
|
@@ -1222,7 +1222,7 @@ const Yi = (A, t) => A.reduce((i, n) => (i[n.guid] = t?.includes(n.guid), i), {}
|
|
|
1222
1222
|
children: m.map((w) => {
|
|
1223
1223
|
const y = d[w.guid], X = `${w.name}${l && w.accountNumber ? ` *${w.accountNumber.slice(-4)}` : ""}`;
|
|
1224
1224
|
return /* @__PURE__ */ e(
|
|
1225
|
-
|
|
1225
|
+
k,
|
|
1226
1226
|
{
|
|
1227
1227
|
className: "mx-cmn-account-options-container",
|
|
1228
1228
|
disableGutters: !0,
|
|
@@ -2137,7 +2137,7 @@ const td = ({
|
|
|
2137
2137
|
if (!t)
|
|
2138
2138
|
throw new Error(`${A}() must be used within the GlobalDataContext`);
|
|
2139
2139
|
return t;
|
|
2140
|
-
}, CA = () => UA("useAccountStore").globalStore.accountStore, WA = () => UA("useBudgetsStore").globalStore.budgetsStore, pn = () => UA("useCashflowStore").globalStore.cashflowStore, qA = () => UA("useCategoryStore").globalStore.categoryStore, To = () => UA("useConnectStore").globalStore.connectStore, Mo = () => UA("useDebtsStore").globalStore.debtsStore, Qi = () => UA("useGlobalStore").globalStore, bA = () => UA("useGlobalUiStore").globalStore.globalUiStore, z = () => UA("globalCopyStore").globalStore.copyStore.copy, _A = () => UA("useGoalStore").globalStore.goalStore, fd = () => UA("useHelpStore").globalStore.helpStore, ld = () => UA("useMerchantStore").globalStore.merchantStore, hd = () => UA("useNetWorthStore").globalStore.netWorthStore, Go = () => UA("useNotificationStore").globalStore.notificationStore, kA = () => UA("useRecurringActivityStore").globalStore.recurringActivityStore, No = () => UA("useSettingsStore").globalStore.settingsStore, uA = () => UA("useTransactionStore").globalStore.transactionStore, Rt = () => UA("useUserStore").globalStore.userStore,
|
|
2140
|
+
}, CA = () => UA("useAccountStore").globalStore.accountStore, WA = () => UA("useBudgetsStore").globalStore.budgetsStore, pn = () => UA("useCashflowStore").globalStore.cashflowStore, qA = () => UA("useCategoryStore").globalStore.categoryStore, To = () => UA("useConnectStore").globalStore.connectStore, Mo = () => UA("useDebtsStore").globalStore.debtsStore, Qi = () => UA("useGlobalStore").globalStore, bA = () => UA("useGlobalUiStore").globalStore.globalUiStore, z = () => UA("globalCopyStore").globalStore.copyStore.copy, _A = () => UA("useGoalStore").globalStore.goalStore, fd = () => UA("useHelpStore").globalStore.helpStore, ld = () => UA("useMerchantStore").globalStore.merchantStore, hd = () => UA("useNetWorthStore").globalStore.netWorthStore, Go = () => UA("useNotificationStore").globalStore.notificationStore, kA = () => UA("useRecurringActivityStore").globalStore.recurringActivityStore, No = () => UA("useSettingsStore").globalStore.settingsStore, uA = () => UA("useTransactionStore").globalStore.transactionStore, Rt = () => UA("useUserStore").globalStore.userStore, F = () => ({ onEvent: UA().onEvent }), U7 = () => ({ onPageView: UA().onPageView }), Ed = (A = "useWidgetContainerContext") => {
|
|
2141
2141
|
const t = h.useContext(Oo);
|
|
2142
2142
|
if (!t)
|
|
2143
2143
|
throw new Error(`${A}() must be used within the WidgetContainerContext`);
|
|
@@ -3112,7 +3112,7 @@ const Ct = ({
|
|
|
3112
3112
|
sx: l = {},
|
|
3113
3113
|
title: E = ""
|
|
3114
3114
|
}) => {
|
|
3115
|
-
const [u, { height: R, width: b }] = Bo(), { onEvent: P } =
|
|
3115
|
+
const [u, { height: R, width: b }] = Bo(), { onEvent: P } = F(), { isDesktop: m, isMobile: Q, isTablet: w } = xA(), { displayedDateRange: y, selectedAccountGuids: X, setSelectedAccountGuids: L } = bA(), { common: D } = z(), q = () => {
|
|
3116
3116
|
d && (d(), P(G.WIDGET_BACK_CLICK));
|
|
3117
3117
|
}, N = {
|
|
3118
3118
|
accountFilterOptionsCopy: {
|
|
@@ -3563,10 +3563,10 @@ const Er = "connect_widget", ur = "connections_widget", md = ({
|
|
|
3563
3563
|
}
|
|
3564
3564
|
)
|
|
3565
3565
|
] });
|
|
3566
|
-
return i ? /* @__PURE__ */ e(
|
|
3566
|
+
return i ? /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(oA, { onClick: i, children: [
|
|
3567
3567
|
r,
|
|
3568
3568
|
/* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(T, { name: "chevron_right", size: 24 }) })
|
|
3569
|
-
] }) }) : /* @__PURE__ */ e(
|
|
3569
|
+
] }) }) : /* @__PURE__ */ e(k, { disableGutters: !1, disablePadding: !1, children: r });
|
|
3570
3570
|
}, Ei = ({
|
|
3571
3571
|
body: A,
|
|
3572
3572
|
iconName: t = "info",
|
|
@@ -3616,7 +3616,7 @@ const Er = "connect_widget", ur = "connections_widget", md = ({
|
|
|
3616
3616
|
}, u = () => {
|
|
3617
3617
|
l(!1), o();
|
|
3618
3618
|
};
|
|
3619
|
-
return /* @__PURE__ */ c(
|
|
3619
|
+
return /* @__PURE__ */ c(k, { children: [
|
|
3620
3620
|
/* @__PURE__ */ c(oA, { onClick: () => l(!t), children: [
|
|
3621
3621
|
/* @__PURE__ */ e(
|
|
3622
3622
|
iA,
|
|
@@ -3659,8 +3659,8 @@ const Er = "connect_widget", ur = "connections_widget", md = ({
|
|
|
3659
3659
|
onClick: i,
|
|
3660
3660
|
sx: n = {}
|
|
3661
3661
|
}) => {
|
|
3662
|
-
const { onEvent: r } =
|
|
3663
|
-
return i ? /* @__PURE__ */ e(
|
|
3662
|
+
const { onEvent: r } = F();
|
|
3663
|
+
return i ? /* @__PURE__ */ e(k, { sx: { bgcolor: "background.paper", ...n }, children: /* @__PURE__ */ e(
|
|
3664
3664
|
oA,
|
|
3665
3665
|
{
|
|
3666
3666
|
onClick: () => {
|
|
@@ -3669,7 +3669,7 @@ const Er = "connect_widget", ur = "connections_widget", md = ({
|
|
|
3669
3669
|
children: A
|
|
3670
3670
|
}
|
|
3671
3671
|
) }) : /* @__PURE__ */ e(
|
|
3672
|
-
|
|
3672
|
+
k,
|
|
3673
3673
|
{
|
|
3674
3674
|
disableGutters: !1,
|
|
3675
3675
|
disablePadding: !1,
|
|
@@ -3687,14 +3687,14 @@ class Dd {
|
|
|
3687
3687
|
wA(this);
|
|
3688
3688
|
}
|
|
3689
3689
|
initialize = async (t, i) => {
|
|
3690
|
-
this.api = new fi(t, i), await this.getCopy(this.featureNamespace),
|
|
3690
|
+
this.api = new fi(t, i), await this.getCopy(this.featureNamespace), U(() => {
|
|
3691
3691
|
this.isInitialized = !0;
|
|
3692
3692
|
});
|
|
3693
3693
|
};
|
|
3694
3694
|
getCopy = async (t, i = "") => {
|
|
3695
3695
|
try {
|
|
3696
3696
|
const n = await this.api.getGlobalCopy(t, i);
|
|
3697
|
-
|
|
3697
|
+
U(() => {
|
|
3698
3698
|
this.copy = n[t];
|
|
3699
3699
|
});
|
|
3700
3700
|
} catch (n) {
|
|
@@ -3730,7 +3730,7 @@ class Xd {
|
|
|
3730
3730
|
loadAppData = async () => {
|
|
3731
3731
|
try {
|
|
3732
3732
|
const t = await this.api.getAppData();
|
|
3733
|
-
|
|
3733
|
+
U(() => {
|
|
3734
3734
|
this.appData = t;
|
|
3735
3735
|
});
|
|
3736
3736
|
} catch (t) {
|
|
@@ -3751,7 +3751,7 @@ class Ld {
|
|
|
3751
3751
|
};
|
|
3752
3752
|
loadBeats = async () => {
|
|
3753
3753
|
const t = await this.api.getBeats();
|
|
3754
|
-
|
|
3754
|
+
U(() => {
|
|
3755
3755
|
this.beats = t;
|
|
3756
3756
|
});
|
|
3757
3757
|
};
|
|
@@ -3881,7 +3881,7 @@ class qd {
|
|
|
3881
3881
|
addBudget = async (t, i, n = null) => {
|
|
3882
3882
|
try {
|
|
3883
3883
|
const r = await this.api.addBudget(t, i, n);
|
|
3884
|
-
|
|
3884
|
+
U(() => {
|
|
3885
3885
|
this.budgets.push(r);
|
|
3886
3886
|
});
|
|
3887
3887
|
} catch (r) {
|
|
@@ -3890,7 +3890,7 @@ class qd {
|
|
|
3890
3890
|
};
|
|
3891
3891
|
deleteBudget = async (t) => {
|
|
3892
3892
|
try {
|
|
3893
|
-
await this.api.deleteBudget(t),
|
|
3893
|
+
await this.api.deleteBudget(t), U(() => {
|
|
3894
3894
|
const i = this.budgets.findIndex((n) => n.guid === t);
|
|
3895
3895
|
i >= 0 && this.budgets.splice(i, 1);
|
|
3896
3896
|
});
|
|
@@ -3901,7 +3901,7 @@ class qd {
|
|
|
3901
3901
|
loadBudgets = async () => {
|
|
3902
3902
|
try {
|
|
3903
3903
|
const t = await this.api.getBudgets();
|
|
3904
|
-
|
|
3904
|
+
U(() => {
|
|
3905
3905
|
this.budgets = t;
|
|
3906
3906
|
});
|
|
3907
3907
|
} catch (t) {
|
|
@@ -3932,7 +3932,7 @@ class qd {
|
|
|
3932
3932
|
updateBudget = async (t) => {
|
|
3933
3933
|
try {
|
|
3934
3934
|
const i = await this.api.updateBudget(t);
|
|
3935
|
-
|
|
3935
|
+
U(() => {
|
|
3936
3936
|
const n = this.budgets.findIndex((r) => r.guid === t.guid);
|
|
3937
3937
|
n >= 0 && (this.budgets[n] = i);
|
|
3938
3938
|
});
|
|
@@ -4569,7 +4569,7 @@ const Sd = [
|
|
|
4569
4569
|
const i = A.toLowerCase().split(" "), n = t?.toString().toLowerCase() ?? "";
|
|
4570
4570
|
return i.every((r) => n.indexOf(r) > -1);
|
|
4571
4571
|
};
|
|
4572
|
-
var TA = /* @__PURE__ */ ((A) => (A[A.Expense = 0] = "Expense", A[A.Income = 1] = "Income", A))(TA || {}), SA = /* @__PURE__ */ ((A) => (A[A.Paid = 0] = "Paid", A[A.Missed = 1] = "Missed", A[A.Upcoming = 2] = "Upcoming", A))(SA || {}), Kd = /* @__PURE__ */ ((A) => (A[A.UNKNOWN = 0] = "UNKNOWN", A[A.CORRECT = 1] = "CORRECT", A[A.INCORRECT = 2] = "INCORRECT", A))(Kd || {}), Zd = /* @__PURE__ */ ((A) => (A.Missed = "Missed", A.Paid = "Paid", A.Upcoming = "Upcoming expense", A.Income = "Income", A))(Zd || {}), Jd = /* @__PURE__ */ ((A) => (A[A.Unknown = 0] = "Unknown", A[A.Subscription = 1] = "Subscription", A[A.Bill = 2] = "Bill", A))(Jd || {}),
|
|
4572
|
+
var TA = /* @__PURE__ */ ((A) => (A[A.Expense = 0] = "Expense", A[A.Income = 1] = "Income", A))(TA || {}), SA = /* @__PURE__ */ ((A) => (A[A.Paid = 0] = "Paid", A[A.Missed = 1] = "Missed", A[A.Upcoming = 2] = "Upcoming", A))(SA || {}), Kd = /* @__PURE__ */ ((A) => (A[A.UNKNOWN = 0] = "UNKNOWN", A[A.CORRECT = 1] = "CORRECT", A[A.INCORRECT = 2] = "INCORRECT", A))(Kd || {}), Zd = /* @__PURE__ */ ((A) => (A.Missed = "Missed", A.Paid = "Paid", A.Upcoming = "Upcoming expense", A.Income = "Income", A))(Zd || {}), Jd = /* @__PURE__ */ ((A) => (A[A.Unknown = 0] = "Unknown", A[A.Subscription = 1] = "Subscription", A[A.Bill = 2] = "Bill", A))(Jd || {}), B = /* @__PURE__ */ ((A) => (A[A.DEBT_TRACK = 1] = "DEBT_TRACK", A[A.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", A[A.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", A[A.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", A))(B || {}), nn = /* @__PURE__ */ ((A) => (A[A.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", A[A.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", A[A.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", A[A.ACTION = 4] = "ACTION", A))(nn || {}), ae = /* @__PURE__ */ ((A) => (A[A.AUTOMOBILE = 1] = "AUTOMOBILE", A[A.COLLEGE = 2] = "COLLEGE", A[A.HOUSE = 3] = "HOUSE", A[A.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", A[A.VACATION = 5] = "VACATION", A[A.ELECTRONIC = 6] = "ELECTRONIC", A[A.OTHER = 7] = "OTHER", A[A.RETIREMENT = 8] = "RETIREMENT", A[A.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", A[A.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", A[A.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", A[A.CREDIT_CARD = 12] = "CREDIT_CARD", A[A.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", A[A.LOANS = 14] = "LOANS", A))(ae || {}), BA = /* @__PURE__ */ ((A) => (A[A.BudgetExceeded = 1] = "BudgetExceeded", A[A.BudgetOffTarget = 2] = "BudgetOffTarget", A[A.DebtPaymentReminder = 3] = "DebtPaymentReminder", A[A.GuideMeStepComplete = 4] = "GuideMeStepComplete", A[A.GuideMeOffTarget = 5] = "GuideMeOffTarget", A[A.AccountBalanceLow = 6] = "AccountBalanceLow", A[A.AccountDepositLarge = 7] = "AccountDepositLarge", A[A.TransactionExpenseLarge = 8] = "TransactionExpenseLarge", A[A.TransactionFeeCharge = 9] = "TransactionFeeCharge", A[A.SystemNotification = 10] = "SystemNotification", A[A.ApiNotification = 11] = "ApiNotification", A[A.UserSummary = 12] = "UserSummary", A[A.Offer = 13] = "Offer", A[A.PasswordResetToken = 14] = "PasswordResetToken", A[A.PasswordChanged = 15] = "PasswordChanged", A[A.EmailVerification = 16] = "EmailVerification", A[A.EmailVerified = 17] = "EmailVerified", A[A.WelcomeNewUser = 18] = "WelcomeNewUser", A[A.DeviceCreated = 19] = "DeviceCreated", A[A.DeviceDeleted = 20] = "DeviceDeleted", A[A.SmsVerification = 21] = "SmsVerification", A[A.AccountNearingZero = 22] = "AccountNearingZero", A[A.InternationalTransaction = 23] = "InternationalTransaction", A[A.GoalProgress = 25] = "GoalProgress", A[A.DuplicatePayment = 29] = "DuplicatePayment", A))(BA || {}), se = /* @__PURE__ */ ((A) => (A[A.CREDIT = 1] = "CREDIT", A[A.DEBIT = 2] = "DEBIT", A))(se || {}), mn = /* @__PURE__ */ ((A) => (A[A.POSTED = 1] = "POSTED", A[A.PENDING = 2] = "PENDING", A))(mn || {}), _d = /* @__PURE__ */ ((A) => (A.Desktop = "Desktop", A.Mobile = "Mobile", A))(_d || {});
|
|
4573
4573
|
const Uo = {
|
|
4574
4574
|
account_guid: "",
|
|
4575
4575
|
amount: 0,
|
|
@@ -4701,7 +4701,7 @@ class AI {
|
|
|
4701
4701
|
};
|
|
4702
4702
|
addTransaction = async (t) => {
|
|
4703
4703
|
const i = await this.api.addTransaction(t);
|
|
4704
|
-
i &&
|
|
4704
|
+
i && U(
|
|
4705
4705
|
() => this.transactions = this.augmentTransactions([i, ...this.transactions])
|
|
4706
4706
|
);
|
|
4707
4707
|
};
|
|
@@ -4713,19 +4713,19 @@ class AI {
|
|
|
4713
4713
|
);
|
|
4714
4714
|
loadAssociatedBeats = async (t) => {
|
|
4715
4715
|
const i = t ? hn(t, { representation: "date" }) : void 0, n = await this.beatApi.getBeatsWithAssociatedTransaction(i);
|
|
4716
|
-
|
|
4716
|
+
U(() => this.associatedBeats = n);
|
|
4717
4717
|
};
|
|
4718
4718
|
loadTags = async () => {
|
|
4719
4719
|
const t = await this.api.getTags();
|
|
4720
|
-
|
|
4720
|
+
U(() => this.tags = t);
|
|
4721
4721
|
};
|
|
4722
4722
|
loadTaggings = async () => {
|
|
4723
4723
|
const t = await this.api.getTaggings();
|
|
4724
|
-
|
|
4724
|
+
U(() => this.taggings = t);
|
|
4725
4725
|
};
|
|
4726
4726
|
loadTransactionRules = async () => {
|
|
4727
4727
|
const t = await this.api.getTransactionRules();
|
|
4728
|
-
|
|
4728
|
+
U(() => this.transactionRules = t);
|
|
4729
4729
|
};
|
|
4730
4730
|
loadTransactions = async (t = this.cachedStartDate, i = ut()) => {
|
|
4731
4731
|
this.setIsLoading(!0), this.transactions = [];
|
|
@@ -4734,7 +4734,7 @@ class AI {
|
|
|
4734
4734
|
PA(t),
|
|
4735
4735
|
PA(i)
|
|
4736
4736
|
);
|
|
4737
|
-
|
|
4737
|
+
U(() => {
|
|
4738
4738
|
this.transactions = this.augmentTransactions(n);
|
|
4739
4739
|
});
|
|
4740
4740
|
} catch (n) {
|
|
@@ -4760,7 +4760,7 @@ class AI {
|
|
|
4760
4760
|
const i = this.transactions.findIndex((n) => n.guid === t);
|
|
4761
4761
|
if (i >= 0) {
|
|
4762
4762
|
const n = [...this.transactions];
|
|
4763
|
-
n.splice(i, 1),
|
|
4763
|
+
n.splice(i, 1), U(() => this.transactions = n);
|
|
4764
4764
|
}
|
|
4765
4765
|
};
|
|
4766
4766
|
setFilter = (t) => {
|
|
@@ -4779,7 +4779,7 @@ class AI {
|
|
|
4779
4779
|
r.push(s);
|
|
4780
4780
|
}
|
|
4781
4781
|
const o = this.transactions.findIndex((a) => a.guid === t.guid);
|
|
4782
|
-
o >= 0 &&
|
|
4782
|
+
o >= 0 && U(
|
|
4783
4783
|
() => this.transactions = this.augmentTransactions([
|
|
4784
4784
|
...this.transactions.slice(0, o),
|
|
4785
4785
|
n,
|
|
@@ -4797,7 +4797,7 @@ class AI {
|
|
|
4797
4797
|
s >= 0 && n.splice(s, 1);
|
|
4798
4798
|
});
|
|
4799
4799
|
const r = n.findIndex((a) => a.guid === t), o = n[r];
|
|
4800
|
-
o.has_been_split = !1, r >= 0 &&
|
|
4800
|
+
o.has_been_split = !1, r >= 0 && U(
|
|
4801
4801
|
() => this.transactions = [
|
|
4802
4802
|
...n.slice(0, r),
|
|
4803
4803
|
o,
|
|
@@ -4821,7 +4821,7 @@ class AI {
|
|
|
4821
4821
|
};
|
|
4822
4822
|
updateTransaction = async (t) => {
|
|
4823
4823
|
const i = await this.api.updateTransaction(t), n = this.transactions.findIndex((r) => r.guid === t.guid);
|
|
4824
|
-
n >= 0 &&
|
|
4824
|
+
n >= 0 && U(
|
|
4825
4825
|
() => this.transactions = this.augmentTransactions([
|
|
4826
4826
|
...this.transactions.slice(0, n),
|
|
4827
4827
|
i,
|
|
@@ -4934,7 +4934,7 @@ const fe = () => {
|
|
|
4934
4934
|
width: a = "100%",
|
|
4935
4935
|
zeroState: s = /* @__PURE__ */ e(aI, {})
|
|
4936
4936
|
}) => {
|
|
4937
|
-
const { isLoading: d, sortedTransactions: I } = uA(), { setShowInsights: f, toggleSplit: l } = fe(), { onEvent: E } =
|
|
4937
|
+
const { isLoading: d, sortedTransactions: I } = uA(), { setShowInsights: f, toggleSplit: l } = fe(), { onEvent: E } = F(), u = (P) => {
|
|
4938
4938
|
const m = I.find((Q) => Q.guid === P);
|
|
4939
4939
|
if (m?.has_been_split) {
|
|
4940
4940
|
l(m.guid);
|
|
@@ -5205,14 +5205,14 @@ const CI = ({
|
|
|
5205
5205
|
}
|
|
5206
5206
|
);
|
|
5207
5207
|
}, Qn = g(CI), bI = ({ parentCategory: A }) => {
|
|
5208
|
-
const [t, i] = h.useState(!1), { addCategory: n } = qA(), { categories: r } = z(), { onEvent: o } =
|
|
5208
|
+
const [t, i] = h.useState(!1), { addCategory: n } = qA(), { categories: r } = z(), { onEvent: o } = F(), { setShouldDisableDrawerScroll: a } = ft(), s = async (f) => {
|
|
5209
5209
|
await n(f.trim(), A.guid), o(ge.ON_SUBCATEGORY_ADDED), i(!1);
|
|
5210
5210
|
}, d = async () => {
|
|
5211
5211
|
o(ge.ON_SUBCATEGORY_ADD_CLICK), a(!0), i(!0);
|
|
5212
5212
|
}, I = () => {
|
|
5213
5213
|
i(!1), o(ge.ON_SUBCATEGORY_ADD_CANCEL_CLICK);
|
|
5214
5214
|
};
|
|
5215
|
-
return /* @__PURE__ */ c(
|
|
5215
|
+
return /* @__PURE__ */ c(k, { disableGutters: !0, disablePadding: !0, children: [
|
|
5216
5216
|
/* @__PURE__ */ e(oA, { onClick: d, sx: { ml: 60 }, children: /* @__PURE__ */ e(
|
|
5217
5217
|
iA,
|
|
5218
5218
|
{
|
|
@@ -5235,7 +5235,7 @@ const CI = ({
|
|
|
5235
5235
|
subCategory: t,
|
|
5236
5236
|
showRename: i
|
|
5237
5237
|
}) => {
|
|
5238
|
-
const { updateCategory: n } = qA(), { onEvent: r } =
|
|
5238
|
+
const { updateCategory: n } = qA(), { onEvent: r } = F(), o = async (s) => {
|
|
5239
5239
|
await n({ ...t, name: s }), r(ge.ON_SUBCATEGORY_SAVED), A(!1);
|
|
5240
5240
|
}, a = () => {
|
|
5241
5241
|
A(!1), r(ge.ON_SUBCATEGORY_EDIT_CANCEL_CLICK);
|
|
@@ -5256,7 +5256,7 @@ const CI = ({
|
|
|
5256
5256
|
setShowDelete: i,
|
|
5257
5257
|
subCategory: n
|
|
5258
5258
|
}) => {
|
|
5259
|
-
const { onEvent: r } =
|
|
5259
|
+
const { onEvent: r } = F(), { removeCategory: o } = qA(), a = () => {
|
|
5260
5260
|
i(!1), r(ge.ON_SUBCATEGORY_DELETE_CLICK);
|
|
5261
5261
|
}, s = async () => {
|
|
5262
5262
|
r(ge.ON_SUBCATEGORY_DELETED), await o(n.guid), i(!1);
|
|
@@ -5280,9 +5280,9 @@ const CI = ({
|
|
|
5280
5280
|
showSelected: a,
|
|
5281
5281
|
unselectable: s,
|
|
5282
5282
|
unselectableText: d
|
|
5283
|
-
} = ft(), { categories: I } = z(), { onEvent: f } =
|
|
5283
|
+
} = ft(), { categories: I } = z(), { onEvent: f } = F(), [l, E] = h.useState(!1), [u, R] = h.useState(!1), b = !!t.revision, P = t.guid === n, m = !s.some((w) => w === t.guid);
|
|
5284
5284
|
return /* @__PURE__ */ c(
|
|
5285
|
-
|
|
5285
|
+
k,
|
|
5286
5286
|
{
|
|
5287
5287
|
className: "mx-cat-subcategory-row",
|
|
5288
5288
|
disableGutters: !0,
|
|
@@ -5381,12 +5381,12 @@ const CI = ({
|
|
|
5381
5381
|
}
|
|
5382
5382
|
);
|
|
5383
5383
|
}, DI = g(QI), XI = ({ category: A, subCategories: t }) => {
|
|
5384
|
-
const { expandedGuid: i, searchValue: n, setExpandedGuid: r } = ft(), { onEvent: o } =
|
|
5384
|
+
const { expandedGuid: i, searchValue: n, setExpandedGuid: r } = ft(), { onEvent: o } = F(), a = A.guid === i, s = () => {
|
|
5385
5385
|
const d = A.guid !== i ? A.guid : null;
|
|
5386
5386
|
r(d), o(d ? ge.ON_CATEGORY_EXPANDED : ge.ON_CATEGORY_COLLAPSED);
|
|
5387
5387
|
};
|
|
5388
5388
|
return /* @__PURE__ */ c(h.Fragment, { children: [
|
|
5389
|
-
/* @__PURE__ */ e(
|
|
5389
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
|
|
5390
5390
|
oA,
|
|
5391
5391
|
{
|
|
5392
5392
|
"aria-controls": `subcategories-${A.guid}`,
|
|
@@ -5617,7 +5617,7 @@ class SI {
|
|
|
5617
5617
|
loadCategories = async () => {
|
|
5618
5618
|
try {
|
|
5619
5619
|
const t = await this.api.getCategories(), { default_categories: i } = this.globalStore.copyStore.copy.categories;
|
|
5620
|
-
|
|
5620
|
+
U(() => {
|
|
5621
5621
|
this.categories = t.map((n) => ({
|
|
5622
5622
|
...n,
|
|
5623
5623
|
name: i[n.guid] ? i[n.guid].replace(/&/g, "&") : n.name
|
|
@@ -5635,7 +5635,7 @@ class SI {
|
|
|
5635
5635
|
PA(n),
|
|
5636
5636
|
t
|
|
5637
5637
|
);
|
|
5638
|
-
|
|
5638
|
+
U(() => {
|
|
5639
5639
|
this.dateRangeCategoryTotals = r, this.setIsLoadingCategoryTotals(!1);
|
|
5640
5640
|
});
|
|
5641
5641
|
} catch (r) {
|
|
@@ -5646,7 +5646,7 @@ class SI {
|
|
|
5646
5646
|
const r = PA(LA(i ?? we(/* @__PURE__ */ new Date(), 11))), o = PA(NA(n ?? /* @__PURE__ */ new Date()));
|
|
5647
5647
|
try {
|
|
5648
5648
|
const a = await this.api.getMonthlyCategoryTotals(r, o, t);
|
|
5649
|
-
|
|
5649
|
+
U(() => {
|
|
5650
5650
|
this.monthlyCategoryTotals = a;
|
|
5651
5651
|
});
|
|
5652
5652
|
} catch (a) {
|
|
@@ -5665,7 +5665,7 @@ class SI {
|
|
|
5665
5665
|
PA(NA(n)),
|
|
5666
5666
|
t
|
|
5667
5667
|
);
|
|
5668
|
-
|
|
5668
|
+
U(() => {
|
|
5669
5669
|
this.dateRangeCategoryTotals = r, this.monthlyCategoryTotals = o, this.setIsLoadingCategoryTotals(!1);
|
|
5670
5670
|
});
|
|
5671
5671
|
} catch (r) {
|
|
@@ -5693,7 +5693,7 @@ class SI {
|
|
|
5693
5693
|
getCategoryName = (t) => this.categories.find((n) => n.guid === t)?.name ?? mi[t];
|
|
5694
5694
|
}
|
|
5695
5695
|
const Ko = ({ transaction: A }) => {
|
|
5696
|
-
const { addOrUpdateTransactionRule: t, updateTransaction: i } = uA(), { categories: n } = qA(), { onEvent: r } =
|
|
5696
|
+
const { addOrUpdateTransactionRule: t, updateTransaction: i } = uA(), { categories: n } = qA(), { onEvent: r } = F(), { setShouldDisableDrawerScroll: o, updateManualTransaction: a } = fe(), { transactions: s } = z(), [d, I] = h.useState(!1), [f, l] = h.useState(""), E = async (P) => {
|
|
5697
5697
|
await i({ ...A, category_guid: f }), P && await t(f, A), l(""), r(G.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
5698
5698
|
transaction_guid: A.guid
|
|
5699
5699
|
});
|
|
@@ -5716,7 +5716,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
5716
5716
|
[f]
|
|
5717
5717
|
);
|
|
5718
5718
|
return /* @__PURE__ */ c(h.Fragment, { children: [
|
|
5719
|
-
/* @__PURE__ */ e(
|
|
5719
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
|
|
5720
5720
|
oA,
|
|
5721
5721
|
{
|
|
5722
5722
|
onClick: () => {
|
|
@@ -5778,7 +5778,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
5778
5778
|
)
|
|
5779
5779
|
] });
|
|
5780
5780
|
}, Zo = ({ transaction: A }) => {
|
|
5781
|
-
const t = VA(), { onEvent: i } =
|
|
5781
|
+
const t = VA(), { onEvent: i } = F(), { updateTransaction: n } = uA(), { updateManualTransaction: r } = fe(), { common: o, transactions: a } = z(), [s, d] = h.useState(!1), [I, f] = h.useState(A.date), l = (u) => {
|
|
5782
5782
|
f(PA(u));
|
|
5783
5783
|
}, E = async () => {
|
|
5784
5784
|
if (A.is_manual && !A.guid) {
|
|
@@ -5788,7 +5788,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
5788
5788
|
await n({ ...A, date: I }), i(G.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: A.guid }), d(!1);
|
|
5789
5789
|
};
|
|
5790
5790
|
return /* @__PURE__ */ c(x, { className: "mx-txn-date-action", children: [
|
|
5791
|
-
/* @__PURE__ */ e(
|
|
5791
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
|
|
5792
5792
|
oA,
|
|
5793
5793
|
{
|
|
5794
5794
|
onClick: () => {
|
|
@@ -5835,11 +5835,11 @@ const Ko = ({ transaction: A }) => {
|
|
|
5835
5835
|
)
|
|
5836
5836
|
] });
|
|
5837
5837
|
}, YI = ({ transaction: A }) => {
|
|
5838
|
-
const { onEvent: t } =
|
|
5838
|
+
const { onEvent: t } = F(), { removeTransaction: i } = uA(), { setShouldDisableDrawerScroll: n } = fe(), { common: r, transactions: o } = z(), [a, s] = h.useState(!1), d = async () => {
|
|
5839
5839
|
await i(A.guid), t(S.ON_TRANSACTION_DELETE_DELETED);
|
|
5840
5840
|
};
|
|
5841
5841
|
return /* @__PURE__ */ c(x, { className: "mx-txn-delete", children: [
|
|
5842
|
-
A && /* @__PURE__ */ e(
|
|
5842
|
+
A && /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
|
|
5843
5843
|
oA,
|
|
5844
5844
|
{
|
|
5845
5845
|
onClick: () => {
|
|
@@ -5875,13 +5875,13 @@ const Ko = ({ transaction: A }) => {
|
|
|
5875
5875
|
)
|
|
5876
5876
|
] });
|
|
5877
5877
|
}, BI = g(YI), VI = ({ transaction: A }) => {
|
|
5878
|
-
const { onEvent: t } =
|
|
5878
|
+
const { onEvent: t } = F(), { updateTransaction: i } = uA(), { setShouldDisableDrawerScroll: n } = fe(), { common: r, transactions: o } = z(), [a, s] = h.useState(!1), d = async () => {
|
|
5879
5879
|
await i({ ...A, merchant_guid: "" }), t(G.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
|
5880
5880
|
transaction_guid: A.guid
|
|
5881
5881
|
});
|
|
5882
5882
|
};
|
|
5883
5883
|
return /* @__PURE__ */ c(x, { className: "mx-txn-delete-logo", children: [
|
|
5884
|
-
A && /* @__PURE__ */ e(
|
|
5884
|
+
A && /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
|
|
5885
5885
|
oA,
|
|
5886
5886
|
{
|
|
5887
5887
|
onClick: () => {
|
|
@@ -5915,13 +5915,13 @@ const Ko = ({ transaction: A }) => {
|
|
|
5915
5915
|
)
|
|
5916
5916
|
] });
|
|
5917
5917
|
}, UI = g(VI), kI = ({ transaction: A }) => {
|
|
5918
|
-
const { onEvent: t } =
|
|
5918
|
+
const { onEvent: t } = F(), { updateTransaction: i } = uA(), { setShouldDisableDrawerScroll: n } = fe(), { common: r, transactions: o } = z(), [a, s] = h.useState(!1), d = A.is_hidden, I = async () => {
|
|
5919
5919
|
await i({ ...A, is_hidden: !A.is_hidden }), t(
|
|
5920
5920
|
d ? S.ON_TRANSACTION_UNHIDDEN : S.ON_TRANSACTION_HIDDEN
|
|
5921
5921
|
);
|
|
5922
5922
|
};
|
|
5923
5923
|
return /* @__PURE__ */ c(x, { className: "mx-txn-hide-transaction", children: [
|
|
5924
|
-
A && /* @__PURE__ */ e(
|
|
5924
|
+
A && /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
|
|
5925
5925
|
oA,
|
|
5926
5926
|
{
|
|
5927
5927
|
"aria-checked": d,
|
|
@@ -6004,7 +6004,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6004
6004
|
] })
|
|
6005
6005
|
] });
|
|
6006
6006
|
}, WI = ({ transaction: A }) => {
|
|
6007
|
-
const { onEvent: t } =
|
|
6007
|
+
const { onEvent: t } = F(), { updateTransaction: i } = uA(), { updateManualTransaction: n } = fe(), { common: r, transactions: o } = z(), [a, s] = h.useState(!1), [d, I] = h.useState("");
|
|
6008
6008
|
h.useEffect(() => {
|
|
6009
6009
|
a && I(A.memo ? A.memo : "");
|
|
6010
6010
|
}, [a]);
|
|
@@ -6016,7 +6016,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6016
6016
|
await i({ ...A, memo: d }), t(G.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: A.guid }), s(!1);
|
|
6017
6017
|
};
|
|
6018
6018
|
return /* @__PURE__ */ c("div", { className: "mx-txn-memo-action", children: [
|
|
6019
|
-
/* @__PURE__ */ e(
|
|
6019
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
|
|
6020
6020
|
oA,
|
|
6021
6021
|
{
|
|
6022
6022
|
onClick: () => {
|
|
@@ -6079,7 +6079,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6079
6079
|
onUpdateAmount: n,
|
|
6080
6080
|
split: r
|
|
6081
6081
|
}) => {
|
|
6082
|
-
const o = VA(), { onEvent: a } =
|
|
6082
|
+
const o = VA(), { onEvent: a } = F(), { transactions: s } = z(), [d, I] = h.useState(`${r.amount}`), [f, l] = h.useState(!1), E = A === 0, u = (R) => {
|
|
6083
6083
|
isNaN(Number(R)) || (I(R), n(A, Number(R)));
|
|
6084
6084
|
};
|
|
6085
6085
|
return /* @__PURE__ */ c(
|
|
@@ -6181,7 +6181,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6181
6181
|
splits: r,
|
|
6182
6182
|
transaction: o
|
|
6183
6183
|
}) => {
|
|
6184
|
-
const a = VA(), { transactions: s } = z(), { onEvent: d } =
|
|
6184
|
+
const a = VA(), { transactions: s } = z(), { onEvent: d } = F(), [I, f] = h.useState("");
|
|
6185
6185
|
return h.useEffect(() => {
|
|
6186
6186
|
f(r.length <= 1 ? s.split_transaction_errors_min_splits : ""), f(
|
|
6187
6187
|
r[0].amount < 0 ? p(
|
|
@@ -6226,7 +6226,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6226
6226
|
) })
|
|
6227
6227
|
] });
|
|
6228
6228
|
}, _I = g(JI), $I = ({ transaction: A }) => {
|
|
6229
|
-
const { onEvent: t } =
|
|
6229
|
+
const { onEvent: t } = F(), { splitTransaction: i, unSplitTransaction: n } = uA(), { common: r, transactions: o } = z(), { setShouldDisableDrawerScroll: a } = fe(), { categories: s } = qA(), d = {
|
|
6230
6230
|
...A,
|
|
6231
6231
|
amount: A.amount - 1,
|
|
6232
6232
|
guid: "",
|
|
@@ -6286,7 +6286,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6286
6286
|
return N || J;
|
|
6287
6287
|
}, [R]);
|
|
6288
6288
|
return /* @__PURE__ */ c(h.Fragment, { children: [
|
|
6289
|
-
A && /* @__PURE__ */ e(
|
|
6289
|
+
A && /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(oA, { onClick: y, children: [
|
|
6290
6290
|
/* @__PURE__ */ e(mA, { children: /* @__PURE__ */ e(me, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(T, { name: "call_split", sx: { color: "text.primary" }, weight: te.Dark }) }) }),
|
|
6291
6291
|
/* @__PURE__ */ e(
|
|
6292
6292
|
iA,
|
|
@@ -6346,7 +6346,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6346
6346
|
)
|
|
6347
6347
|
] });
|
|
6348
6348
|
}, Af = g($I), ef = () => {
|
|
6349
|
-
const A = zA(), { onEvent: t } =
|
|
6349
|
+
const A = zA(), { onEvent: t } = F(), { addTag: i } = uA(), { transactions: n } = z(), [r, o] = h.useState(!1), [a, s] = h.useState(""), [d, I] = h.useState(""), f = h.useRef(null);
|
|
6350
6350
|
h.useEffect(() => {
|
|
6351
6351
|
r && f?.current?.focus();
|
|
6352
6352
|
}, [r]);
|
|
@@ -6433,7 +6433,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6433
6433
|
}
|
|
6434
6434
|
) });
|
|
6435
6435
|
}, rf = g(nf), of = ({ onTagChecked: A, selectedTags: t, tag: i }) => {
|
|
6436
|
-
const { onEvent: n } =
|
|
6436
|
+
const { onEvent: n } = F(), { removeTag: r, updateTag: o } = uA(), { common: a, transactions: s } = z(), [d, I] = h.useState(!1), [f, l] = h.useState(!1), [E, u] = h.useState(""), [R, b] = h.useState(""), P = async () => {
|
|
6437
6437
|
n(S.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await o({ ...i, name: E }), I(!1);
|
|
6438
6438
|
}, m = async () => {
|
|
6439
6439
|
n(S.ON_TRANSACTION_TAGS_TAG_DELETED), await r(i.guid), l(!1);
|
|
@@ -6447,7 +6447,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6447
6447
|
n(S.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), l(!0);
|
|
6448
6448
|
};
|
|
6449
6449
|
return /* @__PURE__ */ c(
|
|
6450
|
-
|
|
6450
|
+
k,
|
|
6451
6451
|
{
|
|
6452
6452
|
className: "mx-txn-transaction-manager-row",
|
|
6453
6453
|
disableGutters: !0,
|
|
@@ -6545,7 +6545,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6545
6545
|
] }, a.guid)) }) })
|
|
6546
6546
|
] });
|
|
6547
6547
|
}, cf = g(sf), df = ({ transaction: A }) => {
|
|
6548
|
-
const { onEvent: t } =
|
|
6548
|
+
const { onEvent: t } = F(), { tags: i, updateTaggings: n, updateTransaction: r } = uA(), { common: o, transactions: a } = z(), { updateManualTransaction: s } = fe(), [d, I] = h.useState(!1), [f, l] = h.useState(A.tags);
|
|
6549
6549
|
h.useEffect(() => {
|
|
6550
6550
|
l(A.tags);
|
|
6551
6551
|
}, [d, A]);
|
|
@@ -6565,7 +6565,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6565
6565
|
[i, A]
|
|
6566
6566
|
);
|
|
6567
6567
|
return /* @__PURE__ */ c(h.Fragment, { children: [
|
|
6568
|
-
/* @__PURE__ */ e(
|
|
6568
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
|
|
6569
6569
|
oA,
|
|
6570
6570
|
{
|
|
6571
6571
|
onClick: () => {
|
|
@@ -6600,7 +6600,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6600
6600
|
)
|
|
6601
6601
|
] });
|
|
6602
6602
|
}, $o = g(df), If = ({ transaction: A }) => {
|
|
6603
|
-
const { updateTransaction: t } = uA(), { common: i, transactions: n } = z(), { onEvent: r } =
|
|
6603
|
+
const { updateTransaction: t } = uA(), { common: i, transactions: n } = z(), { onEvent: r } = F(), [o, a] = h.useState(!1), [s, d] = h.useState(""), I = h.useRef(null);
|
|
6604
6604
|
h.useEffect(() => {
|
|
6605
6605
|
o && (d(A.description), I?.current?.focus());
|
|
6606
6606
|
}, [o]);
|
|
@@ -6651,7 +6651,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6651
6651
|
)
|
|
6652
6652
|
] }) });
|
|
6653
6653
|
}, ff = g(If), lf = ({ transaction: A }) => {
|
|
6654
|
-
const { updateTransaction: t } = uA(), { transactions: i } = z(), { onEvent: n } =
|
|
6654
|
+
const { updateTransaction: t } = uA(), { transactions: i } = z(), { onEvent: n } = F(), r = zA(), o = async () => {
|
|
6655
6655
|
n(G.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: A.guid }), await t({ ...A, is_flagged: !A.is_flagged });
|
|
6656
6656
|
};
|
|
6657
6657
|
return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
|
|
@@ -6687,7 +6687,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6687
6687
|
topActions: t = Sd,
|
|
6688
6688
|
transaction: i
|
|
6689
6689
|
}) => {
|
|
6690
|
-
const n = VA(), r = i?.number && i.number.length > 4, { onEvent: o } =
|
|
6690
|
+
const n = VA(), r = i?.number && i.number.length > 4, { onEvent: o } = F();
|
|
6691
6691
|
return h.useEffect(
|
|
6692
6692
|
() => o(G.TRANSACTION_DETAILS_VIEW, { transaction_guid: i.guid }),
|
|
6693
6693
|
[]
|
|
@@ -6921,7 +6921,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
6921
6921
|
tags: m,
|
|
6922
6922
|
transactions: Q,
|
|
6923
6923
|
updateTransaction: w
|
|
6924
|
-
} = uA(), { common: y, transactions: X } = z(), { userProfile: L } = Rt(), { onEvent: D } =
|
|
6924
|
+
} = uA(), { common: y, transactions: X } = z(), { userProfile: L } = Rt(), { onEvent: D } = F(), {
|
|
6925
6925
|
displayedDateRange: q,
|
|
6926
6926
|
isInitialized: N,
|
|
6927
6927
|
selectedAccountGuids: J,
|
|
@@ -7120,19 +7120,19 @@ const Ko = ({ transaction: A }) => {
|
|
|
7120
7120
|
start_date: PA(A.expectedDate)
|
|
7121
7121
|
}, n = `${Yt(A.expectedDate)}`, r = `${gt(A.expectedDate)}`, o = `${kt(A.expectedDate)}`;
|
|
7122
7122
|
switch (A.recurrenceType) {
|
|
7123
|
-
case
|
|
7123
|
+
case V.EveryWeek:
|
|
7124
7124
|
i.repeat_interval = "1", i.repeat_weekday = o;
|
|
7125
7125
|
break;
|
|
7126
|
-
case
|
|
7126
|
+
case V.EveryOtherWeek:
|
|
7127
7127
|
i.repeat_interval = "2", i.repeat_weekday = o;
|
|
7128
7128
|
break;
|
|
7129
|
-
case
|
|
7129
|
+
case V.EveryMonth:
|
|
7130
7130
|
i.repeat_day = n;
|
|
7131
7131
|
break;
|
|
7132
|
-
case
|
|
7132
|
+
case V.EveryQuarter:
|
|
7133
7133
|
i.repeat_day = n, i.repeat_interval = "3";
|
|
7134
7134
|
break;
|
|
7135
|
-
case
|
|
7135
|
+
case V.EveryYear:
|
|
7136
7136
|
i.repeat_day = n, i.repeat_month = r;
|
|
7137
7137
|
break;
|
|
7138
7138
|
}
|
|
@@ -7142,14 +7142,14 @@ const Ko = ({ transaction: A }) => {
|
|
|
7142
7142
|
occurs_on: hn(A.expectedDate, { representation: "date" }),
|
|
7143
7143
|
recurrence_type: A.recurrenceType
|
|
7144
7144
|
}), gf = ({ activity: A }) => {
|
|
7145
|
-
const { recurring: t } = z(), { cashflowSequences: i, scheduledPayments: n, updateCashflowSequence: r, updateScheduledPayment: o } = kA(), { onEvent: a } =
|
|
7146
|
-
{ id:
|
|
7147
|
-
{ id:
|
|
7148
|
-
{ id:
|
|
7149
|
-
{ id:
|
|
7150
|
-
{ id:
|
|
7151
|
-
{ id:
|
|
7152
|
-
{ id:
|
|
7145
|
+
const { recurring: t } = z(), { cashflowSequences: i, scheduledPayments: n, updateCashflowSequence: r, updateScheduledPayment: o } = kA(), { onEvent: a } = F(), [s, d] = h.useState(!1), I = A.activityType === TA.Income, f = [
|
|
7146
|
+
{ id: V.EveryWeek, label: t.frequency_every_week },
|
|
7147
|
+
{ id: V.EveryOtherWeek, label: t.frequency_every_other_week },
|
|
7148
|
+
{ id: V.EveryMonth, label: t.frequency_every_month },
|
|
7149
|
+
{ id: V.EveryOtherMonth, label: t.frequency_every_other_month },
|
|
7150
|
+
{ id: V.EveryQuarter, label: t.frequency_every_quarter },
|
|
7151
|
+
{ id: V.EveryOtherQuarter, label: t.frequency_every_other_quarter },
|
|
7152
|
+
{ id: V.EveryYear, label: t.frequency_every_year }
|
|
7153
7153
|
], l = async (R) => {
|
|
7154
7154
|
const b = { ...A, recurrenceType: R };
|
|
7155
7155
|
if (A.activityType === TA.Expense) {
|
|
@@ -7189,10 +7189,10 @@ const Ko = ({ transaction: A }) => {
|
|
|
7189
7189
|
(R) => (
|
|
7190
7190
|
// Filter out every other month and every other quarter when income since cashflow
|
|
7191
7191
|
// sequence doesn't support them
|
|
7192
|
-
A.activityType === TA.Expense || R.id !==
|
|
7192
|
+
A.activityType === TA.Expense || R.id !== V.EveryOtherMonth && R.id !== V.EveryOtherQuarter
|
|
7193
7193
|
)
|
|
7194
7194
|
).map((R) => /* @__PURE__ */ c(h.Fragment, { children: [
|
|
7195
|
-
/* @__PURE__ */ e(
|
|
7195
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(oA, { onClick: () => l(R.id), children: [
|
|
7196
7196
|
/* @__PURE__ */ e(
|
|
7197
7197
|
iA,
|
|
7198
7198
|
{
|
|
@@ -7208,7 +7208,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7208
7208
|
)
|
|
7209
7209
|
] });
|
|
7210
7210
|
}, pf = g(gf), zf = ({ activity: A }) => {
|
|
7211
|
-
const { recurring: t } = z(), { cashflowSequences: i, scheduledPayments: n, updateCashflowSequence: r, updateScheduledPayment: o } = kA(), { onEvent: a } =
|
|
7211
|
+
const { recurring: t } = z(), { cashflowSequences: i, scheduledPayments: n, updateCashflowSequence: r, updateScheduledPayment: o } = kA(), { onEvent: a } = F(), [s, d] = h.useState(!1), [I, f] = h.useState(A.expectedDate), l = A.activityType === TA.Income, E = () => {
|
|
7212
7212
|
f(A.expectedDate), d(!0), a(
|
|
7213
7213
|
l ? "recurring_transactions_widget_income_details_click_next_payment_due" : "recurring_transactions_widget_expense_details_click_next_payment_due",
|
|
7214
7214
|
{
|
|
@@ -7256,7 +7256,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7256
7256
|
)
|
|
7257
7257
|
] });
|
|
7258
7258
|
}, mf = g(zf), yf = ({ activity: A, onDeleted: t }) => {
|
|
7259
|
-
const { recurring: i } = z(), { categories: n } = qA(), { deleteCashflowSequence: r, deleteScheduledPayment: o, paidActivities: a } = kA(), { filter: s, setFilter: d, transactions: I } = uA(), { selectedAccountGuids: f } = bA(), { onEvent: l } =
|
|
7259
|
+
const { recurring: i } = z(), { categories: n } = qA(), { deleteCashflowSequence: r, deleteScheduledPayment: o, paidActivities: a } = kA(), { filter: s, setFilter: d, transactions: I } = uA(), { selectedAccountGuids: f } = bA(), { onEvent: l } = F(), [E, u] = h.useState(!1), [R, b] = h.useState(""), P = n.find((X) => X.guid === A.categoryGuid), m = A.activityType === TA.Income, Q = h.useMemo(
|
|
7260
7260
|
() => I.find((X) => X.guid === R),
|
|
7261
7261
|
[R]
|
|
7262
7262
|
);
|
|
@@ -7375,22 +7375,22 @@ const Ko = ({ transaction: A }) => {
|
|
|
7375
7375
|
}, xi = (A) => A ? { margin: "0 0 -6px -4px" } : void 0, Xn = ({ isOffset: A = !1, size: t = 16 }) => /* @__PURE__ */ e(rt, { size: t, sx: { ...xi(A) }, children: /* @__PURE__ */ e(Ac, { color: "primary", sx: { fontSize: t, ...Li } }) }), Ln = ({ isOffset: A = !1, size: t = 16 }) => /* @__PURE__ */ e(rt, { size: t, sx: { ...xi(A) }, children: /* @__PURE__ */ e(ec, { sx: { color: "categories.income", fontSize: t, ...Li } }) }), xn = ({ isOffset: A = !1, size: t = 16 }) => /* @__PURE__ */ e(rt, { size: t, sx: { ...xi(A) }, children: /* @__PURE__ */ e(ci, { color: "error", sx: { fontSize: t, ...Li } }) }), jn = ({ isOffset: A = !1, size: t = 16 }) => /* @__PURE__ */ e(rt, { size: t, sx: { ...xi(A) }, children: /* @__PURE__ */ e(gi, { color: "success", sx: { fontSize: t, ...Li } }) }), Xr = ({ copy: A, date: t, type: i }) => {
|
|
7376
7376
|
let n = t && Ro(t) ? p(A.monthly_ordinal, ee(t, "do")) : A.monthly;
|
|
7377
7377
|
switch (i) {
|
|
7378
|
-
case
|
|
7378
|
+
case V.EveryQuarter:
|
|
7379
7379
|
n = t ? p(A.quarterly_ordinal, ee(t, "do")) : A.quarterly;
|
|
7380
7380
|
break;
|
|
7381
|
-
case
|
|
7381
|
+
case V.EveryWeek:
|
|
7382
7382
|
n = t ? p(A.weekly_ordinal, ee(t, "do")) : A.weekly;
|
|
7383
7383
|
break;
|
|
7384
|
-
case
|
|
7384
|
+
case V.EveryYear:
|
|
7385
7385
|
n = t ? p(A.anually_ordinal, ee(t, "do")) : A.anually;
|
|
7386
7386
|
break;
|
|
7387
|
-
case
|
|
7387
|
+
case V.EveryOtherWeek:
|
|
7388
7388
|
n = t ? p(A.every_other_week_ordinal, ee(t, "do")) : A.every_other_week;
|
|
7389
7389
|
break;
|
|
7390
|
-
case
|
|
7390
|
+
case V.EveryOtherMonth:
|
|
7391
7391
|
n = t ? p(A.every_other_month_ordinal, ee(t, "do")) : A.every_other_month;
|
|
7392
7392
|
break;
|
|
7393
|
-
case
|
|
7393
|
+
case V.EveryOtherQuarter:
|
|
7394
7394
|
n = t ? p(A.every_other_quarter_ordinal, ee(t, "do")) : A.every_other_quarter;
|
|
7395
7395
|
break;
|
|
7396
7396
|
}
|
|
@@ -7439,7 +7439,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7439
7439
|
copy: r,
|
|
7440
7440
|
date: A.expectedDate,
|
|
7441
7441
|
type: A.recurrenceType
|
|
7442
|
-
} : { copy: r, date: null, type: A.recurrenceType })), /* @__PURE__ */ c(
|
|
7442
|
+
} : { copy: r, date: null, type: A.recurrenceType })), /* @__PURE__ */ c(k, { disableGutters: !0, disablePadding: !0, children: [
|
|
7443
7443
|
/* @__PURE__ */ c(oA, { onClick: () => {
|
|
7444
7444
|
a(A.sequenceGuid || A.scheduledPaymentGuid || ""), i(A);
|
|
7445
7445
|
}, children: [
|
|
@@ -7543,19 +7543,19 @@ const Ko = ({ transaction: A }) => {
|
|
|
7543
7543
|
transaction_type: A.transaction_type
|
|
7544
7544
|
};
|
|
7545
7545
|
switch (t) {
|
|
7546
|
-
case
|
|
7546
|
+
case V.EveryWeek:
|
|
7547
7547
|
n.repeat_interval = "1", n.repeat_weekday = `${kt(i)}`;
|
|
7548
7548
|
break;
|
|
7549
|
-
case
|
|
7549
|
+
case V.EveryOtherWeek:
|
|
7550
7550
|
n.repeat_interval = "2", n.repeat_weekday = `${kt(i)}`;
|
|
7551
7551
|
break;
|
|
7552
|
-
case
|
|
7552
|
+
case V.EveryMonth:
|
|
7553
7553
|
n.repeat_day = `${Yt(i)}`;
|
|
7554
7554
|
break;
|
|
7555
|
-
case
|
|
7555
|
+
case V.EveryQuarter:
|
|
7556
7556
|
n.repeat_interval = "3", n.repeat_day = `${Yt(i)}`;
|
|
7557
7557
|
break;
|
|
7558
|
-
case
|
|
7558
|
+
case V.EveryYear:
|
|
7559
7559
|
n.repeat_day = `${Yt(i)}`, n.repeat_month = `${gt(i)}`;
|
|
7560
7560
|
break;
|
|
7561
7561
|
}
|
|
@@ -7578,18 +7578,18 @@ const Ko = ({ transaction: A }) => {
|
|
|
7578
7578
|
merchant_guid: A.merchant_guid,
|
|
7579
7579
|
occurs_on: hn(i, { representation: "date" }),
|
|
7580
7580
|
recurrence_day: 0,
|
|
7581
|
-
recurrence_type:
|
|
7581
|
+
recurrence_type: V.EveryMonth
|
|
7582
7582
|
};
|
|
7583
7583
|
switch (t) {
|
|
7584
|
-
case
|
|
7585
|
-
case
|
|
7584
|
+
case V.EveryWeek:
|
|
7585
|
+
case V.EveryOtherWeek:
|
|
7586
7586
|
n.recurrence_day = kt(i);
|
|
7587
7587
|
break;
|
|
7588
|
-
case
|
|
7589
|
-
case
|
|
7590
|
-
case
|
|
7591
|
-
case
|
|
7592
|
-
case
|
|
7588
|
+
case V.EveryMonth:
|
|
7589
|
+
case V.EveryOtherMonth:
|
|
7590
|
+
case V.EveryQuarter:
|
|
7591
|
+
case V.EveryOtherQuarter:
|
|
7592
|
+
case V.EveryYear:
|
|
7593
7593
|
n.recurrence_day = Yt(i);
|
|
7594
7594
|
break;
|
|
7595
7595
|
}
|
|
@@ -7627,40 +7627,40 @@ const Ko = ({ transaction: A }) => {
|
|
|
7627
7627
|
transaction: a
|
|
7628
7628
|
}) => {
|
|
7629
7629
|
const { recurring: s } = z(), d = [
|
|
7630
|
-
{ id:
|
|
7631
|
-
{ id:
|
|
7632
|
-
{ id:
|
|
7633
|
-
{ id:
|
|
7634
|
-
{ id:
|
|
7635
|
-
{ id:
|
|
7636
|
-
{ id:
|
|
7630
|
+
{ id: V.EveryWeek, label: s.frequency_every_week },
|
|
7631
|
+
{ id: V.EveryOtherWeek, label: s.frequency_every_other_week },
|
|
7632
|
+
{ id: V.EveryMonth, label: s.frequency_every_month },
|
|
7633
|
+
{ id: V.EveryOtherMonth, label: s.frequency_every_other_month },
|
|
7634
|
+
{ id: V.EveryQuarter, label: s.frequency_every_quarter },
|
|
7635
|
+
{ id: V.EveryOtherQuarter, label: s.frequency_every_other_quarter },
|
|
7636
|
+
{ id: V.EveryYear, label: s.frequency_every_year }
|
|
7637
7637
|
];
|
|
7638
7638
|
h.useEffect(() => {
|
|
7639
7639
|
const f = yA(a.date);
|
|
7640
|
-
o(or(f)), r(
|
|
7640
|
+
o(or(f)), r(V.EveryMonth);
|
|
7641
7641
|
}, [a]);
|
|
7642
7642
|
const I = (f) => {
|
|
7643
7643
|
const l = yA(a.date);
|
|
7644
7644
|
switch (Number(f.target.value)) {
|
|
7645
|
-
case
|
|
7645
|
+
case V.EveryWeek:
|
|
7646
7646
|
o(Hn(l));
|
|
7647
7647
|
break;
|
|
7648
|
-
case
|
|
7648
|
+
case V.EveryOtherWeek:
|
|
7649
7649
|
o(jc(l));
|
|
7650
7650
|
break;
|
|
7651
|
-
case
|
|
7651
|
+
case V.EveryMonth:
|
|
7652
7652
|
o(or(l));
|
|
7653
7653
|
break;
|
|
7654
|
-
case
|
|
7654
|
+
case V.EveryOtherMonth:
|
|
7655
7655
|
o(Oc(l));
|
|
7656
7656
|
break;
|
|
7657
|
-
case
|
|
7657
|
+
case V.EveryQuarter:
|
|
7658
7658
|
o(Do(l));
|
|
7659
7659
|
break;
|
|
7660
|
-
case
|
|
7660
|
+
case V.EveryOtherQuarter:
|
|
7661
7661
|
o(qc(l));
|
|
7662
7662
|
break;
|
|
7663
|
-
case
|
|
7663
|
+
case V.EveryYear:
|
|
7664
7664
|
o(Tc(l));
|
|
7665
7665
|
break;
|
|
7666
7666
|
}
|
|
@@ -7705,7 +7705,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7705
7705
|
label: t,
|
|
7706
7706
|
onAddActivity: i = () => null
|
|
7707
7707
|
}) => {
|
|
7708
|
-
const { recurring: n } = z(), { addCashflowEvent: r, addCashflowSequence: o, addScheduledPayment: a } = kA(), { filter: s, setFilter: d, transactions: I } = uA(), [f, l] = h.useState(!1), [E, u] = h.useState(""), [R, b] = h.useState(
|
|
7708
|
+
const { recurring: n } = z(), { addCashflowEvent: r, addCashflowSequence: o, addScheduledPayment: a } = kA(), { filter: s, setFilter: d, transactions: I } = uA(), [f, l] = h.useState(!1), [E, u] = h.useState(""), [R, b] = h.useState(V.EveryMonth), [P, m] = h.useState(null), Q = h.useMemo(
|
|
7709
7709
|
() => I.find((L) => L.guid === E),
|
|
7710
7710
|
[E]
|
|
7711
7711
|
), w = () => {
|
|
@@ -7730,7 +7730,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7730
7730
|
u(""), l(!1);
|
|
7731
7731
|
};
|
|
7732
7732
|
return /* @__PURE__ */ c(x, { children: [
|
|
7733
|
-
/* @__PURE__ */ e(
|
|
7733
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ e(oA, { onClick: w, children: /* @__PURE__ */ e(iA, { children: /* @__PURE__ */ c(C, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
7734
7734
|
/* @__PURE__ */ c(C, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
7735
7735
|
/* @__PURE__ */ e(T, { fill: !0, name: "add_box", size: 24, sx: { color: "action.active" } }),
|
|
7736
7736
|
/* @__PURE__ */ e(v, { bold: !0, sx: { color: "action.active" }, variant: "Body", children: t })
|
|
@@ -7799,7 +7799,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7799
7799
|
scheduledPaymentGuid: n.guid
|
|
7800
7800
|
};
|
|
7801
7801
|
}), Mf = () => {
|
|
7802
|
-
const { recurring: A } = z(), { scheduledPayments: t } = kA(), { transactions: i } = uA(), { selectedAccounts: n } = bA(), { onEvent: r } =
|
|
7802
|
+
const { recurring: A } = z(), { scheduledPayments: t } = kA(), { transactions: i } = uA(), { selectedAccounts: n } = bA(), { onEvent: r } = F(), o = Tf(n, t, i), a = (d) => {
|
|
7803
7803
|
r(G.RECURRING_ACTIVITY_CLICK_EXPENSE, {
|
|
7804
7804
|
transaction_guid: d.transactionGuid
|
|
7805
7805
|
});
|
|
@@ -7816,7 +7816,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7816
7816
|
}, Gf = g(Mf), on = (A) => {
|
|
7817
7817
|
let t = A.user_name || A.feed_name || "";
|
|
7818
7818
|
return A.account_number && (t = `${t} *${A.account_number}`), t;
|
|
7819
|
-
}, an = (A) => A ? A.repeat_interval === "1" ?
|
|
7819
|
+
}, an = (A) => A ? A.repeat_interval === "1" ? V.EveryWeek : A.repeat_interval === "2" ? V.EveryOtherWeek : A.repeat_day && !A.repeat_month && !A.repeat_interval ? V.EveryMonth : A.repeat_day && A.repeat_interval === "3" ? V.EveryQuarter : A.repeat_day && A.repeat_month ? V.EveryYear : V.Unknown : V.Unknown, Nf = (A, t, i, n, r, o) => {
|
|
7820
7820
|
const a = t.filter((f) => {
|
|
7821
7821
|
const l = r.find((u) => u.guid === f.cashflow_sequence_guid), E = o.find((u) => u.guid === f.transaction_guid);
|
|
7822
7822
|
return l?.end_date === null && E;
|
|
@@ -7894,14 +7894,14 @@ const Ko = ({ transaction: A }) => {
|
|
|
7894
7894
|
}, d = t.recurrence_day, I = aA(), f = LA(aA()), l = Te(aA(), 30);
|
|
7895
7895
|
let E = f;
|
|
7896
7896
|
switch (t.recurrence_type) {
|
|
7897
|
-
case
|
|
7897
|
+
case V.EveryWeek:
|
|
7898
7898
|
for (E = Ji(E, d); QA(E, l); )
|
|
7899
7899
|
n.push({
|
|
7900
7900
|
...s,
|
|
7901
7901
|
expectedDate: E
|
|
7902
7902
|
}), E = Ji(E, d);
|
|
7903
7903
|
break;
|
|
7904
|
-
case
|
|
7904
|
+
case V.EveryOtherWeek:
|
|
7905
7905
|
if (QA(a, f))
|
|
7906
7906
|
for (E = Ht(a, 2); QA(E, l); )
|
|
7907
7907
|
mt(E, f) && n.push({
|
|
@@ -7924,7 +7924,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7924
7924
|
}), E = Ht(E, 2);
|
|
7925
7925
|
}
|
|
7926
7926
|
break;
|
|
7927
|
-
case
|
|
7927
|
+
case V.EveryMonth:
|
|
7928
7928
|
n.push({
|
|
7929
7929
|
...s,
|
|
7930
7930
|
expectedDate: _i(E, d)
|
|
@@ -7933,7 +7933,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7933
7933
|
expectedDate: le(_i(E, d), 1)
|
|
7934
7934
|
});
|
|
7935
7935
|
break;
|
|
7936
|
-
case
|
|
7936
|
+
case V.EveryOtherMonth:
|
|
7937
7937
|
QA(a, f) ? QA(le(a, 2), l) && n.push({
|
|
7938
7938
|
...s,
|
|
7939
7939
|
expectedDate: le(a, 2)
|
|
@@ -7942,7 +7942,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7942
7942
|
expectedDate: a
|
|
7943
7943
|
});
|
|
7944
7944
|
break;
|
|
7945
|
-
case
|
|
7945
|
+
case V.EveryQuarter:
|
|
7946
7946
|
QA(a, f) ? QA(ht(a, 1), l) && n.push({
|
|
7947
7947
|
...s,
|
|
7948
7948
|
expectedDate: ht(a, 1)
|
|
@@ -7951,7 +7951,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7951
7951
|
expectedDate: a
|
|
7952
7952
|
});
|
|
7953
7953
|
break;
|
|
7954
|
-
case
|
|
7954
|
+
case V.EveryOtherQuarter:
|
|
7955
7955
|
QA(a, f) ? QA(ht(a, 2), l) && n.push({
|
|
7956
7956
|
...s,
|
|
7957
7957
|
expectedDate: ht(a, 2)
|
|
@@ -7960,7 +7960,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7960
7960
|
expectedDate: a
|
|
7961
7961
|
});
|
|
7962
7962
|
break;
|
|
7963
|
-
case
|
|
7963
|
+
case V.EveryYear:
|
|
7964
7964
|
QA(a, f) ? QA(Ut(a, 1), l) && n.push({
|
|
7965
7965
|
...s,
|
|
7966
7966
|
expectedDate: Ut(a, 1)
|
|
@@ -7994,7 +7994,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
7994
7994
|
sequenceGuid: o.guid
|
|
7995
7995
|
};
|
|
7996
7996
|
}), Bf = () => {
|
|
7997
|
-
const { recurring: A } = z(), { selectedAccounts: t } = bA(), { cashflowEvents: i, cashflowSequences: n, projectedEvents: r } = kA(), { transactions: o } = uA(), { onEvent: a } =
|
|
7997
|
+
const { recurring: A } = z(), { selectedAccounts: t } = bA(), { cashflowEvents: i, cashflowSequences: n, projectedEvents: r } = kA(), { transactions: o } = uA(), { onEvent: a } = F(), s = Yf(
|
|
7998
7998
|
t,
|
|
7999
7999
|
i,
|
|
8000
8000
|
r,
|
|
@@ -8015,7 +8015,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
8015
8015
|
/* @__PURE__ */ e(aa, { isIncome: !0, label: A.add_income, onAddActivity: I })
|
|
8016
8016
|
] });
|
|
8017
8017
|
}, On = g(Bf), Vf = () => {
|
|
8018
|
-
const [A, t] = h.useState(0), { onEvent: i } =
|
|
8018
|
+
const [A, t] = h.useState(0), { onEvent: i } = F(), { recurring: n } = z();
|
|
8019
8019
|
return /* @__PURE__ */ c(x, { bgcolor: "background.default", height: "100%", children: [
|
|
8020
8020
|
/* @__PURE__ */ c(
|
|
8021
8021
|
je,
|
|
@@ -8125,7 +8125,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
8125
8125
|
}
|
|
8126
8126
|
);
|
|
8127
8127
|
}, Wf = g(Ff), Lr = 58, Kf = () => {
|
|
8128
|
-
const A = zA(), { onEvent: t } =
|
|
8128
|
+
const A = zA(), { onEvent: t } = F(), { selectedDay: i } = kA(), [n, r] = h.useState(
|
|
8129
8129
|
Ar(/* @__PURE__ */ new Date()) * qt + Lr
|
|
8130
8130
|
), o = (s) => {
|
|
8131
8131
|
r(Ar(s) * qt + Lr), t(G.RECURRING_ACTIVITY_CLICK_CALENDAR_RIGHT);
|
|
@@ -8215,7 +8215,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
8215
8215
|
),
|
|
8216
8216
|
/* @__PURE__ */ e(M, { sx: { mx: 24 } })
|
|
8217
8217
|
] })) : s.map((d) => /* @__PURE__ */ c(_, { children: [
|
|
8218
|
-
/* @__PURE__ */ e(
|
|
8218
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
8219
8219
|
nA,
|
|
8220
8220
|
{
|
|
8221
8221
|
subheader: /* @__PURE__ */ e(De, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(v, { bold: !0, variant: "XSmall", children: eA(
|
|
@@ -8282,7 +8282,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
8282
8282
|
selectedDayActivities: s,
|
|
8283
8283
|
setSelectedDay: d,
|
|
8284
8284
|
upcomingActivities: I
|
|
8285
|
-
} = kA(), [f, l] = h.useState(0), { onEvent: E } =
|
|
8285
|
+
} = kA(), [f, l] = h.useState(0), { onEvent: E } = F(), u = n.filter(Vi), R = o.filter(Vi), b = r.filter(Vi), P = u.filter(ni).reduce(Mt, 0), m = R.filter(ni).reduce(Mt, 0), Q = b.filter(ni).reduce(Mt, 0), w = u.filter(ni).length, y = u.filter(Bi).reduce(Mt, 0), X = R.filter(Bi).reduce(Mt, 0), L = u.filter(Bi).length, D = (J, Y) => {
|
|
8286
8286
|
l(Y);
|
|
8287
8287
|
}, q = (J) => {
|
|
8288
8288
|
E(G.RECURRING_ACTIVITY_CLICK_UPCOMING, {
|
|
@@ -8364,7 +8364,7 @@ const Ko = ({ transaction: A }) => {
|
|
|
8364
8364
|
] }) })
|
|
8365
8365
|
] });
|
|
8366
8366
|
}, Al = g($f), el = ({ onBackClick: A, sx: t = {} }) => {
|
|
8367
|
-
const { accounts: i } = CA(), { recurring: n } = z(), { isInitialized: r, selectedAccountGuids: o, setSelectedAccounts: a } = bA(), { setFilter: s } = uA(), { isLoading: d } = kA(), { onEvent: I } =
|
|
8367
|
+
const { accounts: i } = CA(), { recurring: n } = z(), { isInitialized: r, selectedAccountGuids: o, setSelectedAccounts: a } = bA(), { setFilter: s } = uA(), { isLoading: d } = kA(), { onEvent: I } = F();
|
|
8368
8368
|
h.useEffect(() => {
|
|
8369
8369
|
a(i);
|
|
8370
8370
|
}, [i]), h.useEffect(() => {
|
|
@@ -8511,7 +8511,7 @@ class rl {
|
|
|
8511
8511
|
addCashflowEvent = async (t) => {
|
|
8512
8512
|
try {
|
|
8513
8513
|
const i = await this.cashflowApi.addCashflowEvent(t);
|
|
8514
|
-
|
|
8514
|
+
U(() => {
|
|
8515
8515
|
this.cashflowEvents = [...this.cashflowEvents, i];
|
|
8516
8516
|
});
|
|
8517
8517
|
} catch (i) {
|
|
@@ -8532,7 +8532,7 @@ class rl {
|
|
|
8532
8532
|
await this.globalStore.transactionStore.updateTransaction({
|
|
8533
8533
|
...i,
|
|
8534
8534
|
scheduled_payment_guid: n.guid
|
|
8535
|
-
}),
|
|
8535
|
+
}), U(() => {
|
|
8536
8536
|
this.scheduledPayments = [...this.scheduledPayments, n];
|
|
8537
8537
|
});
|
|
8538
8538
|
} catch (n) {
|
|
@@ -8548,7 +8548,7 @@ class rl {
|
|
|
8548
8548
|
};
|
|
8549
8549
|
deleteScheduledPayment = async (t) => {
|
|
8550
8550
|
try {
|
|
8551
|
-
await this.api.deleteScheduledPayment(t),
|
|
8551
|
+
await this.api.deleteScheduledPayment(t), U(() => {
|
|
8552
8552
|
const i = this.scheduledPayments.findIndex((n) => n.guid === t);
|
|
8553
8553
|
i >= 0 && this.scheduledPayments.splice(i, 1);
|
|
8554
8554
|
});
|
|
@@ -8558,7 +8558,7 @@ class rl {
|
|
|
8558
8558
|
};
|
|
8559
8559
|
loadActivity = () => {
|
|
8560
8560
|
this.isLoading = !0, Promise.all([this.loadExpenseActivity(), this.loadIncomeActivity()]).finally(
|
|
8561
|
-
() =>
|
|
8561
|
+
() => U(() => {
|
|
8562
8562
|
this.isLoading = !1;
|
|
8563
8563
|
})
|
|
8564
8564
|
);
|
|
@@ -8571,7 +8571,7 @@ class rl {
|
|
|
8571
8571
|
};
|
|
8572
8572
|
loadCashflowSequences = async () => {
|
|
8573
8573
|
const t = await this.cashflowApi.getCashflowSequences();
|
|
8574
|
-
|
|
8574
|
+
U(() => {
|
|
8575
8575
|
this.cashflowSequences = t.filter(
|
|
8576
8576
|
(i) => i.transaction_type === se.CREDIT
|
|
8577
8577
|
);
|
|
@@ -8583,7 +8583,7 @@ class rl {
|
|
|
8583
8583
|
LA(aA()),
|
|
8584
8584
|
Te(aA(), 30)
|
|
8585
8585
|
);
|
|
8586
|
-
|
|
8586
|
+
U(() => {
|
|
8587
8587
|
this.projectedEvents = t.filter(
|
|
8588
8588
|
(i) => i.transaction_type === se.CREDIT
|
|
8589
8589
|
);
|
|
@@ -8598,7 +8598,7 @@ class rl {
|
|
|
8598
8598
|
Le(aA(), 90),
|
|
8599
8599
|
NA(aA())
|
|
8600
8600
|
);
|
|
8601
|
-
|
|
8601
|
+
U(() => {
|
|
8602
8602
|
this.cashflowEvents = t.filter(
|
|
8603
8603
|
(i) => i.transaction_type === se.CREDIT
|
|
8604
8604
|
);
|
|
@@ -8610,7 +8610,7 @@ class rl {
|
|
|
8610
8610
|
loadScheduledPayments = async () => {
|
|
8611
8611
|
try {
|
|
8612
8612
|
const t = await this.api.getScheduledPayments();
|
|
8613
|
-
|
|
8613
|
+
U(() => {
|
|
8614
8614
|
this.scheduledPayments = t;
|
|
8615
8615
|
});
|
|
8616
8616
|
} catch (t) {
|
|
@@ -8644,7 +8644,7 @@ class rl {
|
|
|
8644
8644
|
try {
|
|
8645
8645
|
const i = await this.api.updateScheduledPayment(t), n = this.scheduledPayments.findIndex((r) => r.guid === t.guid);
|
|
8646
8646
|
if (n < 0) return;
|
|
8647
|
-
|
|
8647
|
+
U(() => {
|
|
8648
8648
|
this.scheduledPayments = [
|
|
8649
8649
|
...this.scheduledPayments.slice(0, n),
|
|
8650
8650
|
i,
|
|
@@ -8831,9 +8831,9 @@ const ol = {
|
|
|
8831
8831
|
}
|
|
8832
8832
|
)
|
|
8833
8833
|
] });
|
|
8834
|
-
return /* @__PURE__ */ e(
|
|
8834
|
+
return /* @__PURE__ */ e(k, { sx: { backgroundColor: "background.paper" }, ...i, children: t ? /* @__PURE__ */ e(oA, { alignItems: "flex-start", onClick: t, sx: { px: 24 }, children: f }) : f });
|
|
8835
8835
|
}, ji = g(ll), hl = ({ remaining: A }) => /* @__PURE__ */ e(
|
|
8836
|
-
|
|
8836
|
+
k,
|
|
8837
8837
|
{
|
|
8838
8838
|
sx: {
|
|
8839
8839
|
alignItems: "center",
|
|
@@ -8850,7 +8850,7 @@ const ol = {
|
|
|
8850
8850
|
);
|
|
8851
8851
|
var Jt = /* @__PURE__ */ ((A) => (A.EXPENSE = "expense", A.INCOME = "income", A))(Jt || {});
|
|
8852
8852
|
const El = ({ activity: A }) => /* @__PURE__ */ c(_, { children: [
|
|
8853
|
-
/* @__PURE__ */ c(
|
|
8853
|
+
/* @__PURE__ */ c(k, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
|
|
8854
8854
|
/* @__PURE__ */ c(C, { alignItems: "center", height: 32, width: 32, children: [
|
|
8855
8855
|
/* @__PURE__ */ e(v, { bold: !0, sx: { fontSize: 11 }, children: eA(A.expectedDate, $.MONTH) }),
|
|
8856
8856
|
/* @__PURE__ */ e(v, { bold: !0, sx: { fontSize: 11 }, children: eA(A.expectedDate, $.DAY) })
|
|
@@ -8936,7 +8936,7 @@ const El = ({ activity: A }) => /* @__PURE__ */ c(_, { children: [
|
|
|
8936
8936
|
}
|
|
8937
8937
|
),
|
|
8938
8938
|
/* @__PURE__ */ e(M, {}),
|
|
8939
|
-
s.length > 0 && /* @__PURE__ */ e(
|
|
8939
|
+
s.length > 0 && /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
8940
8940
|
nA,
|
|
8941
8941
|
{
|
|
8942
8942
|
subheader: /* @__PURE__ */ e(Or, { total: I, type: Jt.INCOME }),
|
|
@@ -8944,7 +8944,7 @@ const El = ({ activity: A }) => /* @__PURE__ */ c(_, { children: [
|
|
|
8944
8944
|
children: s.map((l) => /* @__PURE__ */ e(jr, { activity: l }, l.sequenceGuid))
|
|
8945
8945
|
}
|
|
8946
8946
|
) }),
|
|
8947
|
-
d.length > 0 && /* @__PURE__ */ e(
|
|
8947
|
+
d.length > 0 && /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
8948
8948
|
nA,
|
|
8949
8949
|
{
|
|
8950
8950
|
subheader: /* @__PURE__ */ e(Or, { total: f, type: Jt.EXPENSE }),
|
|
@@ -9106,7 +9106,7 @@ const El = ({ activity: A }) => /* @__PURE__ */ c(_, { children: [
|
|
|
9106
9106
|
borderRadius: 1,
|
|
9107
9107
|
marginBottom: 24
|
|
9108
9108
|
},
|
|
9109
|
-
children: /* @__PURE__ */ e(
|
|
9109
|
+
children: /* @__PURE__ */ e(k, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ c(C, { width: "100%", children: [
|
|
9110
9110
|
/* @__PURE__ */ c(
|
|
9111
9111
|
C,
|
|
9112
9112
|
{
|
|
@@ -9185,7 +9185,7 @@ const El = ({ activity: A }) => /* @__PURE__ */ c(_, { children: [
|
|
|
9185
9185
|
}
|
|
9186
9186
|
);
|
|
9187
9187
|
}, Cl = g(Pl), bl = () => {
|
|
9188
|
-
const { cashflow: A } = z(), { isDesktop: t } = xA(), { onEvent: i } =
|
|
9188
|
+
const { cashflow: A } = z(), { isDesktop: t } = xA(), { onEvent: i } = F(), [n, r] = h.useState(0), o = (a, s) => {
|
|
9189
9189
|
r(s);
|
|
9190
9190
|
};
|
|
9191
9191
|
return h.useEffect(() => {
|
|
@@ -9450,7 +9450,7 @@ const El = ({ activity: A }) => /* @__PURE__ */ c(_, { children: [
|
|
|
9450
9450
|
transform: rotate(360deg);
|
|
9451
9451
|
}
|
|
9452
9452
|
`, Ll = () => {
|
|
9453
|
-
const { addCashflowEvent: A, addCashflowSequence: t, cashflowSequences: i } = kA(), { cashflow: n, common: r } = z(), { completeOnboarding: o } = pn(), { isDirty: a } = Xt(), { isMobile: s } = xA(), { setDisplayedDate: d } = bA(), { filter: I, setFilter: f, transactions: l } = uA(), E = zA(), [u, R] = qe(!0), [b, P] = h.useState(
|
|
9453
|
+
const { addCashflowEvent: A, addCashflowSequence: t, cashflowSequences: i } = kA(), { cashflow: n, common: r } = z(), { completeOnboarding: o } = pn(), { isDirty: a } = Xt(), { isMobile: s } = xA(), { setDisplayedDate: d } = bA(), { filter: I, setFilter: f, transactions: l } = uA(), E = zA(), [u, R] = qe(!0), [b, P] = h.useState(V.EveryMonth), [m, Q] = qe(!1), [w, y] = h.useState(null), [X, L] = qe(1), [D, q] = qe([]), [N, J] = qe(""), Y = h.useMemo(
|
|
9454
9454
|
() => l.find((sA) => sA.guid === N),
|
|
9455
9455
|
[N]
|
|
9456
9456
|
), W = !!i.length, tA = async () => {
|
|
@@ -9623,7 +9623,7 @@ const El = ({ activity: A }) => /* @__PURE__ */ c(_, { children: [
|
|
|
9623
9623
|
setSelectedAccounts: r,
|
|
9624
9624
|
shouldDisableNextDate: o,
|
|
9625
9625
|
shouldDisablePrevDate: a
|
|
9626
|
-
} = bA(), { onEvent: s } =
|
|
9626
|
+
} = bA(), { onEvent: s } = F(), { cashAccounts: d } = CA(), { setFilter: I } = uA(), { userProfile: f } = Rt(), { dateRange: l, setSelectedCashAccounts: E } = Xt(), { cashflow: u } = z(), [R, b] = h.useState(!1);
|
|
9627
9627
|
return h.useEffect(() => {
|
|
9628
9628
|
r(d);
|
|
9629
9629
|
}, [d]), h.useEffect(() => {
|
|
@@ -10360,7 +10360,7 @@ const ha = ({
|
|
|
10360
10360
|
onClickArea: o,
|
|
10361
10361
|
onHoverArea: a
|
|
10362
10362
|
}) => {
|
|
10363
|
-
const s = ZA(), { onEvent: d } =
|
|
10363
|
+
const s = ZA(), { onEvent: d } = F(), I = n.filter((y) => !y.is_impossible), f = [
|
|
10364
10364
|
...new Set(
|
|
10365
10365
|
I.flatMap((y) => y.dataset.map((X) => new Date(X.x).getTime()))
|
|
10366
10366
|
)
|
|
@@ -10502,7 +10502,7 @@ const ha = ({
|
|
|
10502
10502
|
)
|
|
10503
10503
|
] });
|
|
10504
10504
|
}, oh = g(rh), ah = () => {
|
|
10505
|
-
const A = _e(), { onEvent: t } =
|
|
10505
|
+
const A = _e(), { onEvent: t } = F(), { debts: i } = z(), { selectedDebtChartData: n, showCompleted: r, showError: o } = Ge();
|
|
10506
10506
|
return h.useEffect(() => t(G.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(nA, { children: o || r ? /* @__PURE__ */ e(
|
|
10507
10507
|
v,
|
|
10508
10508
|
{
|
|
@@ -10651,7 +10651,7 @@ const ha = ({
|
|
|
10651
10651
|
onSave: I,
|
|
10652
10652
|
primaryText: t.details_original_balance,
|
|
10653
10653
|
secondaryText: O(A.initial_amount, "0,0"),
|
|
10654
|
-
zeroStateText: A.initial_amount
|
|
10654
|
+
zeroStateText: !A.initial_amount && !A.is_complete ? t.add_original_balance : void 0,
|
|
10655
10655
|
children: /* @__PURE__ */ e(
|
|
10656
10656
|
Me,
|
|
10657
10657
|
{
|
|
@@ -10667,7 +10667,7 @@ const ha = ({
|
|
|
10667
10667
|
}
|
|
10668
10668
|
);
|
|
10669
10669
|
}), ch = g(({ debt: A }) => {
|
|
10670
|
-
const { debts: t } = z(), { updateAccount: i } = CA(), { onEvent: n } =
|
|
10670
|
+
const { debts: t } = z(), { updateAccount: i } = CA(), { onEvent: n } = F(), [r, o] = h.useState(A.interest_rate ?? 0), a = r < 0, s = async () => {
|
|
10671
10671
|
await i({ ...A.account, interest_rate: r }), A.interest_rate = r, n(G.DEBTS_SAVE_RATE_ACTION, { account_guid: A.guid });
|
|
10672
10672
|
}, d = () => {
|
|
10673
10673
|
setTimeout(() => {
|
|
@@ -10697,7 +10697,7 @@ const ha = ({
|
|
|
10697
10697
|
}
|
|
10698
10698
|
);
|
|
10699
10699
|
}), dh = g(({ debt: A }) => {
|
|
10700
|
-
const { debts: t } = z(), { updateAccount: i } = CA(), { onEvent: n } =
|
|
10700
|
+
const { debts: t } = z(), { updateAccount: i } = CA(), { onEvent: n } = F(), [r, o] = h.useState(A.monthly_payment ?? 0), a = r < 0 || r > 9999999999e-2, s = async () => {
|
|
10701
10701
|
await i({ ...A.account, minimum_payment: r }), A.monthly_payment = r, n(G.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: A.guid });
|
|
10702
10702
|
}, d = () => {
|
|
10703
10703
|
setTimeout(() => {
|
|
@@ -10729,7 +10729,7 @@ const ha = ({
|
|
|
10729
10729
|
}
|
|
10730
10730
|
);
|
|
10731
10731
|
}), Ih = g(({ debt: A }) => {
|
|
10732
|
-
const { debts: t } = z(), { updateAccount: i } = CA(), { onEvent: n } =
|
|
10732
|
+
const { debts: t } = z(), { updateAccount: i } = CA(), { onEvent: n } = F(), [r, o] = h.useState(A.original_balance ?? 0), a = r < 0 || r > 9999999999e-2, s = async () => {
|
|
10733
10733
|
await i({ ...A.account, original_balance: r }), A.original_balance = r, n(G.DEBTS_SAVE_BALANCE_ACTION, { account_guid: A.guid });
|
|
10734
10734
|
}, d = () => {
|
|
10735
10735
|
setTimeout(() => {
|
|
@@ -10761,7 +10761,7 @@ const ha = ({
|
|
|
10761
10761
|
}
|
|
10762
10762
|
);
|
|
10763
10763
|
}), fh = () => {
|
|
10764
|
-
const { onEvent: A } =
|
|
10764
|
+
const { onEvent: A } = F(), { selectedDebtChartData: t } = Ge();
|
|
10765
10765
|
return h.useEffect(() => A(G.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ c(C, { bgcolor: "background.paper", children: [
|
|
10766
10766
|
t?.goal && /* @__PURE__ */ c(_, { children: [
|
|
10767
10767
|
/* @__PURE__ */ e(ua, { goal: t.goal }),
|
|
@@ -10935,7 +10935,7 @@ const et = (A) => /* @__PURE__ */ e(v, { fontWeight: 600, variant: "Small", chil
|
|
|
10935
10935
|
onHoverRow: n,
|
|
10936
10936
|
onClickRow: r
|
|
10937
10937
|
}) => {
|
|
10938
|
-
const o = _e(), { onEvent: a } =
|
|
10938
|
+
const o = _e(), { onEvent: a } = F(), { isMobile: s } = xA(), { debts: d } = z(), [I, f] = h.useState([
|
|
10939
10939
|
{ field: "priority", sort: "asc" }
|
|
10940
10940
|
]), l = [
|
|
10941
10941
|
{
|
|
@@ -11109,7 +11109,7 @@ const et = (A) => /* @__PURE__ */ e(v, { fontWeight: 600, variant: "Small", chil
|
|
|
11109
11109
|
}
|
|
11110
11110
|
);
|
|
11111
11111
|
}, mh = g(({ buttonEl: A, onClose: t }) => {
|
|
11112
|
-
const { onEvent: i } =
|
|
11112
|
+
const { onEvent: i } = F(), { debts: n } = z(), { selectedDebtPriority: r, setSelectedDebtPriority: o } = Ge(), a = !!A, s = [
|
|
11113
11113
|
{
|
|
11114
11114
|
priority: Qe.HIGHEST_INTEREST,
|
|
11115
11115
|
text: n.priority_sort_highest_interest
|
|
@@ -11141,7 +11141,7 @@ const et = (A) => /* @__PURE__ */ e(v, { fontWeight: 600, variant: "Small", chil
|
|
|
11141
11141
|
horizontal: "left"
|
|
11142
11142
|
},
|
|
11143
11143
|
children: /* @__PURE__ */ e(nA, { children: s.map(({ priority: I, text: f }) => /* @__PURE__ */ c(
|
|
11144
|
-
|
|
11144
|
+
k,
|
|
11145
11145
|
{
|
|
11146
11146
|
onClick: () => d(I),
|
|
11147
11147
|
sx: {
|
|
@@ -11168,7 +11168,7 @@ const et = (A) => /* @__PURE__ */ e(v, { fontWeight: 600, variant: "Small", chil
|
|
|
11168
11168
|
}
|
|
11169
11169
|
);
|
|
11170
11170
|
}), yh = g(() => {
|
|
11171
|
-
const { onEvent: A } =
|
|
11171
|
+
const { onEvent: A } = F(), { debts: t } = z(), { selectedDebtPriority: i } = Ge(), [n, r] = h.useState(null), o = (I) => {
|
|
11172
11172
|
r(I.currentTarget), A(G.DEBTS_CLICK_PRIORITIZE);
|
|
11173
11173
|
}, a = () => {
|
|
11174
11174
|
r(null);
|
|
@@ -11218,7 +11218,7 @@ const et = (A) => /* @__PURE__ */ e(v, { fontWeight: 600, variant: "Small", chil
|
|
|
11218
11218
|
d.priority = !d.is_paid_off && !d.is_impossible ? s++ : void 0;
|
|
11219
11219
|
}), o;
|
|
11220
11220
|
}, Qh = ({ onBackClick: A, sx: t }) => {
|
|
11221
|
-
const [i, n] = h.useState(!1), [r, o] = h.useState(!1), [a, s] = h.useState(!1), [d, I] = h.useState(""), { isDesktop: f, isMobile: l } = xA(), { debts: E } = z(), { onEvent: u } =
|
|
11221
|
+
const [i, n] = h.useState(!1), [r, o] = h.useState(!1), [a, s] = h.useState(!1), [d, I] = h.useState(""), { isDesktop: f, isMobile: l } = xA(), { debts: E } = z(), { onEvent: u } = F(), { isInitialized: R, setSelectedAccounts: b } = bA(), { setSelectedAccount: P } = ve(), { selectedDebtPriority: m, setSelectedDebtChartData: Q } = Ge(), { accounts: w } = CA(), { loadGoals: y } = _A(), { debts: X } = Mo();
|
|
11222
11222
|
h.useEffect(() => u(G.DEBTS_VIEW), []), h.useEffect(() => {
|
|
11223
11223
|
R && (y(), b(w), n(!0));
|
|
11224
11224
|
}, [R]);
|
|
@@ -11411,11 +11411,11 @@ function Ui({ title: A, subtitle: t }) {
|
|
|
11411
11411
|
] });
|
|
11412
11412
|
}
|
|
11413
11413
|
function Oh(A, t) {
|
|
11414
|
-
const i = t.track_type ===
|
|
11414
|
+
const i = t.track_type === B.DEBT_TRACK ? t.initial_amount : t.amount;
|
|
11415
11415
|
let n = t.current_amount / i;
|
|
11416
|
-
n > 1 && (n = 1), n = t.track_type ===
|
|
11416
|
+
n > 1 && (n = 1), n = t.track_type === B.DEBT_TRACK ? 1 - n : n, isNaN(n) && (n = 1);
|
|
11417
11417
|
let r = "chart.chart1", o = "common.black";
|
|
11418
|
-
t.track_type ===
|
|
11418
|
+
t.track_type === B.DEBT_TRACK ? (o = "common.white", r = "chart.chart5") : t.track_type === B.RETIREMENT_TRACK && (r = "chart.chart6");
|
|
11419
11419
|
const a = {
|
|
11420
11420
|
style: "percent",
|
|
11421
11421
|
minimumFractionDigits: 0,
|
|
@@ -11468,7 +11468,7 @@ function qh(A) {
|
|
|
11468
11468
|
},
|
|
11469
11469
|
{ icon: "payments", label: A.saving_goal_other, metaType: ae.OTHER }
|
|
11470
11470
|
],
|
|
11471
|
-
type:
|
|
11471
|
+
type: B.SAVINGS_TRACK
|
|
11472
11472
|
},
|
|
11473
11473
|
{
|
|
11474
11474
|
bgcolor: "chart.chart5",
|
|
@@ -11476,7 +11476,7 @@ function qh(A) {
|
|
|
11476
11476
|
label: A.debt_goal_label,
|
|
11477
11477
|
description: A.debt_goal_description,
|
|
11478
11478
|
subTypes: [],
|
|
11479
|
-
type:
|
|
11479
|
+
type: B.DEBT_TRACK
|
|
11480
11480
|
},
|
|
11481
11481
|
{
|
|
11482
11482
|
bgcolor: "chart.chart6",
|
|
@@ -11484,7 +11484,7 @@ function qh(A) {
|
|
|
11484
11484
|
label: A.retirement_goal_label,
|
|
11485
11485
|
description: A.retirement_goal_description,
|
|
11486
11486
|
subTypes: [],
|
|
11487
|
-
type:
|
|
11487
|
+
type: B.RETIREMENT_TRACK
|
|
11488
11488
|
}
|
|
11489
11489
|
];
|
|
11490
11490
|
}
|
|
@@ -11496,14 +11496,14 @@ const Ra = g(
|
|
|
11496
11496
|
percentage: a,
|
|
11497
11497
|
percentageText: s,
|
|
11498
11498
|
projectedText: d
|
|
11499
|
-
} = Oh(n, A), I = A.track_type ===
|
|
11499
|
+
} = Oh(n, A), I = A.track_type === B.DEBT_TRACK ? A.initial_amount : A.amount, f = [
|
|
11500
11500
|
{
|
|
11501
11501
|
color: r,
|
|
11502
11502
|
percentage: `${a}`
|
|
11503
11503
|
}
|
|
11504
11504
|
];
|
|
11505
11505
|
let l = /* @__PURE__ */ e(ps, {});
|
|
11506
|
-
return A.track_type ===
|
|
11506
|
+
return A.track_type === B.DEBT_TRACK ? l = /* @__PURE__ */ e(zs, {}) : A.track_type === B.RETIREMENT_TRACK && (l = /* @__PURE__ */ e(ms, {})), /* @__PURE__ */ e(ze, { elevation: 2, sx: { borderRadius: 2 }, children: /* @__PURE__ */ c(Co, { disabled: !i, onClick: i, children: [
|
|
11507
11507
|
/* @__PURE__ */ e(
|
|
11508
11508
|
$e,
|
|
11509
11509
|
{
|
|
@@ -11527,11 +11527,11 @@ const Ra = g(
|
|
|
11527
11527
|
), Th = g(({ trackType: A }) => {
|
|
11528
11528
|
const { goals: t } = z(), { setAlert: i, monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: r } = _A(), o = h.useMemo(() => {
|
|
11529
11529
|
let I = 0;
|
|
11530
|
-
return A ===
|
|
11530
|
+
return A === B.SAVINGS_TRACK ? I = n?.amount_allocated_for_savings_goals || 0 : A === B.DEBT_TRACK ? I = n?.amount_allocated_for_debt_goals || 0 : A === B.RETIREMENT_TRACK && (I = n?.amount_allocated_for_retirement_goals || 0), I;
|
|
11531
11531
|
}, [n]), [a, s] = h.useState(o), d = async () => {
|
|
11532
11532
|
if (n) {
|
|
11533
11533
|
const I = { ...n };
|
|
11534
|
-
A ===
|
|
11534
|
+
A === B.SAVINGS_TRACK ? I.amount_allocated_for_savings_goals = a : A === B.DEBT_TRACK ? I.amount_allocated_for_debt_goals = a : A === B.RETIREMENT_TRACK && (I.amount_allocated_for_retirement_goals = a), await r(I), i(t.alert_contribution_updated);
|
|
11535
11535
|
}
|
|
11536
11536
|
};
|
|
11537
11537
|
return /* @__PURE__ */ e(C, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
|
|
@@ -11604,7 +11604,7 @@ const Ra = g(
|
|
|
11604
11604
|
await n(s), r(t.alert_goals_reordered), a(!1);
|
|
11605
11605
|
};
|
|
11606
11606
|
return /* @__PURE__ */ c(C, { children: [
|
|
11607
|
-
/* @__PURE__ */ e(
|
|
11607
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(oA, { onClick: () => a(!0), children: /* @__PURE__ */ e(iA, { children: /* @__PURE__ */ c(
|
|
11608
11608
|
C,
|
|
11609
11609
|
{
|
|
11610
11610
|
alignItems: "center",
|
|
@@ -11655,8 +11655,8 @@ const Ra = g(
|
|
|
11655
11655
|
] });
|
|
11656
11656
|
}, Gh = ({ goal: A, index: t }) => {
|
|
11657
11657
|
const { goals: i } = z();
|
|
11658
|
-
return /* @__PURE__ */ e(
|
|
11659
|
-
A.track_type !==
|
|
11658
|
+
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(oA, { children: [
|
|
11659
|
+
A.track_type !== B.RETIREMENT_TRACK && /* @__PURE__ */ e(
|
|
11660
11660
|
mA,
|
|
11661
11661
|
{
|
|
11662
11662
|
sx: {
|
|
@@ -11684,7 +11684,7 @@ const Ra = g(
|
|
|
11684
11684
|
] }) });
|
|
11685
11685
|
}, Nh = ({ goal: A }) => {
|
|
11686
11686
|
const { goals: t } = z();
|
|
11687
|
-
return /* @__PURE__ */ e(
|
|
11687
|
+
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(oA, { children: [
|
|
11688
11688
|
/* @__PURE__ */ e(mA, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(ys, { color: "success", filled: !0, size: 20 }) }),
|
|
11689
11689
|
/* @__PURE__ */ e(iA, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ c(C, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
11690
11690
|
/* @__PURE__ */ c(C, { children: [
|
|
@@ -11703,7 +11703,7 @@ const Ra = g(
|
|
|
11703
11703
|
}, Sh = ({ trackType: A }) => {
|
|
11704
11704
|
const { goals: t, common: i } = z(), { orderedGoals: n } = _A(), r = n.filter((u) => u.track_type === A), o = r.filter((u) => !u.is_complete), a = r.filter((u) => u.is_complete), [s, d] = h.useState(!1);
|
|
11705
11705
|
let I = t.manage_saving_goals, f = t.manage_saving_drawer_title, l = t.manage_saving_title, E = t.manage_saving_description;
|
|
11706
|
-
return A ===
|
|
11706
|
+
return A === B.DEBT_TRACK ? (I = t.manage_debt_goals, f = t.manage_debt_drawer_title, l = t.manage_debt_title, E = t.manage_debt_description) : A === B.RETIREMENT_TRACK && (I = t.manage_retirement_goals, f = t.manage_retirement_drawer_title, l = t.manage_retirement_title, E = t.manage_retirement_description), /* @__PURE__ */ c(C, { children: [
|
|
11707
11707
|
/* @__PURE__ */ e(rA, { endIcon: /* @__PURE__ */ e(he, {}), onClick: () => d(!0), children: I }),
|
|
11708
11708
|
/* @__PURE__ */ e(
|
|
11709
11709
|
cA,
|
|
@@ -11721,10 +11721,10 @@ const Ra = g(
|
|
|
11721
11721
|
/* @__PURE__ */ e(v, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: t.goal_priority }),
|
|
11722
11722
|
/* @__PURE__ */ c(nA, { sx: { bgcolor: "background.paper" }, children: [
|
|
11723
11723
|
o.map((u, R) => /* @__PURE__ */ e(Gh, { goal: u, index: R }, `ongoing-${u.guid}`)),
|
|
11724
|
-
/* @__PURE__ */ e(M, { variant: A !==
|
|
11725
|
-
A !==
|
|
11724
|
+
/* @__PURE__ */ e(M, { variant: A !== B.RETIREMENT_TRACK ? "inset" : "fullWidth" }),
|
|
11725
|
+
A !== B.RETIREMENT_TRACK && /* @__PURE__ */ e(Mh, { goals: o })
|
|
11726
11726
|
] }),
|
|
11727
|
-
A !==
|
|
11727
|
+
A !== B.RETIREMENT_TRACK && /* @__PURE__ */ c(C, { children: [
|
|
11728
11728
|
/* @__PURE__ */ e(v, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: t.complete_title }),
|
|
11729
11729
|
/* @__PURE__ */ e(nA, { sx: { bgcolor: "background.paper" }, children: a.map((u) => /* @__PURE__ */ e(Nh, { goal: u }, `complete-${u.guid}`)) })
|
|
11730
11730
|
] })
|
|
@@ -11733,7 +11733,11 @@ const Ra = g(
|
|
|
11733
11733
|
)
|
|
11734
11734
|
] });
|
|
11735
11735
|
}, ki = g(({ trackType: A }) => {
|
|
11736
|
-
const { isMobile: t } = xA(), { goals: i } = z(), { orderedGoals: n, setSelectedGoal: r } = _A(), o = n.filter((I) => I.track_type === A), a = o.filter(
|
|
11736
|
+
const { isMobile: t } = xA(), { goals: i } = z(), { orderedGoals: n, setSelectedGoal: r } = _A(), o = n.filter((I) => I.track_type === A), a = o.filter(
|
|
11737
|
+
(I) => I.track_type === B.SAVINGS_TRACK && !I.has_been_spent || I.track_type !== B.SAVINGS_TRACK && !I.is_complete
|
|
11738
|
+
), s = o.filter(
|
|
11739
|
+
(I) => I.track_type === B.SAVINGS_TRACK && I.has_been_spent || I.track_type !== B.SAVINGS_TRACK && I.is_complete
|
|
11740
|
+
), d = A === B.DEBT_TRACK ? i.zero_state_complete_debt : i.zero_state_complete_savings;
|
|
11737
11741
|
return /* @__PURE__ */ c(C, { mt: 16, mx: t ? 24 : 0, children: [
|
|
11738
11742
|
/* @__PURE__ */ c(C, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
|
|
11739
11743
|
/* @__PURE__ */ e(v, { color: "text.secondary", variant: "Small", children: i.ongoing_title }),
|
|
@@ -11743,7 +11747,7 @@ const Ra = g(
|
|
|
11743
11747
|
// Goal should be full width in mobile or if it's the first goal (unless there are 2)
|
|
11744
11748
|
/* @__PURE__ */ e(We, { xs: t || f === 0 && l.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Ra, { goal: I, onClick: () => r(I) }, I.guid) }, f)
|
|
11745
11749
|
)) }),
|
|
11746
|
-
A !==
|
|
11750
|
+
A !== B.RETIREMENT_TRACK && /* @__PURE__ */ c(C, { gap: 16, mt: 48, children: [
|
|
11747
11751
|
/* @__PURE__ */ e(v, { color: "text.secondary", variant: "Small", children: i.complete_title }),
|
|
11748
11752
|
s.length === 0 && /* @__PURE__ */ e(C, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(v, { variant: "Small", children: d }) }),
|
|
11749
11753
|
s.map((I) => /* @__PURE__ */ e(ze, { elevation: 2, sx: { borderRadius: 2 }, children: /* @__PURE__ */ e(Co, { onClick: () => r(I), children: /* @__PURE__ */ e(xe, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ c(C, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
@@ -11758,12 +11762,12 @@ const Ra = g(
|
|
|
11758
11762
|
}), Yh = ({ goalType: A, onClick: t }) => {
|
|
11759
11763
|
const { goals: i } = z(), { bgcolor: n, icon: r, label: o, description: a, subTypes: s, type: d } = A, [I, f] = h.useState(!1), l = s.length > 0;
|
|
11760
11764
|
return /* @__PURE__ */ e(C, { children: /* @__PURE__ */ c(nA, { sx: { bgcolor: "background.paper" }, children: [
|
|
11761
|
-
/* @__PURE__ */ e(
|
|
11765
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
|
|
11762
11766
|
oA,
|
|
11763
11767
|
{
|
|
11764
11768
|
onClick: l ? () => f(!I) : () => t(
|
|
11765
|
-
d ===
|
|
11766
|
-
d ===
|
|
11769
|
+
d === B.RETIREMENT_TRACK ? i.retirement : "",
|
|
11770
|
+
d === B.RETIREMENT_TRACK ? ae.RETIREMENT : ae.OTHER,
|
|
11767
11771
|
d
|
|
11768
11772
|
),
|
|
11769
11773
|
children: [
|
|
@@ -11775,7 +11779,7 @@ const Ra = g(
|
|
|
11775
11779
|
}
|
|
11776
11780
|
) }),
|
|
11777
11781
|
/* @__PURE__ */ e(M, { variant: "inset" }),
|
|
11778
|
-
l && /* @__PURE__ */ e(pi, { in: I, children: /* @__PURE__ */ e(nA, { sx: { bgcolor: "background.default" }, children: s.map((E, u) => /* @__PURE__ */ e(
|
|
11782
|
+
l && /* @__PURE__ */ e(pi, { in: I, children: /* @__PURE__ */ e(nA, { sx: { bgcolor: "background.default" }, children: s.map((E, u) => /* @__PURE__ */ e(k, { sx: { pl: 48 }, children: /* @__PURE__ */ c(oA, { onClick: () => t(E.label, E.metaType, d), children: [
|
|
11779
11783
|
/* @__PURE__ */ e(de, { sx: { mr: 8 }, children: /* @__PURE__ */ e(Zn, { name: E.icon }) }),
|
|
11780
11784
|
/* @__PURE__ */ e(
|
|
11781
11785
|
iA,
|
|
@@ -11813,7 +11817,7 @@ const Ra = g(
|
|
|
11813
11817
|
/* @__PURE__ */ c(nA, { sx: { bgcolor: "background.white" }, children: [
|
|
11814
11818
|
/* @__PURE__ */ e(M, { variant: "fullWidth" }),
|
|
11815
11819
|
A.map((u, R) => /* @__PURE__ */ c(h.Fragment, { children: [
|
|
11816
|
-
/* @__PURE__ */ e(
|
|
11820
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(oA, { onClick: () => l(u), children: [
|
|
11817
11821
|
/* @__PURE__ */ e(mA, { children: /* @__PURE__ */ e(
|
|
11818
11822
|
Xe,
|
|
11819
11823
|
{
|
|
@@ -11874,7 +11878,7 @@ const Ra = g(
|
|
|
11874
11878
|
);
|
|
11875
11879
|
}, Bh = ({ onClose: A }) => {
|
|
11876
11880
|
const { goals: t } = z(), { addGoal: i, debtGoals: n, setAlert: r, setSelectedGoal: o } = _A(), { debtAccounts: a } = CA(), [s, d] = h.useState(!1), I = qh(t), f = (E, u, R) => {
|
|
11877
|
-
R ===
|
|
11881
|
+
R === B.DEBT_TRACK ? d(!0) : o({
|
|
11878
11882
|
amount: 0,
|
|
11879
11883
|
current_amount: 0,
|
|
11880
11884
|
goal_type: nn.SAVE_AMOUNT,
|
|
@@ -11896,10 +11900,10 @@ const Ra = g(
|
|
|
11896
11900
|
meta_type: R,
|
|
11897
11901
|
monthly_payment: u.minimum_payment || 0,
|
|
11898
11902
|
name: u.name || u.feed_name || "",
|
|
11899
|
-
track_type:
|
|
11903
|
+
track_type: B.DEBT_TRACK
|
|
11900
11904
|
}), r(t.alert_goal_added);
|
|
11901
11905
|
}
|
|
11902
|
-
d(!1), A?.(
|
|
11906
|
+
d(!1), A?.(B.DEBT_TRACK);
|
|
11903
11907
|
};
|
|
11904
11908
|
return /* @__PURE__ */ c(C, { children: [
|
|
11905
11909
|
/* @__PURE__ */ e(nA, { sx: { bgcolor: "background.paper" }, children: I.map((E, u) => /* @__PURE__ */ e(Yh, { goalType: E, onClick: f }, u)) }),
|
|
@@ -11916,7 +11920,7 @@ const Ra = g(
|
|
|
11916
11920
|
] });
|
|
11917
11921
|
}, Ca = ({ account: A }) => {
|
|
11918
11922
|
const { accounts: t } = z(), { setSelectedAccount: i } = ve(), [n, r] = h.useState(!1);
|
|
11919
|
-
return /* @__PURE__ */ c(
|
|
11923
|
+
return /* @__PURE__ */ c(k, { sx: { bgcolor: "background.paper" }, children: [
|
|
11920
11924
|
/* @__PURE__ */ c(oA, { onClick: () => {
|
|
11921
11925
|
i(A), r(!0);
|
|
11922
11926
|
}, children: [
|
|
@@ -11942,10 +11946,10 @@ const Ra = g(
|
|
|
11942
11946
|
] }) })
|
|
11943
11947
|
] });
|
|
11944
11948
|
}, Vh = g(({ goal: A }) => {
|
|
11945
|
-
const { goals: t } = z(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = _A(), [o, a] = h.useState(A.amount), s = !A.guid, d = o < 0 || o > 9999999999e-2, I = async () => {
|
|
11946
|
-
const
|
|
11947
|
-
A.amount = o, s ? n(
|
|
11948
|
-
},
|
|
11949
|
+
const { goals: t } = z(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = _A(), [o, a] = h.useState(A.amount), s = !A.guid, d = o < 0 || o > 9999999999e-2, I = A.track_type === B.SAVINGS_TRACK && A.has_been_spent || A.track_type !== B.SAVINGS_TRACK && A.is_complete, f = async () => {
|
|
11950
|
+
const E = { ...A, amount: o };
|
|
11951
|
+
A.amount = o, s ? n(E) : (await r(E), i(t.alert_goal_updated_amount));
|
|
11952
|
+
}, l = () => {
|
|
11949
11953
|
setTimeout(() => {
|
|
11950
11954
|
a(A.amount);
|
|
11951
11955
|
}, 250);
|
|
@@ -11953,11 +11957,11 @@ const Ra = g(
|
|
|
11953
11957
|
return /* @__PURE__ */ e(
|
|
11954
11958
|
Oe,
|
|
11955
11959
|
{
|
|
11956
|
-
isDisabled:
|
|
11960
|
+
isDisabled: I,
|
|
11957
11961
|
isSaveDisabled: d,
|
|
11958
11962
|
label: t.details_amount_to_save,
|
|
11959
|
-
onCancel:
|
|
11960
|
-
onSave:
|
|
11963
|
+
onCancel: l,
|
|
11964
|
+
onSave: f,
|
|
11961
11965
|
primaryText: t.details_amount_to_save,
|
|
11962
11966
|
secondaryText: O(A.amount, "0,0"),
|
|
11963
11967
|
zeroStateText: s && A.amount === 0 ? t.add_amount : void 0,
|
|
@@ -11969,7 +11973,7 @@ const Ra = g(
|
|
|
11969
11973
|
error: d,
|
|
11970
11974
|
fullWidth: !0,
|
|
11971
11975
|
minAmount: 0,
|
|
11972
|
-
setAmount: (
|
|
11976
|
+
setAmount: (E) => a(isNaN(Number(E)) ? o : Number(E)),
|
|
11973
11977
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
11974
11978
|
}
|
|
11975
11979
|
)
|
|
@@ -11981,7 +11985,7 @@ const Ra = g(
|
|
|
11981
11985
|
d ? a(u) : (await s(u), o(r.alert_account_changed)), f(!1);
|
|
11982
11986
|
};
|
|
11983
11987
|
return /* @__PURE__ */ c(C, { children: [
|
|
11984
|
-
d ? /* @__PURE__ */ e(
|
|
11988
|
+
d ? /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(oA, { onClick: () => f(!0), children: [
|
|
11985
11989
|
/* @__PURE__ */ e(iA, { children: /* @__PURE__ */ c(C, { alignItems: "center", color: "action.active", direction: "row", gap: 8, children: [
|
|
11986
11990
|
/* @__PURE__ */ e(lo, { filled: !0 }),
|
|
11987
11991
|
r.details_add_account
|
|
@@ -12001,7 +12005,7 @@ const Ra = g(
|
|
|
12001
12005
|
] }),
|
|
12002
12006
|
/* @__PURE__ */ e(cA, { isOpen: I, onClose: () => f(!1), title: r.details_change_account, children: /* @__PURE__ */ c(C, { children: [
|
|
12003
12007
|
/* @__PURE__ */ e(v, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: n.account_types[1] }),
|
|
12004
|
-
/* @__PURE__ */ e(nA, { sx: { bgcolor: "background.paper" }, children: t.map((E) => /* @__PURE__ */ e(
|
|
12008
|
+
/* @__PURE__ */ e(nA, { sx: { bgcolor: "background.paper" }, children: t.map((E) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(oA, { onClick: () => l(E.guid), children: [
|
|
12005
12009
|
/* @__PURE__ */ e(mA, { children: /* @__PURE__ */ e(
|
|
12006
12010
|
Xe,
|
|
12007
12011
|
{
|
|
@@ -12019,7 +12023,7 @@ const Ra = g(
|
|
|
12019
12023
|
/* @__PURE__ */ e(he, {})
|
|
12020
12024
|
] }) }, E.guid)) }),
|
|
12021
12025
|
/* @__PURE__ */ e(v, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: n.account_types[2] }),
|
|
12022
|
-
/* @__PURE__ */ e(nA, { sx: { bgcolor: "background.paper" }, children: i.map((E) => /* @__PURE__ */ e(
|
|
12026
|
+
/* @__PURE__ */ e(nA, { sx: { bgcolor: "background.paper" }, children: i.map((E) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(oA, { onClick: () => l(E.guid), children: [
|
|
12023
12027
|
/* @__PURE__ */ e(mA, { children: /* @__PURE__ */ e(
|
|
12024
12028
|
Xe,
|
|
12025
12029
|
{
|
|
@@ -12039,10 +12043,10 @@ const Ra = g(
|
|
|
12039
12043
|
] }) })
|
|
12040
12044
|
] });
|
|
12041
12045
|
}, kh = g(({ goal: A }) => {
|
|
12042
|
-
const { goals: t } = z(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = _A(), [o, a] = h.useState(A.name), s = !A.guid, d = async () => {
|
|
12043
|
-
const
|
|
12044
|
-
A.name = o, s ? n(
|
|
12045
|
-
},
|
|
12046
|
+
const { goals: t } = z(), { setAlert: i, setSelectedGoal: n, updateGoal: r } = _A(), [o, a] = h.useState(A.name), s = !A.guid, d = A.track_type === B.SAVINGS_TRACK && A.has_been_spent || A.track_type !== B.SAVINGS_TRACK && A.is_complete, I = async () => {
|
|
12047
|
+
const l = { ...A, name: o };
|
|
12048
|
+
A.name = o, s ? n(l) : (await r(l), i(t.alert_goal_updated_name));
|
|
12049
|
+
}, f = () => {
|
|
12046
12050
|
setTimeout(() => {
|
|
12047
12051
|
a(A.name);
|
|
12048
12052
|
}, 250);
|
|
@@ -12050,11 +12054,11 @@ const Ra = g(
|
|
|
12050
12054
|
return /* @__PURE__ */ e(
|
|
12051
12055
|
Oe,
|
|
12052
12056
|
{
|
|
12053
|
-
isDisabled:
|
|
12057
|
+
isDisabled: d,
|
|
12054
12058
|
isSaveDisabled: !o,
|
|
12055
12059
|
label: t.details_goal_name,
|
|
12056
|
-
onCancel:
|
|
12057
|
-
onSave:
|
|
12060
|
+
onCancel: f,
|
|
12061
|
+
onSave: I,
|
|
12058
12062
|
primaryText: t.details_goal_name,
|
|
12059
12063
|
secondaryText: A.name,
|
|
12060
12064
|
children: /* @__PURE__ */ e(
|
|
@@ -12063,7 +12067,7 @@ const Ra = g(
|
|
|
12063
12067
|
error: !o,
|
|
12064
12068
|
fullWidth: !0,
|
|
12065
12069
|
label: t.details_goal_name,
|
|
12066
|
-
onChange: (
|
|
12070
|
+
onChange: (l) => a(l.target.value),
|
|
12067
12071
|
value: o
|
|
12068
12072
|
}
|
|
12069
12073
|
)
|
|
@@ -12154,7 +12158,7 @@ const Ra = g(
|
|
|
12154
12158
|
};
|
|
12155
12159
|
return /* @__PURE__ */ c(C, { children: [
|
|
12156
12160
|
l.map((R) => /* @__PURE__ */ e(Ca, { account: R }, R.guid)),
|
|
12157
|
-
/* @__PURE__ */ e(
|
|
12161
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(oA, { onClick: () => I(!0), children: [
|
|
12158
12162
|
/* @__PURE__ */ e(iA, { children: /* @__PURE__ */ c(C, { alignItems: "center", color: "action.active", direction: "row", gap: 8, children: [
|
|
12159
12163
|
/* @__PURE__ */ e(lo, { filled: !0 }),
|
|
12160
12164
|
t.details_add_account
|
|
@@ -12178,7 +12182,7 @@ const Ra = g(
|
|
|
12178
12182
|
[i, A]
|
|
12179
12183
|
), r = A.track_type;
|
|
12180
12184
|
let o = t.details_save_title;
|
|
12181
|
-
return A.track_type ===
|
|
12185
|
+
return A.track_type === B.DEBT_TRACK ? o = t.details_debt_title : A.track_type === B.RETIREMENT_TRACK && (o = t.details_retirement_title), /* @__PURE__ */ c(C, { children: [
|
|
12182
12186
|
/* @__PURE__ */ c(C, { mx: 24, children: [
|
|
12183
12187
|
/* @__PURE__ */ e(v, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: o }),
|
|
12184
12188
|
/* @__PURE__ */ e(Ra, { goal: A, isInDrawer: !0 }),
|
|
@@ -12187,11 +12191,11 @@ const Ra = g(
|
|
|
12187
12191
|
/* @__PURE__ */ c(nA, { sx: { bgcolor: "background.paper" }, children: [
|
|
12188
12192
|
/* @__PURE__ */ e(kh, { goal: A }),
|
|
12189
12193
|
/* @__PURE__ */ e(M, { variant: "inset" }),
|
|
12190
|
-
(r ===
|
|
12194
|
+
(r === B.SAVINGS_TRACK || r === B.RETIREMENT_TRACK) && /* @__PURE__ */ c(_, { children: [
|
|
12191
12195
|
/* @__PURE__ */ e(Vh, { goal: A }),
|
|
12192
|
-
/* @__PURE__ */ e(M, { variant: r ===
|
|
12196
|
+
/* @__PURE__ */ e(M, { variant: r === B.RETIREMENT_TRACK ? "inset" : "fullWidth" })
|
|
12193
12197
|
] }),
|
|
12194
|
-
A.track_type ===
|
|
12198
|
+
A.track_type === B.DEBT_TRACK && /* @__PURE__ */ c(_, { children: [
|
|
12195
12199
|
/* @__PURE__ */ e(ua, { goal: A }),
|
|
12196
12200
|
/* @__PURE__ */ e(M, { variant: "inset" }),
|
|
12197
12201
|
/* @__PURE__ */ e(Ea, { goal: A }),
|
|
@@ -12199,23 +12203,23 @@ const Ra = g(
|
|
|
12199
12203
|
/* @__PURE__ */ e(va, { goal: A }),
|
|
12200
12204
|
/* @__PURE__ */ e(M, { variant: "fullWidth" })
|
|
12201
12205
|
] }),
|
|
12202
|
-
A.track_type ===
|
|
12206
|
+
A.track_type === B.RETIREMENT_TRACK && /* @__PURE__ */ c(_, { children: [
|
|
12203
12207
|
/* @__PURE__ */ e(Fh, { goal: A }),
|
|
12204
12208
|
/* @__PURE__ */ e(M, { variant: "inset" }),
|
|
12205
12209
|
/* @__PURE__ */ e(Wh, { goal: A }),
|
|
12206
12210
|
/* @__PURE__ */ e(M, { variant: "fullWidth" })
|
|
12207
12211
|
] })
|
|
12208
12212
|
] }),
|
|
12209
|
-
/* @__PURE__ */ e(v, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: A.track_type ===
|
|
12213
|
+
/* @__PURE__ */ e(v, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: A.track_type === B.RETIREMENT_TRACK ? t.details_accounts : t.details_account }),
|
|
12210
12214
|
n && /* @__PURE__ */ c(_, { children: [
|
|
12211
12215
|
/* @__PURE__ */ e(Ca, { account: n }),
|
|
12212
12216
|
/* @__PURE__ */ e(M, {})
|
|
12213
12217
|
] }),
|
|
12214
|
-
A.track_type ===
|
|
12218
|
+
A.track_type === B.RETIREMENT_TRACK && /* @__PURE__ */ c(_, { children: [
|
|
12215
12219
|
/* @__PURE__ */ e(Kh, { goal: A }),
|
|
12216
12220
|
/* @__PURE__ */ e(M, {})
|
|
12217
12221
|
] }),
|
|
12218
|
-
A.track_type ===
|
|
12222
|
+
A.track_type === B.SAVINGS_TRACK && !A.is_complete && /* @__PURE__ */ e(Uh, { goal: A })
|
|
12219
12223
|
] });
|
|
12220
12224
|
}), Jh = g(({ onClose: A }) => {
|
|
12221
12225
|
const { goals: t, common: i } = z(), {
|
|
@@ -12227,16 +12231,16 @@ const Ra = g(
|
|
|
12227
12231
|
setAlert: d,
|
|
12228
12232
|
setSelectedGoal: I,
|
|
12229
12233
|
updateGoal: f
|
|
12230
|
-
} = _A(), { user: l } = Rt(), [E, u] = h.useState(!1), R = !s?.guid, b = s?.track_type ===
|
|
12234
|
+
} = _A(), { user: l } = Rt(), [E, u] = h.useState(!1), R = !s?.guid, b = s?.track_type === B.SAVINGS_TRACK && s.is_complete && !s.is_spendable, P = h.useMemo(() => s ? s.track_type === B.SAVINGS_TRACK ? !!s.name && !!s.amount : s.track_type === B.DEBT_TRACK ? !0 : s.track_type === B.RETIREMENT_TRACK ? !!s.name && !!s.amount && !!s.retirement_age && !!l.birthday : !0 : !1, [s]);
|
|
12231
12235
|
let m = i.delete_button, Q = () => u(!0);
|
|
12232
12236
|
R ? (Q = () => w(), m = i.save_button) : b && (Q = () => X(), m = t.mark_as_complete_button);
|
|
12233
12237
|
const w = async () => {
|
|
12234
12238
|
if (s) {
|
|
12235
12239
|
const L = s.track_type;
|
|
12236
|
-
L !==
|
|
12240
|
+
L !== B.RETIREMENT_TRACK ? await n(s) : L === B.RETIREMENT_TRACK && await r({ ...s, target_amount: s.amount }), d(t.alert_goal_added), I(void 0), L && A?.(L);
|
|
12237
12241
|
}
|
|
12238
12242
|
}, y = async () => {
|
|
12239
|
-
s && (s.track_type !==
|
|
12243
|
+
s && (s.track_type !== B.RETIREMENT_TRACK ? await o(s.guid) : s.track_type === B.RETIREMENT_TRACK && await a(s), d(t.alert_goal_deleted), I(void 0));
|
|
12240
12244
|
}, X = async () => {
|
|
12241
12245
|
const L = {
|
|
12242
12246
|
...s,
|
|
@@ -12275,7 +12279,7 @@ const Ra = g(
|
|
|
12275
12279
|
)
|
|
12276
12280
|
] });
|
|
12277
12281
|
}), iR = g(({ onBackClick: A, sx: t }) => {
|
|
12278
|
-
const { onEvent: i } =
|
|
12282
|
+
const { onEvent: i } = F(), { isMobile: n } = xA(), { accounts: r } = CA(), { isInitialized: o, setSelectedAccounts: a } = bA(), { goals: s, common: d } = z(), { alert: I, loadGoals: f, monthlyCashFlowProfile: l, setAlert: E } = _A(), [u, R] = h.useState(0), [b, P] = h.useState(!1), m = l?.amount_allocated_for_savings_goals || 0, Q = l?.amount_allocated_for_debt_goals || 0, w = l?.amount_allocated_for_retirement_goals || 0, y = p(
|
|
12279
12283
|
n ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
12280
12284
|
O(m, "0,0")
|
|
12281
12285
|
), X = p(
|
|
@@ -12295,7 +12299,7 @@ const Ra = g(
|
|
|
12295
12299
|
}, q = () => {
|
|
12296
12300
|
P(!0), i(G.GOALS_CLICK_ADD);
|
|
12297
12301
|
}, N = (J) => {
|
|
12298
|
-
P(!1), J ===
|
|
12302
|
+
P(!1), J === B.SAVINGS_TRACK ? R(0) : J === B.DEBT_TRACK ? R(1) : J === B.RETIREMENT_TRACK && R(2);
|
|
12299
12303
|
};
|
|
12300
12304
|
return /* @__PURE__ */ c(
|
|
12301
12305
|
Ee,
|
|
@@ -12334,9 +12338,9 @@ const Ra = g(
|
|
|
12334
12338
|
]
|
|
12335
12339
|
}
|
|
12336
12340
|
),
|
|
12337
|
-
u === 0 && /* @__PURE__ */ e(ki, { trackType:
|
|
12338
|
-
u === 1 && /* @__PURE__ */ e(ki, { trackType:
|
|
12339
|
-
u === 2 && /* @__PURE__ */ e(ki, { trackType:
|
|
12341
|
+
u === 0 && /* @__PURE__ */ e(ki, { trackType: B.SAVINGS_TRACK }),
|
|
12342
|
+
u === 1 && /* @__PURE__ */ e(ki, { trackType: B.DEBT_TRACK }),
|
|
12343
|
+
u === 2 && /* @__PURE__ */ e(ki, { trackType: B.RETIREMENT_TRACK })
|
|
12340
12344
|
] }),
|
|
12341
12345
|
/* @__PURE__ */ e(Jh, { onClose: N }),
|
|
12342
12346
|
/* @__PURE__ */ e(
|
|
@@ -12382,18 +12386,18 @@ class _h {
|
|
|
12382
12386
|
return this.goals.slice().sort((t, i) => t.position - i.position);
|
|
12383
12387
|
}
|
|
12384
12388
|
get debtGoals() {
|
|
12385
|
-
return this.orderedGoals.filter((t) => t.track_type ===
|
|
12389
|
+
return this.orderedGoals.filter((t) => t.track_type === B.DEBT_TRACK);
|
|
12386
12390
|
}
|
|
12387
12391
|
get retirmentGoals() {
|
|
12388
|
-
return this.orderedGoals.filter((t) => t.track_type ===
|
|
12392
|
+
return this.orderedGoals.filter((t) => t.track_type === B.RETIREMENT_TRACK);
|
|
12389
12393
|
}
|
|
12390
12394
|
get savingGoals() {
|
|
12391
|
-
return this.orderedGoals.filter((t) => t.track_type ===
|
|
12395
|
+
return this.orderedGoals.filter((t) => t.track_type === B.SAVINGS_TRACK);
|
|
12392
12396
|
}
|
|
12393
12397
|
addGoal = async (t) => {
|
|
12394
12398
|
try {
|
|
12395
12399
|
const i = await this.api.addGoal(t);
|
|
12396
|
-
|
|
12400
|
+
U(() => {
|
|
12397
12401
|
this.goals = [...this.goals, i];
|
|
12398
12402
|
});
|
|
12399
12403
|
} catch (i) {
|
|
@@ -12411,14 +12415,14 @@ class _h {
|
|
|
12411
12415
|
});
|
|
12412
12416
|
r.push(a);
|
|
12413
12417
|
}
|
|
12414
|
-
this.setNewRetirementGoalAccounts([]),
|
|
12418
|
+
this.setNewRetirementGoalAccounts([]), U(() => {
|
|
12415
12419
|
this.goals = [
|
|
12416
12420
|
...this.goals,
|
|
12417
12421
|
{
|
|
12418
12422
|
...n,
|
|
12419
12423
|
amount: n.target_amount,
|
|
12420
12424
|
name: i.retirement,
|
|
12421
|
-
track_type:
|
|
12425
|
+
track_type: B.RETIREMENT_TRACK
|
|
12422
12426
|
}
|
|
12423
12427
|
], this.retirementGoalAccounts = [...this.retirementGoalAccounts, ...r];
|
|
12424
12428
|
});
|
|
@@ -12429,7 +12433,7 @@ class _h {
|
|
|
12429
12433
|
addRetirementGoalAccount = async (t) => {
|
|
12430
12434
|
try {
|
|
12431
12435
|
const i = await this.api.addRetirementGoalAccount(t);
|
|
12432
|
-
|
|
12436
|
+
U(() => {
|
|
12433
12437
|
this.retirementGoalAccounts = [...this.retirementGoalAccounts, i];
|
|
12434
12438
|
});
|
|
12435
12439
|
} catch (i) {
|
|
@@ -12445,10 +12449,10 @@ class _h {
|
|
|
12445
12449
|
...s,
|
|
12446
12450
|
amount: s.target_amount,
|
|
12447
12451
|
name: t.retirement,
|
|
12448
|
-
track_type:
|
|
12452
|
+
track_type: B.RETIREMENT_TRACK
|
|
12449
12453
|
}))
|
|
12450
12454
|
];
|
|
12451
|
-
|
|
12455
|
+
U(() => {
|
|
12452
12456
|
this.goals = a, this.retirementGoalAccounts = r, this.monthlyCashFlowProfile = o;
|
|
12453
12457
|
});
|
|
12454
12458
|
} catch (i) {
|
|
@@ -12457,7 +12461,7 @@ class _h {
|
|
|
12457
12461
|
};
|
|
12458
12462
|
deleteGoal = async (t) => {
|
|
12459
12463
|
try {
|
|
12460
|
-
await this.api.removeGoal(t),
|
|
12464
|
+
await this.api.removeGoal(t), U(() => {
|
|
12461
12465
|
const i = this.goals.findIndex((n) => n.guid === t);
|
|
12462
12466
|
i >= 0 && this.goals.splice(i, 1);
|
|
12463
12467
|
});
|
|
@@ -12472,7 +12476,7 @@ class _h {
|
|
|
12472
12476
|
);
|
|
12473
12477
|
for (const n of i)
|
|
12474
12478
|
await this.deleteRetirementGoalAccount(n.guid);
|
|
12475
|
-
await this.api.removeRetirementGoal(t.guid),
|
|
12479
|
+
await this.api.removeRetirementGoal(t.guid), U(() => {
|
|
12476
12480
|
const n = this.goals.findIndex((r) => r.guid === t.guid);
|
|
12477
12481
|
n >= 0 && this.goals.splice(n, 1);
|
|
12478
12482
|
});
|
|
@@ -12482,7 +12486,7 @@ class _h {
|
|
|
12482
12486
|
};
|
|
12483
12487
|
deleteRetirementGoalAccount = async (t) => {
|
|
12484
12488
|
try {
|
|
12485
|
-
await this.api.removeRetirementGoalAccount(t),
|
|
12489
|
+
await this.api.removeRetirementGoalAccount(t), U(() => {
|
|
12486
12490
|
const i = this.retirementGoalAccounts.findIndex((n) => n.guid === t);
|
|
12487
12491
|
i >= 0 && this.retirementGoalAccounts.splice(i, 1);
|
|
12488
12492
|
});
|
|
@@ -12493,7 +12497,7 @@ class _h {
|
|
|
12493
12497
|
reorderGoals = async (t) => {
|
|
12494
12498
|
try {
|
|
12495
12499
|
const i = await this.api.reorderGoals(t);
|
|
12496
|
-
|
|
12500
|
+
U(() => {
|
|
12497
12501
|
for (const n of i) {
|
|
12498
12502
|
const r = this.goals.findIndex((o) => o.guid === n.guid);
|
|
12499
12503
|
r >= 0 && (this.goals[r].position = n.position);
|
|
@@ -12511,7 +12515,7 @@ class _h {
|
|
|
12511
12515
|
updateGoal = async (t) => {
|
|
12512
12516
|
try {
|
|
12513
12517
|
const i = await this.api.updateGoal(t);
|
|
12514
|
-
|
|
12518
|
+
U(() => {
|
|
12515
12519
|
const n = this.goals.findIndex((r) => r.guid === t.guid);
|
|
12516
12520
|
n >= 0 && (this.goals[n] = i), this.selectedGoal?.guid === t.guid && this.setSelectedGoal(i);
|
|
12517
12521
|
});
|
|
@@ -12522,7 +12526,7 @@ class _h {
|
|
|
12522
12526
|
updateMonthlyCashFlowProfile = async (t) => {
|
|
12523
12527
|
try {
|
|
12524
12528
|
const i = await this.api.updateMonthlyCashFlowProfile(t);
|
|
12525
|
-
|
|
12529
|
+
U(() => {
|
|
12526
12530
|
this.monthlyCashFlowProfile = i;
|
|
12527
12531
|
});
|
|
12528
12532
|
} catch (i) {
|
|
@@ -12804,7 +12808,7 @@ const iE = /^[ a-zA-ZÀ-ÿ0-9]+$/, nE = 50, Sr = 65, rE = ({
|
|
|
12804
12808
|
sx: { transform: `translateY(${E.start}px)` },
|
|
12805
12809
|
width: "100%",
|
|
12806
12810
|
children: [
|
|
12807
|
-
/* @__PURE__ */ e(
|
|
12811
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(oA, { onClick: () => d(u.guid), children: [
|
|
12808
12812
|
/* @__PURE__ */ e(mA, { children: /* @__PURE__ */ e(dt, { categoryGuid: "", merchantGuid: u.guid }) }),
|
|
12809
12813
|
/* @__PURE__ */ e(iA, { primary: u.name })
|
|
12810
12814
|
] }) }),
|
|
@@ -12844,13 +12848,13 @@ class oE {
|
|
|
12844
12848
|
loadMerchants = async (t = "") => {
|
|
12845
12849
|
this.isLoading = !0;
|
|
12846
12850
|
const i = await this.api.getMerchants([t]);
|
|
12847
|
-
|
|
12851
|
+
U(() => {
|
|
12848
12852
|
this.merchants = i, this.isLoading = !1;
|
|
12849
12853
|
});
|
|
12850
12854
|
};
|
|
12851
12855
|
loadMerchantByGuid = async (t) => {
|
|
12852
12856
|
const i = await this.api.getMerchantByGuid(t);
|
|
12853
|
-
|
|
12857
|
+
U(() => this.merchant = i);
|
|
12854
12858
|
};
|
|
12855
12859
|
}
|
|
12856
12860
|
const ba = 13, aE = (A, t) => A.filter((i) => {
|
|
@@ -12946,7 +12950,7 @@ class hE {
|
|
|
12946
12950
|
const i = this.globalStore.accountStore.members, n = aE(t, i), o = await (await Promise.all(
|
|
12947
12951
|
n.map((a) => this.globalStore.accountStore.api.getMonthlyAccountBalances(a.guid))
|
|
12948
12952
|
)).reduce(sE, []).sort(cE);
|
|
12949
|
-
|
|
12953
|
+
U(() => {
|
|
12950
12954
|
this.netWorthData = {
|
|
12951
12955
|
accounts: n,
|
|
12952
12956
|
monthlyAccountBalances: o
|
|
@@ -12959,7 +12963,7 @@ class hE {
|
|
|
12959
12963
|
loadChartData = async (t) => {
|
|
12960
12964
|
try {
|
|
12961
12965
|
const { accounts: i, monthlyAccountBalances: n } = this.netWorthData, r = await IE(i, n, t), o = Br(r);
|
|
12962
|
-
|
|
12966
|
+
U(() => {
|
|
12963
12967
|
this.netWorthChartData = r, this.selectedData = o;
|
|
12964
12968
|
});
|
|
12965
12969
|
} catch (i) {
|
|
@@ -12982,12 +12986,12 @@ class hE {
|
|
|
12982
12986
|
};
|
|
12983
12987
|
}
|
|
12984
12988
|
setSelectedData = (t) => {
|
|
12985
|
-
|
|
12989
|
+
U(() => {
|
|
12986
12990
|
this.selectedData = this.netWorthChartData[t];
|
|
12987
12991
|
});
|
|
12988
12992
|
};
|
|
12989
12993
|
setHoveredData = (t) => {
|
|
12990
|
-
|
|
12994
|
+
U(() => {
|
|
12991
12995
|
this.hoveredData = t !== null ? this.netWorthChartData[t] : void 0;
|
|
12992
12996
|
});
|
|
12993
12997
|
};
|
|
@@ -13041,7 +13045,7 @@ const EE = ({
|
|
|
13041
13045
|
d(t(A));
|
|
13042
13046
|
}, [i, n]), /* @__PURE__ */ c(h.Fragment, { children: [
|
|
13043
13047
|
/* @__PURE__ */ e(
|
|
13044
|
-
|
|
13048
|
+
k,
|
|
13045
13049
|
{
|
|
13046
13050
|
sx: {
|
|
13047
13051
|
...s,
|
|
@@ -13148,7 +13152,7 @@ const EE = ({
|
|
|
13148
13152
|
}, gE = g(HE), pE = ({ accounts: A, name: t, icon: i }) => {
|
|
13149
13153
|
const [n, r] = h.useState(!1);
|
|
13150
13154
|
return /* @__PURE__ */ c(_, { children: [
|
|
13151
|
-
/* @__PURE__ */ e(
|
|
13155
|
+
/* @__PURE__ */ e(k, { sx: (o) => ({ backgroundColor: o.palette.background.paper }), children: /* @__PURE__ */ c(oA, { onClick: () => r(!n), children: [
|
|
13152
13156
|
i && /* @__PURE__ */ e(de, { children: /* @__PURE__ */ e(T, { name: i, size: 24, sx: { mr: 12 } }) }),
|
|
13153
13157
|
/* @__PURE__ */ e(
|
|
13154
13158
|
iA,
|
|
@@ -13160,7 +13164,7 @@ const EE = ({
|
|
|
13160
13164
|
] }) }),
|
|
13161
13165
|
/* @__PURE__ */ e(M, {}),
|
|
13162
13166
|
/* @__PURE__ */ e(pi, { in: n, timeout: "auto", unmountOnExit: !0, children: A.map((o, a) => /* @__PURE__ */ c(nA, { children: [
|
|
13163
|
-
/* @__PURE__ */ e(
|
|
13167
|
+
/* @__PURE__ */ e(k, { sx: () => ({ py: 14 }), children: /* @__PURE__ */ e(
|
|
13164
13168
|
iA,
|
|
13165
13169
|
{
|
|
13166
13170
|
primary: /* @__PURE__ */ c(C, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
@@ -13256,7 +13260,7 @@ const EE = ({
|
|
|
13256
13260
|
}
|
|
13257
13261
|
) }),
|
|
13258
13262
|
t?.map((s) => /* @__PURE__ */ c(h.Fragment, { children: [
|
|
13259
|
-
/* @__PURE__ */ e(
|
|
13263
|
+
/* @__PURE__ */ e(k, { sx: { backgroundColor: a.palette.background.paper, py: 14 }, children: /* @__PURE__ */ e(
|
|
13260
13264
|
iA,
|
|
13261
13265
|
{
|
|
13262
13266
|
primary: /* @__PURE__ */ c(C, { direction: "row", justifyContent: "space-between", sx: { fontWeight: 400 }, children: [
|
|
@@ -13286,7 +13290,7 @@ const EE = ({
|
|
|
13286
13290
|
) }),
|
|
13287
13291
|
i?.map((s) => /* @__PURE__ */ c(_, { children: [
|
|
13288
13292
|
/* @__PURE__ */ e(
|
|
13289
|
-
|
|
13293
|
+
k,
|
|
13290
13294
|
{
|
|
13291
13295
|
sx: { backgroundColor: a.palette.background.paper, py: 14 },
|
|
13292
13296
|
children: /* @__PURE__ */ e(
|
|
@@ -13317,7 +13321,7 @@ const EE = ({
|
|
|
13317
13321
|
selectedData: E,
|
|
13318
13322
|
setHoveredData: u,
|
|
13319
13323
|
setSelectedData: R
|
|
13320
|
-
} = hd(), { isMobile: b } = xA(), { onEvent: P } =
|
|
13324
|
+
} = hd(), { isMobile: b } = xA(), { onEvent: P } = F(), [m, Q] = h.useState(!1), [w, y] = h.useState(6), [X, L] = h.useState(!1), [D, q] = h.useState(!1), N = async () => {
|
|
13321
13325
|
await f(i), await I(w), Q(!0);
|
|
13322
13326
|
};
|
|
13323
13327
|
h.useEffect(() => {
|
|
@@ -13445,7 +13449,7 @@ class DE {
|
|
|
13445
13449
|
try {
|
|
13446
13450
|
this.isLoading = !0;
|
|
13447
13451
|
const t = await this.api.getNotifications();
|
|
13448
|
-
|
|
13452
|
+
U(() => {
|
|
13449
13453
|
this.notifications = t, this.recentNotifications = QE(t), this.isLoading = !1;
|
|
13450
13454
|
});
|
|
13451
13455
|
} catch (t) {
|
|
@@ -13582,7 +13586,7 @@ class TE {
|
|
|
13582
13586
|
loadDevices = async () => {
|
|
13583
13587
|
try {
|
|
13584
13588
|
const t = await this.api.getDevices();
|
|
13585
|
-
|
|
13589
|
+
U(() => {
|
|
13586
13590
|
this.devices = t;
|
|
13587
13591
|
});
|
|
13588
13592
|
} catch (t) {
|
|
@@ -13592,7 +13596,7 @@ class TE {
|
|
|
13592
13596
|
loadNotificationProfiles = async () => {
|
|
13593
13597
|
try {
|
|
13594
13598
|
const t = await this.api.getNotificationProfiles();
|
|
13595
|
-
|
|
13599
|
+
U(() => {
|
|
13596
13600
|
this.notificationProfiles = t;
|
|
13597
13601
|
});
|
|
13598
13602
|
} catch (t) {
|
|
@@ -13603,7 +13607,7 @@ class TE {
|
|
|
13603
13607
|
try {
|
|
13604
13608
|
await this.api.deleteDevice(t);
|
|
13605
13609
|
const i = this.devices.findIndex((n) => n.guid === t);
|
|
13606
|
-
i >= 0 &&
|
|
13610
|
+
i >= 0 && U(() => {
|
|
13607
13611
|
this.devices.splice(i, 1);
|
|
13608
13612
|
});
|
|
13609
13613
|
} catch {
|
|
@@ -13637,7 +13641,7 @@ class TE {
|
|
|
13637
13641
|
updateDevice = async (t) => {
|
|
13638
13642
|
try {
|
|
13639
13643
|
const i = await this.api.updateDevice(t), n = this.devices.findIndex((r) => r.guid === t.guid);
|
|
13640
|
-
n >= 0 &&
|
|
13644
|
+
n >= 0 && U(() => {
|
|
13641
13645
|
this.devices[n] = i;
|
|
13642
13646
|
});
|
|
13643
13647
|
} catch (i) {
|
|
@@ -13647,7 +13651,7 @@ class TE {
|
|
|
13647
13651
|
updateNotificationProfile = async (t) => {
|
|
13648
13652
|
try {
|
|
13649
13653
|
const i = await this.api.updateNotificationProfile(t), n = this.notificationProfiles.findIndex((r) => r.guid === t.guid);
|
|
13650
|
-
n >= 0 &&
|
|
13654
|
+
n >= 0 && U(() => {
|
|
13651
13655
|
this.notificationProfiles[n] = i;
|
|
13652
13656
|
});
|
|
13653
13657
|
} catch (i) {
|
|
@@ -15247,8 +15251,8 @@ const NE = ({
|
|
|
15247
15251
|
primaryText: t.send_verification,
|
|
15248
15252
|
secondaryText: A.back,
|
|
15249
15253
|
sx: {
|
|
15250
|
-
width: 400,
|
|
15251
15254
|
"& .MuiDialogContent-root": {
|
|
15255
|
+
width: 400,
|
|
15252
15256
|
pt: 0
|
|
15253
15257
|
},
|
|
15254
15258
|
"& .MuiToolbar-root:last-child": {
|
|
@@ -15286,8 +15290,8 @@ const NE = ({
|
|
|
15286
15290
|
primaryText: t.send_verification,
|
|
15287
15291
|
secondaryText: A.back,
|
|
15288
15292
|
sx: {
|
|
15289
|
-
width: 400,
|
|
15290
15293
|
"& .MuiDialogContent-root": {
|
|
15294
|
+
width: 400,
|
|
15291
15295
|
pt: 0
|
|
15292
15296
|
},
|
|
15293
15297
|
"& .MuiToolbar-root:last-child": {
|
|
@@ -15325,8 +15329,8 @@ const NE = ({
|
|
|
15325
15329
|
primaryText: t.verify,
|
|
15326
15330
|
secondaryText: A.cancel_button,
|
|
15327
15331
|
sx: {
|
|
15328
|
-
width: 400,
|
|
15329
15332
|
"& .MuiDialogContent-root": {
|
|
15333
|
+
width: 400,
|
|
15330
15334
|
pt: 0
|
|
15331
15335
|
},
|
|
15332
15336
|
"& .MuiToolbar-root:last-child": {
|
|
@@ -15407,7 +15411,7 @@ class zu {
|
|
|
15407
15411
|
loadUserFeatures = async () => {
|
|
15408
15412
|
try {
|
|
15409
15413
|
const t = await this.api.getUserFeatures();
|
|
15410
|
-
|
|
15414
|
+
U(() => {
|
|
15411
15415
|
this.userFeatures = t;
|
|
15412
15416
|
});
|
|
15413
15417
|
} catch (t) {
|
|
@@ -15481,7 +15485,7 @@ const Fi = ({
|
|
|
15481
15485
|
primaryText: n,
|
|
15482
15486
|
secondaryText: r
|
|
15483
15487
|
}) => /* @__PURE__ */ c(_, { children: [
|
|
15484
|
-
/* @__PURE__ */ e(
|
|
15488
|
+
/* @__PURE__ */ e(k, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ c(oA, { onClick: i, children: [
|
|
15485
15489
|
/* @__PURE__ */ e(iA, { primary: n, secondary: r }),
|
|
15486
15490
|
A
|
|
15487
15491
|
] }) }),
|
|
@@ -15492,7 +15496,7 @@ const Fi = ({
|
|
|
15492
15496
|
(n) => n.member_guid === i.guid && i.successfully_aggregated_at && n.guid !== t.guid
|
|
15493
15497
|
);
|
|
15494
15498
|
}, yu = () => {
|
|
15495
|
-
const [A, t] = h.useState(!1), [i, n] = h.useState(!1), [r, o] = h.useState(!1), [a, s] = h.useState({}), { selectedAccount: d } = ve(), { mergeAccounts: I, updateAccount: f } = CA(), { accounts: l } = z(), E = mu(), { onEvent: u } =
|
|
15499
|
+
const [A, t] = h.useState(!1), [i, n] = h.useState(!1), [r, o] = h.useState(!1), [a, s] = h.useState({}), { selectedAccount: d } = ve(), { mergeAccounts: I, updateAccount: f } = CA(), { accounts: l } = z(), E = mu(), { onEvent: u } = F(), R = (P) => {
|
|
15496
15500
|
f({
|
|
15497
15501
|
...d,
|
|
15498
15502
|
...P
|
|
@@ -15780,7 +15784,7 @@ const Fi = ({
|
|
|
15780
15784
|
};
|
|
15781
15785
|
return /* @__PURE__ */ c(_, { children: [
|
|
15782
15786
|
/* @__PURE__ */ e(De, { sx: { mb: 4, mt: 12, mx: 8 }, children: /* @__PURE__ */ e(v, { bold: !0, component: "h2", variant: "XSmall", children: r.connection_status }) }),
|
|
15783
|
-
/* @__PURE__ */ e(
|
|
15787
|
+
/* @__PURE__ */ e(k, { sx: { backgroundColor: "background.paper" }, children: n.is_manual || !s.ctaCopy ? /* @__PURE__ */ c(C, { alignItems: "center", direction: "row", px: 24, py: 12, children: [
|
|
15784
15788
|
/* @__PURE__ */ e(mA, { children: /* @__PURE__ */ e(rt, { backingSx: { backgroundColor: s.color, borderRadius: 1 }, size: 32, children: s.icon }) }),
|
|
15785
15789
|
/* @__PURE__ */ e(iA, { primary: s.mainMessage, secondary: s.secondaryMessage })
|
|
15786
15790
|
] }) : /* @__PURE__ */ c(oA, { onClick: () => t(!0), children: [
|
|
@@ -15800,7 +15804,7 @@ const Fi = ({
|
|
|
15800
15804
|
] }) }),
|
|
15801
15805
|
/* @__PURE__ */ e(M, { sx: { ml: n.is_manual || !n.institution_url ? 0 : 24 } }),
|
|
15802
15806
|
!n.is_manual && n.institution_url && /* @__PURE__ */ c(_, { children: [
|
|
15803
|
-
/* @__PURE__ */ e(
|
|
15807
|
+
/* @__PURE__ */ e(k, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ c(oA, { component: "a", href: n.institution_url, target: "_blank", children: [
|
|
15804
15808
|
/* @__PURE__ */ e(mA, { children: /* @__PURE__ */ e(
|
|
15805
15809
|
rt,
|
|
15806
15810
|
{
|
|
@@ -15922,7 +15926,7 @@ const Fi = ({
|
|
|
15922
15926
|
}
|
|
15923
15927
|
);
|
|
15924
15928
|
}, Lu = g(Xu), xu = () => {
|
|
15925
|
-
const A = window.app?.config, { onEvent: t } =
|
|
15929
|
+
const A = window.app?.config, { onEvent: t } = F(), { selectedAccount: i } = ve(), { accounts: n } = z(), r = fl(i, n), o = i.member_is_managed_by_user || !i.member_is_managed_by_user && A.enable_renaming_home_accounts, [a, s] = h.useState(!1), [d, I] = h.useState(r[0]), f = r.filter(
|
|
15926
15930
|
(l) => o || i[l.name] || i[l.name] === 0
|
|
15927
15931
|
);
|
|
15928
15932
|
return /* @__PURE__ */ c(_, { children: [
|
|
@@ -15936,7 +15940,7 @@ const Fi = ({
|
|
|
15936
15940
|
}
|
|
15937
15941
|
);
|
|
15938
15942
|
return /* @__PURE__ */ e(h.Fragment, { children: o ? /* @__PURE__ */ c(_, { children: [
|
|
15939
|
-
/* @__PURE__ */ e(
|
|
15943
|
+
/* @__PURE__ */ e(k, { sx: { backgroundColor: "background.paper", px: 0 }, children: /* @__PURE__ */ c(
|
|
15940
15944
|
oA,
|
|
15941
15945
|
{
|
|
15942
15946
|
onClick: () => {
|
|
@@ -15950,7 +15954,7 @@ const Fi = ({
|
|
|
15950
15954
|
) }),
|
|
15951
15955
|
/* @__PURE__ */ e(M, { sx: { ml: u ? 0 : 24 } })
|
|
15952
15956
|
] }) : E && /* @__PURE__ */ c(_, { children: [
|
|
15953
|
-
/* @__PURE__ */ e(
|
|
15957
|
+
/* @__PURE__ */ e(k, { sx: { backgroundColor: "background.paper", px: 24 }, children: R }),
|
|
15954
15958
|
/* @__PURE__ */ e(M, { sx: { ml: u ? 0 : 24 } })
|
|
15955
15959
|
] }) }, l.name);
|
|
15956
15960
|
}),
|
|
@@ -15964,7 +15968,7 @@ const Fi = ({
|
|
|
15964
15968
|
)
|
|
15965
15969
|
] });
|
|
15966
15970
|
}, ju = g(xu), Ou = () => {
|
|
15967
|
-
const { onEvent: A } =
|
|
15971
|
+
const { onEvent: A } = F();
|
|
15968
15972
|
return h.useEffect(() => A(G.ACCOUNT_DETAILS_VIEW), []), /* @__PURE__ */ c(nA, { children: [
|
|
15969
15973
|
/* @__PURE__ */ e(ju, {}),
|
|
15970
15974
|
/* @__PURE__ */ e(Du, {}),
|
|
@@ -16027,7 +16031,7 @@ const Fi = ({
|
|
|
16027
16031
|
)
|
|
16028
16032
|
] });
|
|
16029
16033
|
}, Mu = g(Tu), Gu = () => {
|
|
16030
|
-
const [A, t] = h.useState(""), { onEvent: i } =
|
|
16034
|
+
const [A, t] = h.useState(""), { onEvent: i } = F(), { selectedAccount: n } = ve(), { accounts: r } = z(), { setFilter: o, sortedTransactions: a } = uA(), s = h.useMemo(() => a.find((d) => d.guid === A), [A]);
|
|
16031
16035
|
return h.useEffect(() => {
|
|
16032
16036
|
o({
|
|
16033
16037
|
dateRange: { start: Gs(Ns(), 90), end: Ss() },
|
|
@@ -16082,7 +16086,7 @@ const Fi = ({
|
|
|
16082
16086
|
/* @__PURE__ */ e(wt, { index: 1, name: "account-details", value: A, children: /* @__PURE__ */ e(qu, {}) })
|
|
16083
16087
|
] });
|
|
16084
16088
|
}, ga = g(Su), Yu = () => {
|
|
16085
|
-
const [A, t] = h.useState(""), { accounts: i } = z(), { selectedAccounts: n } = bA(), { setSelectedAccount: r, setSelectedMember: o } = ve(), { members: a } = CA(), { onEvent: s } =
|
|
16089
|
+
const [A, t] = h.useState(""), { accounts: i } = z(), { selectedAccounts: n } = bA(), { setSelectedAccount: r, setSelectedMember: o } = ve(), { members: a } = CA(), { onEvent: s } = F(), d = [...new Set(n.map((f) => f.account_type))], I = n.find((f) => A === f.guid);
|
|
16086
16090
|
return h.useEffect(() => {
|
|
16087
16091
|
if (I) {
|
|
16088
16092
|
r(I);
|
|
@@ -16197,7 +16201,7 @@ const Fi = ({
|
|
|
16197
16201
|
}
|
|
16198
16202
|
);
|
|
16199
16203
|
}, Uu = g(Vu), ku = ({ onBackClick: A, sx: t = {} }) => {
|
|
16200
|
-
const [i, n] = h.useState(!1), [r, o] = h.useState(!1), { accounts: a, refreshMembers: s } = CA(), { accounts: d } = z(), { setSelectedAccounts: I, selectedAccountGuids: f } = bA(), { isDesktop: l } = xA(), { onEvent: E } =
|
|
16204
|
+
const [i, n] = h.useState(!1), [r, o] = h.useState(!1), { accounts: a, refreshMembers: s } = CA(), { accounts: d } = z(), { setSelectedAccounts: I, selectedAccountGuids: f } = bA(), { isDesktop: l } = xA(), { onEvent: E } = F();
|
|
16201
16205
|
h.useEffect(() => {
|
|
16202
16206
|
I(a);
|
|
16203
16207
|
}, [a]);
|
|
@@ -16257,7 +16261,7 @@ const Fi = ({
|
|
|
16257
16261
|
sx: t,
|
|
16258
16262
|
title: n.mini_title,
|
|
16259
16263
|
children: /* @__PURE__ */ c(nA, { children: [
|
|
16260
|
-
o.length < 1 && /* @__PURE__ */ e(
|
|
16264
|
+
o.length < 1 && /* @__PURE__ */ e(k, { sx: { justifyContent: "center" }, children: n.no_accounts }),
|
|
16261
16265
|
o.map((s, d) => {
|
|
16262
16266
|
const I = o.indexOf(s) === o.length - 1;
|
|
16263
16267
|
return /* @__PURE__ */ c(h.Fragment, { children: [
|
|
@@ -16824,7 +16828,7 @@ class A9 {
|
|
|
16824
16828
|
addAccount = async (t) => {
|
|
16825
16829
|
try {
|
|
16826
16830
|
const i = await this.api.createAccount(t);
|
|
16827
|
-
|
|
16831
|
+
U(() => {
|
|
16828
16832
|
this.accounts = [...this.accounts, i];
|
|
16829
16833
|
});
|
|
16830
16834
|
} catch (i) {
|
|
@@ -16852,7 +16856,7 @@ class A9 {
|
|
|
16852
16856
|
await this.loadMembers();
|
|
16853
16857
|
try {
|
|
16854
16858
|
const t = await this.api.getAccounts();
|
|
16855
|
-
|
|
16859
|
+
U(() => {
|
|
16856
16860
|
this.accounts = this.sortAccounts(this.augmentAccounts(t));
|
|
16857
16861
|
});
|
|
16858
16862
|
} catch (t) {
|
|
@@ -16862,7 +16866,7 @@ class A9 {
|
|
|
16862
16866
|
loadInstitutions = async () => {
|
|
16863
16867
|
try {
|
|
16864
16868
|
const t = await this.api.getInstitutions();
|
|
16865
|
-
|
|
16869
|
+
U(() => {
|
|
16866
16870
|
this.institutions = t;
|
|
16867
16871
|
});
|
|
16868
16872
|
} catch (t) {
|
|
@@ -16872,7 +16876,7 @@ class A9 {
|
|
|
16872
16876
|
loadMembers = async () => {
|
|
16873
16877
|
try {
|
|
16874
16878
|
const t = await this.api.getMembers();
|
|
16875
|
-
|
|
16879
|
+
U(() => {
|
|
16876
16880
|
this.members = t;
|
|
16877
16881
|
});
|
|
16878
16882
|
} catch (t) {
|
|
@@ -16882,7 +16886,7 @@ class A9 {
|
|
|
16882
16886
|
mergeAccounts = async (t) => {
|
|
16883
16887
|
try {
|
|
16884
16888
|
const i = await this.api.mergeAccounts(t), n = i[Object.keys(i)[0]];
|
|
16885
|
-
|
|
16889
|
+
U(() => {
|
|
16886
16890
|
const r = this.accounts.findIndex((a) => a.guid === t[1]);
|
|
16887
16891
|
this.accounts.splice(r, 1);
|
|
16888
16892
|
const o = this.accounts.findIndex((a) => a.guid === t[0]);
|
|
@@ -16905,7 +16909,7 @@ class A9 {
|
|
|
16905
16909
|
};
|
|
16906
16910
|
removeAccount = async (t) => {
|
|
16907
16911
|
try {
|
|
16908
|
-
await this.api.deleteAccount(t),
|
|
16912
|
+
await this.api.deleteAccount(t), U(() => {
|
|
16909
16913
|
const i = this.accounts.findIndex((n) => n.guid === t);
|
|
16910
16914
|
this.accounts.splice(i, 1);
|
|
16911
16915
|
});
|
|
@@ -16916,7 +16920,7 @@ class A9 {
|
|
|
16916
16920
|
updateAccount = async (t) => {
|
|
16917
16921
|
try {
|
|
16918
16922
|
const i = await this.api.updateAccount(t);
|
|
16919
|
-
|
|
16923
|
+
U(() => {
|
|
16920
16924
|
const n = this.accounts.findIndex(
|
|
16921
16925
|
(r) => r.guid === i.guid
|
|
16922
16926
|
);
|
|
@@ -17114,7 +17118,7 @@ const f9 = ({
|
|
|
17114
17118
|
] });
|
|
17115
17119
|
}, pa = g(
|
|
17116
17120
|
({ height: A, isDraggable: t = !1, shouldShowZeroState: i, unavailableWidth: n = 24 }) => {
|
|
17117
|
-
const { onEvent: r } =
|
|
17121
|
+
const { onEvent: r } = F(), { setSelectedBudget: o } = WA(), { isLoadingCategoryTotals: a } = qA(), { isInitialized: s } = bA(), { availableWidth: d } = Pt(), { isMobile: I } = xA(), f = h.useMemo(() => d - n, [d]), l = (E) => {
|
|
17118
17122
|
o(E), r(G.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
17119
17123
|
budget_category: E.category.name,
|
|
17120
17124
|
click_type: "bubble"
|
|
@@ -17159,7 +17163,7 @@ const f9 = ({
|
|
|
17159
17163
|
subBudgets: d,
|
|
17160
17164
|
transaction_total: I
|
|
17161
17165
|
} = A;
|
|
17162
|
-
return /* @__PURE__ */ e(
|
|
17166
|
+
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(oA, { onClick: () => t?.(A), children: [
|
|
17163
17167
|
/* @__PURE__ */ e(mA, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Yo, { color: n, percent: s, size: 40, children: /* @__PURE__ */ e(ue, { categoryGuid: o, variant: "basic" }) }) }),
|
|
17164
17168
|
/* @__PURE__ */ e(
|
|
17165
17169
|
iA,
|
|
@@ -17179,7 +17183,7 @@ const f9 = ({
|
|
|
17179
17183
|
)
|
|
17180
17184
|
] }) });
|
|
17181
17185
|
}, v9 = g(() => {
|
|
17182
|
-
const { onEvent: A } =
|
|
17186
|
+
const { onEvent: A } = F(), { budgets: t } = z(), { detailedBudgets: i, setSelectedBudget: n } = WA(), r = (o) => {
|
|
17183
17187
|
n(o), A(G.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
17184
17188
|
budget_category: o.category.name,
|
|
17185
17189
|
click_type: "list"
|
|
@@ -17193,7 +17197,7 @@ const f9 = ({
|
|
|
17193
17197
|
] }, o.guid)) }) })
|
|
17194
17198
|
] });
|
|
17195
17199
|
}), R9 = g(() => {
|
|
17196
|
-
const A = zA(), { onEvent: t } =
|
|
17200
|
+
const A = zA(), { onEvent: t } = F(), { accounts: i } = CA(), { budgets: n, common: r, recurring: o } = z(), { incomeCategories: a, spendCategories: s } = qA(), { detailedBudgets: d, totalBudgeted: I } = WA(), { projectedIncome: f } = kA(), { setFilter: l } = uA(), [E, u] = h.useState(!1), [R, b] = h.useMemo(() => {
|
|
17197
17201
|
const w = s.reduce((D, q) => D + q.totalAmount, 0);
|
|
17198
17202
|
let y = w / I;
|
|
17199
17203
|
y > 1 && (y = 1);
|
|
@@ -17300,7 +17304,7 @@ const f9 = ({
|
|
|
17300
17304
|
return `${o} - ${a}`;
|
|
17301
17305
|
}, [t, i]);
|
|
17302
17306
|
return /* @__PURE__ */ c(h.Fragment, { children: [
|
|
17303
|
-
/* @__PURE__ */ e(
|
|
17307
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(oA, { children: [
|
|
17304
17308
|
/* @__PURE__ */ e(mA, { children: /* @__PURE__ */ e(ue, { categoryGuid: A.guid, variant: "filled" }) }),
|
|
17305
17309
|
/* @__PURE__ */ e(iA, { primary: A.name, secondary: n })
|
|
17306
17310
|
] }) }),
|
|
@@ -17363,7 +17367,7 @@ const f9 = ({
|
|
|
17363
17367
|
`${A.totalAmount === 0 ? "" : A.totalAmount}`
|
|
17364
17368
|
);
|
|
17365
17369
|
return /* @__PURE__ */ c(h.Fragment, { children: [
|
|
17366
|
-
/* @__PURE__ */ e(
|
|
17370
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(oA, { onClick: () => o(!0), children: [
|
|
17367
17371
|
/* @__PURE__ */ e(mA, { children: /* @__PURE__ */ e(ue, { categoryGuid: A.guid }) }),
|
|
17368
17372
|
/* @__PURE__ */ e(
|
|
17369
17373
|
iA,
|
|
@@ -17438,7 +17442,7 @@ const f9 = ({
|
|
|
17438
17442
|
percentage: r,
|
|
17439
17443
|
transaction_total: o
|
|
17440
17444
|
} = A, { setSelectedSubBudget: a } = WA();
|
|
17441
|
-
return /* @__PURE__ */ e(
|
|
17445
|
+
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(oA, { onClick: () => a(A), children: [
|
|
17442
17446
|
/* @__PURE__ */ e(mA, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(Yo, { color: i, percent: r, size: 40, children: /* @__PURE__ */ e(ue, { categoryGuid: n.parent_guid, variant: "basic" }) }) }),
|
|
17443
17447
|
/* @__PURE__ */ e(
|
|
17444
17448
|
iA,
|
|
@@ -17465,7 +17469,7 @@ const f9 = ({
|
|
|
17465
17469
|
u && Number(l) > 0 && (await a(u, Number(l), t.guid), f(!1), d(!1), R(void 0));
|
|
17466
17470
|
};
|
|
17467
17471
|
return /* @__PURE__ */ c(x, { children: [
|
|
17468
|
-
/* @__PURE__ */ e(
|
|
17472
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(oA, { onClick: b, children: /* @__PURE__ */ e(iA, { children: /* @__PURE__ */ c(C, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
17469
17473
|
/* @__PURE__ */ c(C, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
17470
17474
|
/* @__PURE__ */ e(T, { fill: !0, name: "add_box", size: 24, sx: { color: "action.active" } }),
|
|
17471
17475
|
/* @__PURE__ */ e(v, { bold: !0, sx: { color: "action.active" }, variant: "Body", children: i.add_sub_budget_button })
|
|
@@ -17715,7 +17719,7 @@ const f9 = ({
|
|
|
17715
17719
|
)
|
|
17716
17720
|
] });
|
|
17717
17721
|
}), Jr = 480, hR = g(({ onBackClick: A, sx: t }) => {
|
|
17718
|
-
const i = zA(), { onEvent: n } =
|
|
17722
|
+
const i = zA(), { onEvent: n } = F(), { accounts: r } = CA(), { budgets: o, common: a } = z(), { isInitialized: s, selectedAccounts: d, setDisplayedDate: I, setSelectedAccounts: f } = bA(), { alert: l, dateRange: E, loadBudgets: u, setDateRange: R, setAlert: b, setTheme: P } = WA(), { loadCashflowSequences: m } = kA(), { isDesktop: Q, isTablet: w } = xA(), { reloadCategoryTotals: y } = qA(), [X, L] = h.useState(!1), [D, q] = h.useState(!1);
|
|
17719
17723
|
h.useEffect(() => {
|
|
17720
17724
|
P(i), f(r), I(E.start, E.end), n(G.BUDGETS_VIEW);
|
|
17721
17725
|
}, []), h.useEffect(() => {
|
|
@@ -17882,7 +17886,7 @@ class x9 {
|
|
|
17882
17886
|
};
|
|
17883
17887
|
loadCopy = async () => {
|
|
17884
17888
|
const t = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
|
17885
|
-
|
|
17889
|
+
U(() => {
|
|
17886
17890
|
this.copyObject = t[this.translationKey];
|
|
17887
17891
|
});
|
|
17888
17892
|
};
|
|
@@ -18078,7 +18082,7 @@ class M9 {
|
|
|
18078
18082
|
this.copyStore = new x9(), this.insightsMicroWidgetStore = new T9(), wA(this);
|
|
18079
18083
|
}
|
|
18080
18084
|
initialize = async (t, i, n) => {
|
|
18081
|
-
await this.copyStore.initialize(t, i), await this.insightsMicroWidgetStore.initialize(t, i, n), this.session = await vc(t, i, "1.0.0", "Micro Insights Carousel"),
|
|
18085
|
+
await this.copyStore.initialize(t, i), await this.insightsMicroWidgetStore.initialize(t, i, n), this.session = await vc(t, i, "1.0.0", "Micro Insights Carousel"), U(() => {
|
|
18082
18086
|
this.isInitialized = !0;
|
|
18083
18087
|
});
|
|
18084
18088
|
};
|
|
@@ -19973,7 +19977,7 @@ const ei = h.createContext(null), G9 = ({
|
|
|
19973
19977
|
/* @__PURE__ */ e(M, { "aria-hidden": "true" }),
|
|
19974
19978
|
/* @__PURE__ */ e(nA, { children: A.categoryData.map((a) => /* @__PURE__ */ c(h.Fragment, { children: [
|
|
19975
19979
|
/* @__PURE__ */ e(
|
|
19976
|
-
|
|
19980
|
+
k,
|
|
19977
19981
|
{
|
|
19978
19982
|
disableGutters: !0,
|
|
19979
19983
|
disablePadding: !0,
|
|
@@ -20018,7 +20022,7 @@ const ei = h.createContext(null), G9 = ({
|
|
|
20018
20022
|
/* @__PURE__ */ e(M, {}),
|
|
20019
20023
|
a.categoryTotals && a.categoryTotals.length > 0 && /* @__PURE__ */ e(pi, { in: o?.guid === a.guid, unmountOnExit: !0, children: /* @__PURE__ */ c(nA, { children: [
|
|
20020
20024
|
o?.categoryTotals?.map((s) => /* @__PURE__ */ e(
|
|
20021
|
-
|
|
20025
|
+
k,
|
|
20022
20026
|
{
|
|
20023
20027
|
sx: {
|
|
20024
20028
|
pl: 24,
|
|
@@ -20212,7 +20216,7 @@ const ei = h.createContext(null), G9 = ({
|
|
|
20212
20216
|
)
|
|
20213
20217
|
] });
|
|
20214
20218
|
}, z3 = g(p3), m3 = ({ onBackClick: A, sx: t = {} }) => {
|
|
20215
|
-
const { accounts: i } = CA(), { spending: n } = z(), { isInitialized: r, setDisplayedDate: o, setSelectedAccounts: a } = bA(), { onEvent: s } =
|
|
20219
|
+
const { accounts: i } = CA(), { spending: n } = z(), { isInitialized: r, setDisplayedDate: o, setSelectedAccounts: a } = bA(), { onEvent: s } = F(), [d, I] = h.useState(!1);
|
|
20216
20220
|
h.useEffect(() => {
|
|
20217
20221
|
a(i);
|
|
20218
20222
|
}, [i]), h.useEffect(() => {
|
|
@@ -20305,7 +20309,7 @@ const D3 = (A) => A.reduce((i, n) => {
|
|
|
20305
20309
|
height: r = "100dvh",
|
|
20306
20310
|
sx: o = {}
|
|
20307
20311
|
}) => {
|
|
20308
|
-
const { onEvent: a } =
|
|
20312
|
+
const { onEvent: a } = F(), s = eA(/* @__PURE__ */ new Date(), $.MONTH_SHORT), [d, I] = h.useState([
|
|
20309
20313
|
{ field: s, sort: "desc" }
|
|
20310
20314
|
]), f = h.useMemo(() => q3(t.start, t.end), [t]), l = [
|
|
20311
20315
|
{
|
|
@@ -20379,7 +20383,7 @@ const D3 = (A) => A.reduce((i, n) => {
|
|
|
20379
20383
|
isOpen: i,
|
|
20380
20384
|
onClose: n
|
|
20381
20385
|
}) => {
|
|
20382
|
-
const { onEvent: r } =
|
|
20386
|
+
const { onEvent: r } = F(), { selectedAccountGuids: o } = bA(), { common: a } = z(), { setFilter: s, sortedTransactions: d } = uA(), [I, f] = h.useState(""), l = h.useMemo(() => d.find((u) => u.guid === I), [I]);
|
|
20383
20387
|
h.useEffect(() => {
|
|
20384
20388
|
s({
|
|
20385
20389
|
accounts: o,
|
|
@@ -20406,7 +20410,7 @@ const D3 = (A) => A.reduce((i, n) => {
|
|
|
20406
20410
|
}, N3 = g(G3), S3 = {
|
|
20407
20411
|
view_transactions: "View Transactions"
|
|
20408
20412
|
}, Y3 = ({ onBackClick: A, sx: t }) => {
|
|
20409
|
-
const i = ZA(), { onEvent: n } =
|
|
20413
|
+
const i = ZA(), { onEvent: n } = F(), { isDesktop: r, isTablet: o, isMobile: a } = xA(), { accounts: s } = CA(), { loadMonthlyCategoryTotals: d, monthlyCategoryTotals: I, getCategoryName: f } = qA(), { sortedTransactions: l } = uA(), { isInitialized: E, selectedAccounts: u, setSelectedAccounts: R } = bA(), { trends: b } = z(), P = i.palette.mode === "dark", [m, Q] = h.useState(!1), [w, y] = h.useState(!1), [X, L] = h.useState("Chart"), [D, q] = h.useState(""), [N, J] = h.useState({
|
|
20410
20414
|
start: tr(NA(we(/* @__PURE__ */ new Date(), 6)), 1),
|
|
20411
20415
|
end: NA(/* @__PURE__ */ new Date())
|
|
20412
20416
|
});
|
|
@@ -20752,7 +20756,7 @@ export {
|
|
|
20752
20756
|
go as PropertyType,
|
|
20753
20757
|
O7 as PropertyTypeName,
|
|
20754
20758
|
q7 as RECURRENCE_COPY,
|
|
20755
|
-
|
|
20759
|
+
V as RecurrenceTypes,
|
|
20756
20760
|
$7 as RecurringActivityMiniWidget,
|
|
20757
20761
|
rl as RecurringActivityStore,
|
|
20758
20762
|
_7 as RecurringActivityWidget,
|
|
@@ -20777,7 +20781,7 @@ export {
|
|
|
20777
20781
|
S as TRANSACTION_EVENTS,
|
|
20778
20782
|
wt as TabContentContainer,
|
|
20779
20783
|
Nt as TopActions,
|
|
20780
|
-
|
|
20784
|
+
B as TrackType,
|
|
20781
20785
|
Hr as TransactionApi,
|
|
20782
20786
|
Lt as TransactionDetails,
|
|
20783
20787
|
It as TransactionList,
|
|
@@ -20828,7 +20832,7 @@ export {
|
|
|
20828
20832
|
Nc as useCombineEvents,
|
|
20829
20833
|
Sc as useCombinePageviews,
|
|
20830
20834
|
Mo as useDebtStore,
|
|
20831
|
-
|
|
20835
|
+
F as useEvent,
|
|
20832
20836
|
mu as useGetMergeableAccounts,
|
|
20833
20837
|
z as useGlobalCopyStore,
|
|
20834
20838
|
Qi as useGlobalStore,
|