@mx-cartographer/experiences 6.11.1-alpha.mega1 → 6.11.1-alpha.mega3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +31 -23
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -12763,30 +12763,36 @@ const Gm = (e, n) => {
|
|
|
12763
12763
|
addRetirementGoalAccount: a,
|
|
12764
12764
|
newRetirementGoalAccounts: o,
|
|
12765
12765
|
retirementGoalAccounts: r,
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
), m = i.filter(
|
|
12771
|
-
(
|
|
12772
|
-
),
|
|
12773
|
-
|
|
12774
|
-
|
|
12766
|
+
selectedGoal: s,
|
|
12767
|
+
setAlert: c,
|
|
12768
|
+
setNewRetirementGoalAccounts: d,
|
|
12769
|
+
setSelectedGoal: u
|
|
12770
|
+
} = ot(), [_, g] = h.useState(!1), m = !e.guid, C = i.filter(
|
|
12771
|
+
(b) => m ? o.find((S) => S.account_guid === b.guid) : r.find((S) => S.account_guid === b.guid)
|
|
12772
|
+
), f = i.filter(
|
|
12773
|
+
(b) => !r.find((S) => S.account_guid === b.guid)
|
|
12774
|
+
), E = async (b) => {
|
|
12775
|
+
console.log(JSON.parse(JSON.stringify(b)));
|
|
12776
|
+
const S = b.map((A) => ({
|
|
12777
|
+
account_guid: A.guid,
|
|
12775
12778
|
retirement_goal_guid: e.guid
|
|
12776
12779
|
}));
|
|
12777
|
-
if (
|
|
12778
|
-
|
|
12780
|
+
if (m)
|
|
12781
|
+
d(S);
|
|
12779
12782
|
else
|
|
12780
|
-
for (const
|
|
12781
|
-
await a(
|
|
12782
|
-
u(
|
|
12783
|
+
for (const A of S)
|
|
12784
|
+
await a(A), c(n.alert_account_added);
|
|
12785
|
+
u({
|
|
12786
|
+
...s,
|
|
12787
|
+
current_amount: b.reduce((A, v) => A + (v.current_balance || 0), 0)
|
|
12788
|
+
}), g(!1);
|
|
12783
12789
|
};
|
|
12784
12790
|
return /* @__PURE__ */ l(y, { children: [
|
|
12785
|
-
|
|
12786
|
-
/* @__PURE__ */ t(_c, { account:
|
|
12791
|
+
C.map((b) => /* @__PURE__ */ l(y, { children: [
|
|
12792
|
+
/* @__PURE__ */ t(_c, { account: b }),
|
|
12787
12793
|
/* @__PURE__ */ t(P, {})
|
|
12788
|
-
] },
|
|
12789
|
-
/* @__PURE__ */ t(Y, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ l(ue, { onClick: () =>
|
|
12794
|
+
] }, b.guid)),
|
|
12795
|
+
/* @__PURE__ */ t(Y, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ l(ue, { onClick: () => g(!0), children: [
|
|
12790
12796
|
/* @__PURE__ */ t(se, { children: /* @__PURE__ */ l(y, { alignItems: "center", color: "action.active", direction: "row", gap: 8, children: [
|
|
12791
12797
|
/* @__PURE__ */ t(as, { filled: !0 }),
|
|
12792
12798
|
n.details_add_account
|
|
@@ -12796,10 +12802,10 @@ const Gm = (e, n) => {
|
|
|
12796
12802
|
/* @__PURE__ */ t(
|
|
12797
12803
|
dc,
|
|
12798
12804
|
{
|
|
12799
|
-
accounts:
|
|
12800
|
-
isOpen:
|
|
12801
|
-
onClose: () =>
|
|
12802
|
-
onSave:
|
|
12805
|
+
accounts: f,
|
|
12806
|
+
isOpen: _,
|
|
12807
|
+
onClose: () => g(!1),
|
|
12808
|
+
onSave: E,
|
|
12803
12809
|
title: n.add_select_accounts
|
|
12804
12810
|
}
|
|
12805
12811
|
)
|
|
@@ -12864,7 +12870,9 @@ const Gm = (e, n) => {
|
|
|
12864
12870
|
} = ot(), { user: f } = kt(), [E, b] = h.useState(!1), S = !_?.guid, A = _?.track_type === K.SAVINGS_TRACK && _.is_complete && !_.has_been_spent, v = h.useMemo(() => {
|
|
12865
12871
|
const L = S ? d : u;
|
|
12866
12872
|
return n.filter((U) => L.some((ee) => ee.account_guid === U.guid));
|
|
12867
|
-
}, [S, n, d, u])
|
|
12873
|
+
}, [S, n, d, u]);
|
|
12874
|
+
console.log(v, n, d, u);
|
|
12875
|
+
const w = h.useMemo(() => {
|
|
12868
12876
|
if (!_) return !1;
|
|
12869
12877
|
const { account_guid: L, track_type: U, name: ee, amount: _e, retirement_age: te } = _;
|
|
12870
12878
|
return U === K.SAVINGS_TRACK ? L ? !!ee && !!_e : !1 : U === K.RETIREMENT_TRACK ? v.length ? !!ee && !!_e && !!te && !!f.birthday : !1 : (U === K.DEBT_TRACK, !0);
|