@mx-cartographer/experiences 7.12.17 → 7.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/{AccountDetailsHeader-BkEF1gO-.mjs → AccountDetailsHeader-D9gbTbUt.mjs} +31 -31
- package/dist/{AccountFields-C_dcdCM7.mjs → AccountFields-CxqONzjY.mjs} +6 -6
- package/dist/AccountListItem-LcJVJysf.mjs +90 -0
- package/dist/{AccountStore-ypdfueW9.mjs → AccountStore-BNlTuxWN.mjs} +1 -1
- package/dist/{BudgetUtil--_QXyszn.mjs → BudgetUtil-CLhRnCoX.mjs} +75 -75
- package/dist/{CashflowStore-DEdQJU5i.mjs → CashflowStore-D3MKniVM.mjs} +11 -11
- package/dist/{CategorySelectorDrawer-wfUTIbLR.mjs → CategorySelectorDrawer-DYHNBd2v.mjs} +31 -31
- package/dist/{ConnectDrawer-CioFo6Wy.mjs → ConnectDrawer-C0wjwcJt.mjs} +1 -1
- package/dist/{ConnectionsDrawer-DqhSaMrJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +1 -1
- package/dist/{Drawer-DV4NTsFg.mjs → Drawer-Bbe4AMB1.mjs} +5 -5
- package/dist/{GoalStore-0bd-Upkc.mjs → GoalStore-DB58sKTC.mjs} +8 -8
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-CDu1Fvrc.mjs → Help-CpLfyvPv.mjs} +24 -24
- package/dist/{LineChart-B1qbKR8q.mjs → LineChart-DBSlRSEm.mjs} +102 -102
- package/dist/{ManageIncome-BnWWjP2g.mjs → ManageIncome-QvqN555q.mjs} +62 -62
- package/dist/{MiniWidgetContainer-Cu72GNsE.mjs → MiniWidgetContainer-xLWSV6Wz.mjs} +13 -13
- package/dist/{NotificationSettings-BH2yOwTB.mjs → NotificationSettings-DU3vJh5J.mjs} +139 -139
- package/dist/{OriginalBalanceAction-BM6rT_Cn.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +6 -6
- package/dist/{RecurringSettings-BmXtfHtK.mjs → RecurringSettings-DdOcok2e.mjs} +2 -2
- package/dist/{RecurringTransactions-CYNpe_RS.mjs → RecurringTransactions-BOzBqfdg.mjs} +11 -11
- package/dist/{RecurringTransactionsStore-BD-OfVZ-.mjs → RecurringTransactionsStore-CcfPS0d3.mjs} +1 -1
- package/dist/{SpendingLegend-Bq6aXMNh.mjs → SpendingLegend-CJjjTGBw.mjs} +76 -76
- package/dist/{StatusIndicator-BV3oFzxo.mjs → StatusIndicator-CIKUOoN_.mjs} +53 -53
- package/dist/{TransactionDetails-DYlTwSDt.mjs → TransactionDetails-BpcWeXNU.mjs} +350 -350
- package/dist/{ViewMoreMicroCard-BhG9hCoO.mjs → ViewMoreMicroCard-ApUBfGOX.mjs} +107 -106
- package/dist/{WidgetContainer-B0ncgABX.mjs → WidgetContainer-D_iaToWJ.mjs} +12 -12
- package/dist/accounts/index.es.js +107 -107
- package/dist/analytics/index.es.js +18 -18
- package/dist/budgets/index.es.js +182 -182
- package/dist/cashflow/index.es.js +223 -223
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +54 -64
- package/dist/common/types/Beat.d.ts +2 -0
- package/dist/dashboard/index.es.js +9 -9
- package/dist/debts/index.es.js +469 -469
- package/dist/finstrong/index.es.js +68 -68
- package/dist/goals/index.es.js +437 -437
- package/dist/help/index.es.js +2 -2
- package/dist/insights/index.es.js +159 -159
- package/dist/investments/index.es.js +292 -292
- package/dist/merchants/index.es.js +12 -12
- package/dist/microinsights/beaticons/InstitutionLogoIcon.d.ts +5 -0
- package/dist/microinsights/beaticons/index.d.ts +1 -0
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +175 -168
- package/dist/notifications/index.es.js +13 -13
- package/dist/recurringtransactions/index.es.js +69 -69
- package/dist/settings/index.es.js +187 -187
- package/dist/spending/index.es.js +58 -58
- package/dist/transactions/index.es.js +70 -70
- package/dist/trends/index.es.js +16 -16
- package/package.json +1 -1
- package/dist/AccountListItem-BAf03YhK.mjs +0 -90
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import d from "react";
|
|
3
3
|
import { observer as E } from "mobx-react-lite";
|
|
4
4
|
import F from "@mui/material/Box";
|
|
5
5
|
import de from "@mui/material/Divider";
|
|
6
6
|
import ue from "@mui/material/List";
|
|
7
|
-
import
|
|
7
|
+
import ce from "@mui/material/Paper";
|
|
8
8
|
import v from "@mui/material/Stack";
|
|
9
|
-
import { useTheme as U, alpha as
|
|
10
|
-
import { P as
|
|
11
|
-
import { g as Ke, C as Fe, a as He, b as Ue, i as Ve } from "./BudgetUtil
|
|
9
|
+
import { useTheme as U, alpha as Ce } from "@mui/material/styles";
|
|
10
|
+
import { P as j, Text as x, H2 as Be, MerchantLogo as Ne, Toast as $e, CategoryIcon as Ie, CategoryIconVariants as Oe, TextField as ve, Icon as le, IconWeight as xe } from "@mxenabled/mxui";
|
|
11
|
+
import { g as Ke, C as Fe, a as He, b as Ue, i as Ve } from "./BudgetUtil-CLhRnCoX.mjs";
|
|
12
12
|
import oe from "@mui/material/Button";
|
|
13
13
|
import We from "@mui/material/FormGroup";
|
|
14
14
|
import ne from "@mui/material/IconButton";
|
|
15
15
|
import Le from "@mui/material/TextField";
|
|
16
16
|
import { u as pe } from "./useAriaLive-MkYebyUR.mjs";
|
|
17
17
|
import { O as y } from "./Transaction-CqjlF6SO.mjs";
|
|
18
|
-
import { u as I, h as O, m as Ye, d as ze, l as we, g as w, b as
|
|
18
|
+
import { u as I, h as O, m as Ye, d as ze, l as we, g as w, b as je, o as qe } from "./hooks-BxkfR-Ff.mjs";
|
|
19
19
|
import { A as H } from "./Analytics-BYItVAe-.mjs";
|
|
20
|
-
import
|
|
21
|
-
import { ChevronRight as Re, Icon as D, Delete as
|
|
22
|
-
import { fromUnixTime as
|
|
20
|
+
import Xe from "@mui/material/ToggleButton";
|
|
21
|
+
import { ChevronRight as Re, Icon as D, Delete as _e, Cancel as me, Search as Je, Edit as Qe, Flag as Ze } from "@mxenabled/mx-icons";
|
|
22
|
+
import { fromUnixTime as Ae } from "date-fns/fromUnixTime";
|
|
23
23
|
import V from "@mui/material/Avatar";
|
|
24
24
|
import B from "@mui/material/ListItem";
|
|
25
25
|
import W from "@mui/material/ListItemAvatar";
|
|
@@ -27,22 +27,22 @@ import $ from "@mui/material/ListItemText";
|
|
|
27
27
|
import { f as Me, D as ke } from "./DateFormats-BMpMrZpW.mjs";
|
|
28
28
|
import Y from "@mui/material/ListItemButton";
|
|
29
29
|
import z from "@mui/material/ListItemIcon";
|
|
30
|
-
import { a as Pe } from "./CategorySelectorDrawer-
|
|
31
|
-
import { b as et, T as tt, u as J } from "./StatusIndicator-
|
|
32
|
-
import { D as
|
|
30
|
+
import { a as Pe } from "./CategorySelectorDrawer-DYHNBd2v.mjs";
|
|
31
|
+
import { b as et, T as tt, u as J } from "./StatusIndicator-CIKUOoN_.mjs";
|
|
32
|
+
import { D as X } from "./Dialog-Ck34yr-d.mjs";
|
|
33
33
|
import { b as N } from "./Localization-CPkpIwIx.mjs";
|
|
34
34
|
import { getUnixTime as rt } from "date-fns/getUnixTime";
|
|
35
|
-
import { D as ie } from "./Drawer-
|
|
36
|
-
import { f as
|
|
35
|
+
import { D as ie } from "./Drawer-Bbe4AMB1.mjs";
|
|
36
|
+
import { f as q } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
37
37
|
import at from "@mui/material/styles/useTheme";
|
|
38
38
|
import De from "@mui/material/InputAdornment";
|
|
39
39
|
import nt from "@mui/material/Checkbox";
|
|
40
40
|
import { startOfMonth as ot } from "date-fns/startOfMonth";
|
|
41
41
|
import { endOfMonth as it } from "date-fns/endOfMonth";
|
|
42
42
|
import { i as st } from "./DateUtil-wcYTmDRD.mjs";
|
|
43
|
-
import
|
|
44
|
-
import { C as
|
|
45
|
-
import
|
|
43
|
+
import fe from "@mui/material/Grid";
|
|
44
|
+
import { C as ct } from "./CurrencyInput-DuMktPu3.mjs";
|
|
45
|
+
import lt from "@mui/material/Switch";
|
|
46
46
|
import { L as dt } from "./Loader-D3rjKx72.mjs";
|
|
47
47
|
var re = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(re || {}), ae = /* @__PURE__ */ ((t) => (t[t.MerchantBudget = 0] = "MerchantBudget", t[t.SplitTransaction = 1] = "SplitTransaction", t[t.HideTransaction = 2] = "HideTransaction", t[t.MerchantLogo = 3] = "MerchantLogo", t))(ae || {});
|
|
48
48
|
const ut = [
|
|
@@ -51,12 +51,12 @@ const ut = [
|
|
|
51
51
|
2,
|
|
52
52
|
3
|
|
53
53
|
/* Tags */
|
|
54
|
-
],
|
|
54
|
+
], _t = [
|
|
55
55
|
1,
|
|
56
56
|
2,
|
|
57
57
|
3
|
|
58
58
|
/* MerchantLogo */
|
|
59
|
-
],
|
|
59
|
+
], mt = ({
|
|
60
60
|
startDate: t,
|
|
61
61
|
onViewHistory: n,
|
|
62
62
|
totalTransaction: i,
|
|
@@ -64,10 +64,10 @@ const ut = [
|
|
|
64
64
|
spentPercentage: o,
|
|
65
65
|
remainingAmount: a,
|
|
66
66
|
iconColor: s,
|
|
67
|
-
icon:
|
|
67
|
+
icon: l
|
|
68
68
|
}) => {
|
|
69
|
-
const { budgets:
|
|
70
|
-
return /* @__PURE__ */ e(d.Fragment, { children: /* @__PURE__ */
|
|
69
|
+
const { budgets: m } = I();
|
|
70
|
+
return /* @__PURE__ */ e(d.Fragment, { children: /* @__PURE__ */ c(
|
|
71
71
|
F,
|
|
72
72
|
{
|
|
73
73
|
sx: {
|
|
@@ -77,7 +77,7 @@ const ut = [
|
|
|
77
77
|
borderBottomWidth: 1
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ c(
|
|
81
81
|
v,
|
|
82
82
|
{
|
|
83
83
|
sx: {
|
|
@@ -89,27 +89,27 @@ const ut = [
|
|
|
89
89
|
px: 24
|
|
90
90
|
},
|
|
91
91
|
children: [
|
|
92
|
-
/* @__PURE__ */ e(
|
|
93
|
-
n && /* @__PURE__ */ e(oe, { endIcon: /* @__PURE__ */ e(Re, {}), onClick: n, sx: { height: 28 }, children: /* @__PURE__ */ e(
|
|
92
|
+
/* @__PURE__ */ e(j, { bold: !0, variant: "subtitle1", children: st(t) }),
|
|
93
|
+
n && /* @__PURE__ */ e(oe, { endIcon: /* @__PURE__ */ e(Re, {}), onClick: n, sx: { height: 28 }, children: /* @__PURE__ */ e(x, { bold: !0, variant: "body2", children: m.spending_history }) })
|
|
94
94
|
]
|
|
95
95
|
}
|
|
96
96
|
),
|
|
97
97
|
/* @__PURE__ */ e(
|
|
98
98
|
et,
|
|
99
99
|
{
|
|
100
|
-
amount: /* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */ e(Be, { children:
|
|
102
|
-
/* @__PURE__ */ e(
|
|
103
|
-
/* @__PURE__ */ e(
|
|
100
|
+
amount: /* @__PURE__ */ c(v, { sx: { alignItems: "baseline", flexDirection: "row", gap: 4 }, children: [
|
|
101
|
+
/* @__PURE__ */ e(Be, { children: q(i, "0,0.00") }),
|
|
102
|
+
/* @__PURE__ */ e(j, { color: "text.secondary", variant: "body2", children: "/" }),
|
|
103
|
+
/* @__PURE__ */ e(j, { color: "text.secondary", variant: "body2", children: q(r, "0,0.00") })
|
|
104
104
|
] }),
|
|
105
105
|
completeColor: `${s}.main`,
|
|
106
|
-
icon:
|
|
107
|
-
label:
|
|
108
|
-
leftLabel: N(
|
|
106
|
+
icon: l,
|
|
107
|
+
label: m.spent_label,
|
|
108
|
+
leftLabel: N(m.percent_spent, o.toFixed()),
|
|
109
109
|
percentComplete: o,
|
|
110
110
|
rightLabel: N(
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
m.balance_left,
|
|
112
|
+
q(a, "0,0.00")
|
|
113
113
|
),
|
|
114
114
|
sx: {
|
|
115
115
|
pb: 24,
|
|
@@ -129,23 +129,23 @@ const ut = [
|
|
|
129
129
|
setCurrencyDialogAction: o,
|
|
130
130
|
renderingToast: a
|
|
131
131
|
}) => {
|
|
132
|
-
const { budgets: s, common:
|
|
132
|
+
const { budgets: s, common: l } = I(), { sortedTransactions: m } = O(), u = d.useMemo(() => m.reduce((h, A) => A.parent_guid ? h : h + A.amount, 0), [m]), { remainingAmount: p, spentPercentage: _, iconColor: g } = Ke(
|
|
133
133
|
u,
|
|
134
134
|
t.amount ?? 0
|
|
135
135
|
);
|
|
136
|
-
return /* @__PURE__ */
|
|
136
|
+
return /* @__PURE__ */ c(
|
|
137
137
|
ie,
|
|
138
138
|
{
|
|
139
|
-
ariaLabelClose:
|
|
139
|
+
ariaLabelClose: l.close_aria,
|
|
140
140
|
footerStyles: {
|
|
141
141
|
px: 24,
|
|
142
142
|
py: 16
|
|
143
143
|
},
|
|
144
144
|
isOpen: r,
|
|
145
145
|
onClose: i,
|
|
146
|
-
onPrimaryAction: () => o(
|
|
146
|
+
onPrimaryAction: () => o(Se.EDIT),
|
|
147
147
|
onSecondaryAction: () => {
|
|
148
|
-
o(
|
|
148
|
+
o(Se.DELETE);
|
|
149
149
|
},
|
|
150
150
|
primaryText: s.details_edit_button,
|
|
151
151
|
secondaryColor: "error",
|
|
@@ -158,7 +158,7 @@ const ut = [
|
|
|
158
158
|
title: N(s.details_type_title, t.merchant_name),
|
|
159
159
|
children: [
|
|
160
160
|
/* @__PURE__ */ e(
|
|
161
|
-
|
|
161
|
+
mt,
|
|
162
162
|
{
|
|
163
163
|
amount: t.amount,
|
|
164
164
|
icon: /* @__PURE__ */ e(
|
|
@@ -170,7 +170,7 @@ const ut = [
|
|
|
170
170
|
),
|
|
171
171
|
iconColor: g,
|
|
172
172
|
remainingAmount: p,
|
|
173
|
-
spentPercentage:
|
|
173
|
+
spentPercentage: _,
|
|
174
174
|
startDate: n.date,
|
|
175
175
|
totalTransaction: u
|
|
176
176
|
}
|
|
@@ -181,33 +181,33 @@ const ut = [
|
|
|
181
181
|
}
|
|
182
182
|
);
|
|
183
183
|
}, gt = E(pt);
|
|
184
|
-
var
|
|
184
|
+
var Se = /* @__PURE__ */ ((t) => (t.CREATE = "create", t.EDIT = "edit", t.DELETE = "delete", t))(Se || {});
|
|
185
185
|
const ht = E(({ transaction: t }) => {
|
|
186
|
-
const [n, i] = d.useState(null), [r, o] = d.useState(""), [a, s] = d.useState(!1),
|
|
187
|
-
addMerchantBudget:
|
|
186
|
+
const [n, i] = d.useState(null), [r, o] = d.useState(""), [a, s] = d.useState(!1), l = d.useRef(!1), [m, u] = d.useState(null), p = U(), {
|
|
187
|
+
addMerchantBudget: _,
|
|
188
188
|
updateMerchantBudget: g,
|
|
189
189
|
deleteMerchantBudget: h,
|
|
190
|
-
getMerchantBudgetByMerchantGuid:
|
|
190
|
+
getMerchantBudgetByMerchantGuid: A,
|
|
191
191
|
alert: L,
|
|
192
192
|
setAlert: k
|
|
193
|
-
} = Ye(), { setFilter:
|
|
193
|
+
} = Ye(), { setFilter: f } = O(), { accounts: T } = ze(), R = p.palette.mode === "dark" ? "grey.800" : "grey.100", { budgets: b, common: Q } = I(), { announce: ge, ariaLive: he } = pe(), [Z, ee] = d.useState(!1), K = t?.merchant_guid ? A(t.merchant_guid) : void 0, te = () => {
|
|
194
194
|
u(n), i(null), o("");
|
|
195
195
|
}, ye = () => {
|
|
196
196
|
K ? ee(!0) : i(
|
|
197
197
|
"create"
|
|
198
198
|
/* CREATE */
|
|
199
199
|
);
|
|
200
|
-
},
|
|
200
|
+
}, C = {
|
|
201
201
|
create: {
|
|
202
202
|
content: N(
|
|
203
|
-
|
|
203
|
+
b.create_budget_content,
|
|
204
204
|
/* @__PURE__ */ e("strong", { children: t.description }),
|
|
205
|
-
`${
|
|
205
|
+
`${q(t.amount, "0,0.00")}`
|
|
206
206
|
),
|
|
207
|
-
title:
|
|
208
|
-
primaryButtonText:
|
|
207
|
+
title: b.dialog_create_budget_title,
|
|
208
|
+
primaryButtonText: b.dialog_primary_button_text,
|
|
209
209
|
errorAlertMessage: N(
|
|
210
|
-
|
|
210
|
+
b.alert_merchant_budget_not_created,
|
|
211
211
|
t.description
|
|
212
212
|
),
|
|
213
213
|
errorRetryAction: () => i(
|
|
@@ -215,20 +215,20 @@ const ht = E(({ transaction: t }) => {
|
|
|
215
215
|
/* CREATE */
|
|
216
216
|
),
|
|
217
217
|
successAlertMessage: N(
|
|
218
|
-
|
|
218
|
+
b.alert_budget_created,
|
|
219
219
|
t.description
|
|
220
220
|
),
|
|
221
|
-
apiTrigger: async () => await
|
|
221
|
+
apiTrigger: async () => await _(t.merchant_guid, Number(r))
|
|
222
222
|
},
|
|
223
223
|
edit: {
|
|
224
224
|
content: N(
|
|
225
|
-
|
|
225
|
+
b.edit_budget_content,
|
|
226
226
|
/* @__PURE__ */ e("strong", { children: t.description })
|
|
227
227
|
),
|
|
228
|
-
title:
|
|
229
|
-
primaryButtonText:
|
|
228
|
+
title: b.details_edit_title,
|
|
229
|
+
primaryButtonText: b.add_save_button,
|
|
230
230
|
errorAlertMessage: N(
|
|
231
|
-
|
|
231
|
+
b.error_alert_edit_merchant_budget,
|
|
232
232
|
t.description
|
|
233
233
|
),
|
|
234
234
|
errorRetryAction: () => i(
|
|
@@ -236,7 +236,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
236
236
|
/* EDIT */
|
|
237
237
|
),
|
|
238
238
|
successAlertMessage: N(
|
|
239
|
-
|
|
239
|
+
b.success_alert_edit_merchant_budget,
|
|
240
240
|
t.description
|
|
241
241
|
),
|
|
242
242
|
apiTrigger: async () => await g({
|
|
@@ -246,13 +246,13 @@ const ht = E(({ transaction: t }) => {
|
|
|
246
246
|
},
|
|
247
247
|
delete: {
|
|
248
248
|
content: N(
|
|
249
|
-
|
|
249
|
+
b.delete_description,
|
|
250
250
|
/* @__PURE__ */ e("strong", { children: t.description })
|
|
251
251
|
),
|
|
252
|
-
title:
|
|
253
|
-
primaryButtonText:
|
|
252
|
+
title: b.delete_title,
|
|
253
|
+
primaryButtonText: b.details_delete_button,
|
|
254
254
|
errorAlertMessage: N(
|
|
255
|
-
|
|
255
|
+
b.error_alert_delete_merchant_budget,
|
|
256
256
|
t.description
|
|
257
257
|
),
|
|
258
258
|
errorRetryAction: () => i(
|
|
@@ -260,53 +260,53 @@ const ht = E(({ transaction: t }) => {
|
|
|
260
260
|
/* DELETE */
|
|
261
261
|
),
|
|
262
262
|
successAlertMessage: N(
|
|
263
|
-
|
|
263
|
+
b.success_alert_delete_merchant_budget,
|
|
264
264
|
t.description
|
|
265
265
|
),
|
|
266
266
|
apiTrigger: async () => await h(K.guid)
|
|
267
267
|
}
|
|
268
268
|
}, P = async () => {
|
|
269
|
-
if (
|
|
270
|
-
|
|
271
|
-
const { apiTrigger: M, successAlertMessage: G, errorAlertMessage: Te } =
|
|
272
|
-
te(), s(!
|
|
269
|
+
if (l.current) return;
|
|
270
|
+
l.current = !0;
|
|
271
|
+
const { apiTrigger: M, successAlertMessage: G, errorAlertMessage: Te } = C[n], { isSuccess: be } = await M(), Ee = be ? G : Te;
|
|
272
|
+
te(), s(!be), k(Ee), ge(Ee), be && n === "delete" && ee(!1), l.current = !1;
|
|
273
273
|
};
|
|
274
274
|
d.useEffect(() => {
|
|
275
275
|
const M = {
|
|
276
276
|
start: ot(new Date(t.date * 1e3)),
|
|
277
277
|
end: it(new Date(t.date * 1e3))
|
|
278
278
|
};
|
|
279
|
-
|
|
279
|
+
f({
|
|
280
280
|
accounts: T.map((G) => G.guid),
|
|
281
281
|
custom: Z ? (G) => G.merchant_guid === t.merchant_guid : (G) => G.guid === t.guid,
|
|
282
282
|
dateRange: M
|
|
283
283
|
});
|
|
284
284
|
}, [Z, t, T]);
|
|
285
|
-
const
|
|
285
|
+
const S = () => /* @__PURE__ */ e(
|
|
286
286
|
$e,
|
|
287
287
|
{
|
|
288
|
-
actionText:
|
|
288
|
+
actionText: b.autogenerate_budgets_error_primary_button,
|
|
289
289
|
autoHideDuration: 3500,
|
|
290
290
|
closeAriaLabel: Q.close_aria,
|
|
291
291
|
handleClose: () => k(""),
|
|
292
292
|
message: L,
|
|
293
|
-
onActionClick:
|
|
293
|
+
onActionClick: C[m]?.errorRetryAction,
|
|
294
294
|
open: !!L,
|
|
295
295
|
severity: a ? "error" : "success",
|
|
296
296
|
showAction: a,
|
|
297
297
|
showClose: !0
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
|
-
return /* @__PURE__ */
|
|
300
|
+
return /* @__PURE__ */ c(d.Fragment, { children: [
|
|
301
301
|
he,
|
|
302
|
-
/* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(Y, { onClick: ye, children: [
|
|
303
303
|
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: R }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "bubble_chart", sx: { color: "text.primary" } }) }) }),
|
|
304
304
|
/* @__PURE__ */ e(
|
|
305
305
|
$,
|
|
306
306
|
{
|
|
307
|
-
primary:
|
|
307
|
+
primary: b.add_merchant_budget_primary_text,
|
|
308
308
|
primaryTypographyProps: { variant: "caption" },
|
|
309
|
-
secondary: /* @__PURE__ */ e(
|
|
309
|
+
secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: K ? `${q(K.amount, "0,0.00")} / ${Q.month_text}` : b.add_merchant_budget_secondary_text })
|
|
310
310
|
}
|
|
311
311
|
),
|
|
312
312
|
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
@@ -317,7 +317,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
317
317
|
isOpen: Z,
|
|
318
318
|
merchantBudget: K,
|
|
319
319
|
onClose: () => ee(!1),
|
|
320
|
-
renderingToast: () => L &&
|
|
320
|
+
renderingToast: () => L && S(),
|
|
321
321
|
setCurrencyDialogAction: (M) => {
|
|
322
322
|
M === "edit" && o(K?.amount.toString() || ""), i(M);
|
|
323
323
|
},
|
|
@@ -328,7 +328,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
328
328
|
Fe,
|
|
329
329
|
{
|
|
330
330
|
closeAriaLabel: Q.close_aria,
|
|
331
|
-
content:
|
|
331
|
+
content: C[n].content,
|
|
332
332
|
handleInputChange: o,
|
|
333
333
|
handleModalClose: te,
|
|
334
334
|
handlePrimaryAction: P,
|
|
@@ -336,21 +336,21 @@ const ht = E(({ transaction: t }) => {
|
|
|
336
336
|
inputLabel: n !== "delete" ? Q.amount_text : "",
|
|
337
337
|
inputValue: r,
|
|
338
338
|
isOpen: !!n,
|
|
339
|
-
primaryText:
|
|
339
|
+
primaryText: C[n].primaryButtonText,
|
|
340
340
|
secondaryText: Q.cancel_button,
|
|
341
|
-
title:
|
|
341
|
+
title: C[n].title
|
|
342
342
|
}
|
|
343
343
|
),
|
|
344
|
-
!!L &&
|
|
344
|
+
!!L && S()
|
|
345
345
|
] });
|
|
346
346
|
}), yt = ({ transaction: t }) => {
|
|
347
|
-
const { addOrUpdateTransactionRule: n, updateTransaction: i } = O(), { categories: r } = we(), { onEvent: o } = w(), { setShouldDisableDrawerScroll: a, updateManualTransaction: s } = J(), { transactions:
|
|
348
|
-
await i({ ...t, category_guid:
|
|
347
|
+
const { addOrUpdateTransactionRule: n, updateTransaction: i } = O(), { categories: r } = we(), { onEvent: o } = w(), { setShouldDisableDrawerScroll: a, updateManualTransaction: s } = J(), { transactions: l } = I(), m = U(), [u, p] = d.useState(!1), [_, g] = d.useState(""), h = async (T) => {
|
|
348
|
+
await i({ ...t, category_guid: _ }), T && await n(_, t), g(""), o(H.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
349
349
|
transaction_guid: t.guid
|
|
350
350
|
});
|
|
351
|
-
},
|
|
351
|
+
}, A = (T) => {
|
|
352
352
|
if (t.is_manual && !t.guid) {
|
|
353
|
-
const R = r.find((
|
|
353
|
+
const R = r.find((b) => b.guid === T);
|
|
354
354
|
s({
|
|
355
355
|
...t,
|
|
356
356
|
category: R?.name,
|
|
@@ -363,18 +363,18 @@ const ht = E(({ transaction: t }) => {
|
|
|
363
363
|
}, L = () => {
|
|
364
364
|
p(!1), a(!1);
|
|
365
365
|
}, k = d.useMemo(
|
|
366
|
-
() => r.find((T) => T.guid ===
|
|
367
|
-
[
|
|
368
|
-
),
|
|
369
|
-
return /* @__PURE__ */
|
|
370
|
-
/* @__PURE__ */
|
|
366
|
+
() => r.find((T) => T.guid === _),
|
|
367
|
+
[_]
|
|
368
|
+
), f = m.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
369
|
+
return /* @__PURE__ */ c(B, { disableGutters: !0, disablePadding: !0, children: [
|
|
370
|
+
/* @__PURE__ */ c(
|
|
371
371
|
Y,
|
|
372
372
|
{
|
|
373
373
|
onClick: () => {
|
|
374
374
|
o(y.ON_TRANSACTION_CATEGORY_CLICK), p(!0);
|
|
375
375
|
},
|
|
376
376
|
children: [
|
|
377
|
-
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor:
|
|
377
|
+
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: f }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
378
378
|
Ie,
|
|
379
379
|
{
|
|
380
380
|
categoryGuid: t.top_level_category_guid,
|
|
@@ -386,9 +386,9 @@ const ht = E(({ transaction: t }) => {
|
|
|
386
386
|
/* @__PURE__ */ e(
|
|
387
387
|
$,
|
|
388
388
|
{
|
|
389
|
-
primary:
|
|
390
|
-
primaryTypographyProps: { variant: "
|
|
391
|
-
secondary: /* @__PURE__ */ e(
|
|
389
|
+
primary: l.category_title,
|
|
390
|
+
primaryTypographyProps: { variant: "caption" },
|
|
391
|
+
secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: t.category ?? l.actions_select_a_category })
|
|
392
392
|
}
|
|
393
393
|
),
|
|
394
394
|
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
@@ -400,28 +400,28 @@ const ht = E(({ transaction: t }) => {
|
|
|
400
400
|
{
|
|
401
401
|
initialSelected: t.category_guid,
|
|
402
402
|
onClose: L,
|
|
403
|
-
onSelect:
|
|
403
|
+
onSelect: A,
|
|
404
404
|
showDrawer: u,
|
|
405
|
-
title:
|
|
405
|
+
title: l.actions_select_a_category
|
|
406
406
|
}
|
|
407
407
|
),
|
|
408
408
|
/* @__PURE__ */ e(
|
|
409
|
-
|
|
409
|
+
X,
|
|
410
410
|
{
|
|
411
411
|
copy: {
|
|
412
412
|
title: N(
|
|
413
|
-
|
|
413
|
+
l.actions_apply_to_all_transaction_types,
|
|
414
414
|
t.description
|
|
415
415
|
)
|
|
416
416
|
},
|
|
417
|
-
isOpen: !!
|
|
417
|
+
isOpen: !!_,
|
|
418
418
|
onClose: () => g(""),
|
|
419
419
|
onPrimaryAction: () => h(!0),
|
|
420
420
|
onSecondaryAction: () => h(!1),
|
|
421
|
-
primaryText:
|
|
422
|
-
secondaryText:
|
|
423
|
-
children: /* @__PURE__ */ e(
|
|
424
|
-
|
|
421
|
+
primaryText: l.actions_apply_to_all,
|
|
422
|
+
secondaryText: l.actions_this_time_only,
|
|
423
|
+
children: /* @__PURE__ */ e(j, { variant: "subtitle1", children: N(
|
|
424
|
+
l.actions_all_past_and_future,
|
|
425
425
|
t.description,
|
|
426
426
|
k?.name
|
|
427
427
|
) })
|
|
@@ -429,21 +429,21 @@ const ht = E(({ transaction: t }) => {
|
|
|
429
429
|
)
|
|
430
430
|
] });
|
|
431
431
|
}, Tt = ({ transaction: t }) => {
|
|
432
|
-
const { onEvent: n } = w(), { updateTransaction: i } = O(), { updateManualTransaction: r } = J(), { common: o, transactions: a } = I(), s = U(), [
|
|
433
|
-
p(rt(
|
|
432
|
+
const { onEvent: n } = w(), { updateTransaction: i } = O(), { updateManualTransaction: r } = J(), { common: o, transactions: a } = I(), s = U(), [l, m] = d.useState(!1), [u, p] = d.useState(t.date), _ = (A) => {
|
|
433
|
+
p(rt(A));
|
|
434
434
|
}, g = async () => {
|
|
435
435
|
if (t.is_manual && !t.guid) {
|
|
436
|
-
r({ ...t, date: u }),
|
|
436
|
+
r({ ...t, date: u }), m(!1);
|
|
437
437
|
return;
|
|
438
438
|
}
|
|
439
|
-
await i({ ...t, date: u }), n(H.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }),
|
|
439
|
+
await i({ ...t, date: u }), n(H.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), m(!1);
|
|
440
440
|
}, h = s.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
441
|
-
return /* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */
|
|
441
|
+
return /* @__PURE__ */ c(B, { className: "mx-txn-date-action", disableGutters: !0, disablePadding: !0, children: [
|
|
442
|
+
/* @__PURE__ */ c(
|
|
443
443
|
Y,
|
|
444
444
|
{
|
|
445
445
|
onClick: () => {
|
|
446
|
-
n(y.ON_TRANSACTION_DATE_CLICK),
|
|
446
|
+
n(y.ON_TRANSACTION_DATE_CLICK), m(!0);
|
|
447
447
|
},
|
|
448
448
|
children: [
|
|
449
449
|
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: h }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "calendar_month", sx: { color: "text.primary" } }) }) }),
|
|
@@ -451,8 +451,8 @@ const ht = E(({ transaction: t }) => {
|
|
|
451
451
|
$,
|
|
452
452
|
{
|
|
453
453
|
primary: a.date_title,
|
|
454
|
-
primaryTypographyProps: { variant: "
|
|
455
|
-
secondary: /* @__PURE__ */ e(
|
|
454
|
+
primaryTypographyProps: { variant: "caption" },
|
|
455
|
+
secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: Me(Ae(t.date), ke.YEAR_MONTH_DAY) })
|
|
456
456
|
}
|
|
457
457
|
),
|
|
458
458
|
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
@@ -463,8 +463,8 @@ const ht = E(({ transaction: t }) => {
|
|
|
463
463
|
ie,
|
|
464
464
|
{
|
|
465
465
|
ariaLabelClose: o.close_aria,
|
|
466
|
-
isOpen:
|
|
467
|
-
onClose: () =>
|
|
466
|
+
isOpen: l,
|
|
467
|
+
onClose: () => m(!1),
|
|
468
468
|
onPrimaryAction: g,
|
|
469
469
|
primaryText: o.save_button,
|
|
470
470
|
secondaryText: o.cancel_button,
|
|
@@ -472,32 +472,32 @@ const ht = E(({ transaction: t }) => {
|
|
|
472
472
|
children: /* @__PURE__ */ e(v, { alignItems: "center", mt: 40, children: /* @__PURE__ */ e(
|
|
473
473
|
He,
|
|
474
474
|
{
|
|
475
|
-
beginDate:
|
|
475
|
+
beginDate: Ae(u),
|
|
476
476
|
copy: {
|
|
477
477
|
nextAria: a.date_next_aria,
|
|
478
478
|
prevAria: a.date_prev_aria,
|
|
479
479
|
today: o.date_range_picker.today
|
|
480
480
|
},
|
|
481
|
-
onDateSelected:
|
|
481
|
+
onDateSelected: _,
|
|
482
482
|
selectionType: Ue.Single
|
|
483
483
|
}
|
|
484
484
|
) })
|
|
485
485
|
}
|
|
486
486
|
)
|
|
487
487
|
] });
|
|
488
|
-
},
|
|
489
|
-
const { onEvent: n } = w(), { removeTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: a } = I(), [s,
|
|
488
|
+
}, bt = ({ transaction: t }) => {
|
|
489
|
+
const { onEvent: n } = w(), { removeTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: a } = I(), [s, l] = d.useState(!1), m = async () => {
|
|
490
490
|
await i(t.guid), n(y.ON_TRANSACTION_DELETE_DELETED);
|
|
491
491
|
};
|
|
492
|
-
return /* @__PURE__ */
|
|
493
|
-
t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
492
|
+
return /* @__PURE__ */ c(F, { className: "mx-txn-delete", children: [
|
|
493
|
+
t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
|
|
494
494
|
Y,
|
|
495
495
|
{
|
|
496
496
|
onClick: () => {
|
|
497
|
-
n(y.ON_TRANSACTION_DELETE_CLICK), r(!0),
|
|
497
|
+
n(y.ON_TRANSACTION_DELETE_CLICK), r(!0), l(!0);
|
|
498
498
|
},
|
|
499
499
|
children: [
|
|
500
|
-
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { variant: "rounded", children: /* @__PURE__ */ e(
|
|
500
|
+
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { variant: "rounded", children: /* @__PURE__ */ e(_e, { color: "secondary", fontSize: "small" }) }) }),
|
|
501
501
|
/* @__PURE__ */ e(
|
|
502
502
|
$,
|
|
503
503
|
{
|
|
@@ -505,38 +505,38 @@ const ht = E(({ transaction: t }) => {
|
|
|
505
505
|
secondary: a.manual_transaction_delete_subtitle
|
|
506
506
|
}
|
|
507
507
|
),
|
|
508
|
-
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(
|
|
508
|
+
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(_e, {}) })
|
|
509
509
|
]
|
|
510
510
|
}
|
|
511
511
|
) }),
|
|
512
512
|
/* @__PURE__ */ e(
|
|
513
|
-
|
|
513
|
+
X,
|
|
514
514
|
{
|
|
515
515
|
copy: { title: a.manual_transaction_delete_title },
|
|
516
516
|
isOpen: s,
|
|
517
517
|
onClose: () => {
|
|
518
|
-
r(!1),
|
|
518
|
+
r(!1), l(!1);
|
|
519
519
|
},
|
|
520
|
-
onPrimaryAction:
|
|
520
|
+
onPrimaryAction: m,
|
|
521
521
|
onSecondaryAction: () => n(y.ON_TRANSACTION_DELETE_CANCEL),
|
|
522
522
|
primaryText: o.delete_button,
|
|
523
523
|
secondaryText: o.cancel_button,
|
|
524
|
-
children: /* @__PURE__ */ e(
|
|
524
|
+
children: /* @__PURE__ */ e(x, { sx: { whiteSpace: "normal" }, variant: "subtitle1", children: a.manual_transaction_delete_description })
|
|
525
525
|
}
|
|
526
526
|
)
|
|
527
527
|
] });
|
|
528
|
-
},
|
|
529
|
-
const { onEvent: n } = w(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: a } = I(), s = U(), [
|
|
528
|
+
}, Ct = E(bt), xt = ({ transaction: t }) => {
|
|
529
|
+
const { onEvent: n } = w(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: a } = I(), s = U(), [l, m] = d.useState(!1), u = async () => {
|
|
530
530
|
await i({ ...t, merchant_guid: "" }), n(H.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
|
531
531
|
transaction_guid: t.guid
|
|
532
532
|
});
|
|
533
533
|
}, p = s.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
534
|
-
return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */
|
|
535
|
-
/* @__PURE__ */
|
|
534
|
+
return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ c(B, { className: "mx-txn-delete-logo", disableGutters: !0, disablePadding: !0, children: [
|
|
535
|
+
/* @__PURE__ */ c(
|
|
536
536
|
Y,
|
|
537
537
|
{
|
|
538
538
|
onClick: () => {
|
|
539
|
-
n(y.ON_TRANSACTION_DELETE_LOGO_CLICK),
|
|
539
|
+
n(y.ON_TRANSACTION_DELETE_LOGO_CLICK), m(!0);
|
|
540
540
|
},
|
|
541
541
|
children: [
|
|
542
542
|
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: p }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "delete", sx: { color: "text.primary" } }) }) }),
|
|
@@ -545,13 +545,13 @@ const ht = E(({ transaction: t }) => {
|
|
|
545
545
|
]
|
|
546
546
|
}
|
|
547
547
|
),
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
|
|
548
|
+
/* @__PURE__ */ c(
|
|
549
|
+
X,
|
|
550
550
|
{
|
|
551
551
|
copy: { title: a.merchant_logo_modal_title },
|
|
552
|
-
isOpen:
|
|
552
|
+
isOpen: l,
|
|
553
553
|
onClose: () => {
|
|
554
|
-
r(!1),
|
|
554
|
+
r(!1), m(!1);
|
|
555
555
|
},
|
|
556
556
|
onPrimaryAction: u,
|
|
557
557
|
onSecondaryAction: () => n(y.ON_TRANSACTION_DELETE_LOGO_CANCEL),
|
|
@@ -559,20 +559,20 @@ const ht = E(({ transaction: t }) => {
|
|
|
559
559
|
secondaryText: o.cancel_button,
|
|
560
560
|
title: a.merchant_logo_modal_title,
|
|
561
561
|
children: [
|
|
562
|
-
/* @__PURE__ */ e(
|
|
563
|
-
/* @__PURE__ */ e(
|
|
562
|
+
/* @__PURE__ */ e(x, { sx: { whiteSpace: "normal" }, variant: "subtitle1", children: a.merchant_logo_modal_desc }),
|
|
563
|
+
/* @__PURE__ */ e(x, { bold: !0, sx: { whiteSpace: "normal" }, variant: "subtitle1", children: ` ${a.merchant_logo_modal_desc_bold}` })
|
|
564
564
|
]
|
|
565
565
|
}
|
|
566
566
|
)
|
|
567
567
|
] }) });
|
|
568
|
-
},
|
|
569
|
-
const { onEvent: n } = w(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: a } = I(), s = U(), [
|
|
568
|
+
}, ft = E(xt), At = ({ transaction: t }) => {
|
|
569
|
+
const { onEvent: n } = w(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: o, transactions: a } = I(), s = U(), [l, m] = d.useState(!1), u = t.is_hidden, p = async () => {
|
|
570
570
|
await i({ ...t, is_hidden: !t.is_hidden }), n(
|
|
571
571
|
u ? y.ON_TRANSACTION_UNHIDDEN : y.ON_TRANSACTION_HIDDEN
|
|
572
572
|
);
|
|
573
|
-
},
|
|
574
|
-
return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */
|
|
575
|
-
/* @__PURE__ */
|
|
573
|
+
}, _ = s.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
574
|
+
return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ c(B, { className: "mx-txn-hide-transaction", disableGutters: !0, disablePadding: !0, children: [
|
|
575
|
+
/* @__PURE__ */ c(
|
|
576
576
|
Y,
|
|
577
577
|
{
|
|
578
578
|
"aria-checked": u,
|
|
@@ -585,11 +585,11 @@ const ht = E(({ transaction: t }) => {
|
|
|
585
585
|
{
|
|
586
586
|
transaction_guid: t.guid
|
|
587
587
|
}
|
|
588
|
-
),
|
|
588
|
+
), m(!0);
|
|
589
589
|
},
|
|
590
590
|
role: "switch",
|
|
591
591
|
children: [
|
|
592
|
-
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor:
|
|
592
|
+
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: _ }, variant: "rounded", children: u ? /* @__PURE__ */ e(D, { name: "visibility_off", sx: { color: "text.primary" } }) : /* @__PURE__ */ e(D, { name: "visibility", sx: { color: "text.primary" } }) }) }),
|
|
593
593
|
/* @__PURE__ */ e(
|
|
594
594
|
$,
|
|
595
595
|
{
|
|
@@ -599,7 +599,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
599
599
|
}
|
|
600
600
|
),
|
|
601
601
|
/* @__PURE__ */ e(z, { "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
602
|
-
|
|
602
|
+
lt,
|
|
603
603
|
{
|
|
604
604
|
checked: u,
|
|
605
605
|
inputProps: { tabIndex: -1 },
|
|
@@ -611,14 +611,14 @@ const ht = E(({ transaction: t }) => {
|
|
|
611
611
|
}
|
|
612
612
|
),
|
|
613
613
|
/* @__PURE__ */ e(
|
|
614
|
-
|
|
614
|
+
X,
|
|
615
615
|
{
|
|
616
616
|
copy: {
|
|
617
617
|
title: u ? a.hide_trnx_subtitle_unhide_trnx : a.hide_trnx_subtitle_hide_trnx
|
|
618
618
|
},
|
|
619
|
-
isOpen:
|
|
619
|
+
isOpen: l,
|
|
620
620
|
onClose: () => {
|
|
621
|
-
r(!1),
|
|
621
|
+
r(!1), m(!1);
|
|
622
622
|
},
|
|
623
623
|
onPrimaryAction: p,
|
|
624
624
|
onSecondaryAction: () => n(
|
|
@@ -626,13 +626,13 @@ const ht = E(({ transaction: t }) => {
|
|
|
626
626
|
),
|
|
627
627
|
primaryText: u ? o.unhide_button : o.hide_button,
|
|
628
628
|
secondaryText: o.cancel_button,
|
|
629
|
-
children: /* @__PURE__ */ e(
|
|
629
|
+
children: /* @__PURE__ */ e(x, { truncate: !1, variant: "subtitle1", children: u ? a.hide_trnx_desc_unhiding : a.hide_trnx_desc_hiding })
|
|
630
630
|
}
|
|
631
631
|
)
|
|
632
632
|
] }) });
|
|
633
|
-
},
|
|
633
|
+
}, St = E(At), Ge = ({ transaction: t }) => {
|
|
634
634
|
const { amount: n, description: i, isIncome: r, merchant_guid: o, payee: a, top_level_category_guid: s } = t;
|
|
635
|
-
return /* @__PURE__ */
|
|
635
|
+
return /* @__PURE__ */ c(v, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
|
|
636
636
|
/* @__PURE__ */ e(
|
|
637
637
|
Ne,
|
|
638
638
|
{
|
|
@@ -641,32 +641,32 @@ const ht = E(({ transaction: t }) => {
|
|
|
641
641
|
size: 64
|
|
642
642
|
}
|
|
643
643
|
),
|
|
644
|
-
/* @__PURE__ */
|
|
645
|
-
/* @__PURE__ */ e(
|
|
646
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ c(v, { overflow: "hidden'", children: [
|
|
645
|
+
/* @__PURE__ */ e(x, { bold: !0, mb: 4, truncate: !0, variant: "body1", children: i || a }),
|
|
646
|
+
/* @__PURE__ */ c(j, { color: r ? "success.main" : "text.primary", truncate: !0, variant: "h1", children: [
|
|
647
647
|
r ? "+" : "",
|
|
648
|
-
|
|
648
|
+
q(n, "0,0.00")
|
|
649
649
|
] })
|
|
650
650
|
] })
|
|
651
651
|
] });
|
|
652
652
|
}, Nt = ({ transaction: t }) => {
|
|
653
|
-
const { onEvent: n } = w(), { updateTransaction: i } = O(), { updateManualTransaction: r } = J(), { common: o, transactions: a } = I(), s = U(), [
|
|
653
|
+
const { onEvent: n } = w(), { updateTransaction: i } = O(), { updateManualTransaction: r } = J(), { common: o, transactions: a } = I(), s = U(), [l, m] = d.useState(!1), [u, p] = d.useState("");
|
|
654
654
|
d.useEffect(() => {
|
|
655
|
-
|
|
656
|
-
}, [
|
|
657
|
-
const
|
|
655
|
+
l && p(t.memo ? t.memo : "");
|
|
656
|
+
}, [l]);
|
|
657
|
+
const _ = async () => {
|
|
658
658
|
if (t.is_manual && !t.guid) {
|
|
659
|
-
r({ ...t, memo: u }),
|
|
659
|
+
r({ ...t, memo: u }), m(!1);
|
|
660
660
|
return;
|
|
661
661
|
}
|
|
662
|
-
await i({ ...t, memo: u }), n(H.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }),
|
|
662
|
+
await i({ ...t, memo: u }), n(H.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), m(!1);
|
|
663
663
|
}, g = s.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
664
|
-
return /* @__PURE__ */
|
|
665
|
-
/* @__PURE__ */
|
|
664
|
+
return /* @__PURE__ */ c(B, { className: "mx-txn-memo-action", disableGutters: !0, disablePadding: !0, children: [
|
|
665
|
+
/* @__PURE__ */ c(
|
|
666
666
|
Y,
|
|
667
667
|
{
|
|
668
668
|
onClick: () => {
|
|
669
|
-
n(y.ON_TRANSACTION_MEMO_CLICK),
|
|
669
|
+
n(y.ON_TRANSACTION_MEMO_CLICK), m(!0);
|
|
670
670
|
},
|
|
671
671
|
children: [
|
|
672
672
|
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: g }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "article", sx: { color: "text.primary" } }) }) }),
|
|
@@ -674,13 +674,13 @@ const ht = E(({ transaction: t }) => {
|
|
|
674
674
|
$,
|
|
675
675
|
{
|
|
676
676
|
primary: a.memo_title,
|
|
677
|
-
primaryTypographyProps: { variant: "
|
|
677
|
+
primaryTypographyProps: { variant: "caption" },
|
|
678
678
|
secondary: /* @__PURE__ */ e(
|
|
679
|
-
|
|
679
|
+
x,
|
|
680
680
|
{
|
|
681
681
|
bold: !0,
|
|
682
682
|
sx: { overflowWrap: "break-word", whiteSpace: "wrap", color: "text.primary" },
|
|
683
|
-
variant: "
|
|
683
|
+
variant: "body1",
|
|
684
684
|
children: t.memo ? t.memo : a.memo_desc
|
|
685
685
|
}
|
|
686
686
|
)
|
|
@@ -690,13 +690,13 @@ const ht = E(({ transaction: t }) => {
|
|
|
690
690
|
]
|
|
691
691
|
}
|
|
692
692
|
),
|
|
693
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ c(
|
|
694
694
|
ie,
|
|
695
695
|
{
|
|
696
696
|
ariaLabelClose: o.close_aria,
|
|
697
|
-
isOpen:
|
|
698
|
-
onClose: () =>
|
|
699
|
-
onPrimaryAction:
|
|
697
|
+
isOpen: l,
|
|
698
|
+
onClose: () => m(!1),
|
|
699
|
+
onPrimaryAction: _,
|
|
700
700
|
title: a.memo_title,
|
|
701
701
|
children: [
|
|
702
702
|
/* @__PURE__ */ e(Ge, { transaction: t }),
|
|
@@ -725,12 +725,12 @@ const ht = E(({ transaction: t }) => {
|
|
|
725
725
|
onUpdateAmount: r,
|
|
726
726
|
split: o
|
|
727
727
|
}) => {
|
|
728
|
-
const { onEvent: a } = w(), { transactions: s } = I(), [
|
|
729
|
-
isNaN(Number(h)) || (
|
|
728
|
+
const { onEvent: a } = w(), { transactions: s } = I(), [l, m] = d.useState(`${o.amount}`), [u, p] = d.useState(!1), _ = t === 0, g = (h) => {
|
|
729
|
+
isNaN(Number(h)) || (m(h), r(t, Number(h)));
|
|
730
730
|
};
|
|
731
|
-
return /* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
/* @__PURE__ */ e(
|
|
731
|
+
return /* @__PURE__ */ c(F, { bgcolor: "background.paper", className: "mx-txn-split-manager-row", pb: 4, px: 8, children: [
|
|
732
|
+
/* @__PURE__ */ c(fe, { alignItems: _ ? "center" : "start", container: !0, children: [
|
|
733
|
+
/* @__PURE__ */ e(fe, { item: !0, xs: 7, children: /* @__PURE__ */ c(v, { alignItems: "start", children: [
|
|
734
734
|
/* @__PURE__ */ e(
|
|
735
735
|
oe,
|
|
736
736
|
{
|
|
@@ -741,17 +741,17 @@ const ht = E(({ transaction: t }) => {
|
|
|
741
741
|
children: o.category
|
|
742
742
|
}
|
|
743
743
|
),
|
|
744
|
-
/* @__PURE__ */ e(F, { children: !o.category_guid && /* @__PURE__ */
|
|
745
|
-
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(
|
|
746
|
-
/* @__PURE__ */ e(
|
|
744
|
+
/* @__PURE__ */ e(F, { children: !o.category_guid && /* @__PURE__ */ c(v, { color: "error.main", direction: "row", gap: 8, p: 12, children: [
|
|
745
|
+
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(me, { sx: { fontSize: 15 } }) }),
|
|
746
|
+
/* @__PURE__ */ e(x, { variant: "body2", children: s.split_transaction_errors_select_category })
|
|
747
747
|
] }) })
|
|
748
748
|
] }) }),
|
|
749
|
-
/* @__PURE__ */ e(
|
|
750
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ e(fe, { item: !0, xs: 5, children: _ ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(x, { children: q(o.amount, "0,0.00") }) }) : /* @__PURE__ */ c(v, { alignItems: "start", children: [
|
|
750
|
+
/* @__PURE__ */ c(v, { alignItems: "start", direction: "row", gap: 8, children: [
|
|
751
751
|
/* @__PURE__ */ e(
|
|
752
|
-
|
|
752
|
+
ct,
|
|
753
753
|
{
|
|
754
|
-
amount:
|
|
754
|
+
amount: l,
|
|
755
755
|
ariaLabel: s.split_transaction_edit_split_amount,
|
|
756
756
|
label: s.split_transaction_edit_split_amount,
|
|
757
757
|
minAmount: 0.01,
|
|
@@ -772,13 +772,13 @@ const ht = E(({ transaction: t }) => {
|
|
|
772
772
|
a(y.ON_TRANSACTION_SPLIT_DELETE_CLICK), n(t);
|
|
773
773
|
},
|
|
774
774
|
sx: { w: 44, h: 44 },
|
|
775
|
-
children: /* @__PURE__ */ e(
|
|
775
|
+
children: /* @__PURE__ */ e(_e, {})
|
|
776
776
|
}
|
|
777
777
|
)
|
|
778
778
|
] }),
|
|
779
|
-
!
|
|
780
|
-
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(
|
|
781
|
-
/* @__PURE__ */ e(
|
|
779
|
+
!l && /* @__PURE__ */ c(v, { color: "error.main", direction: "row", gap: 8, py: 12, children: [
|
|
780
|
+
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(me, { sx: { fontSize: 15 } }) }),
|
|
781
|
+
/* @__PURE__ */ e(x, { variant: "body2", children: s.split_transaction_errors_enter_an_amount })
|
|
782
782
|
] })
|
|
783
783
|
] }) })
|
|
784
784
|
] }),
|
|
@@ -803,20 +803,20 @@ const ht = E(({ transaction: t }) => {
|
|
|
803
803
|
splits: o,
|
|
804
804
|
transaction: a
|
|
805
805
|
}) => {
|
|
806
|
-
const { transactions: s } = I(), { onEvent:
|
|
806
|
+
const { transactions: s } = I(), { onEvent: l } = w(), [m, u] = d.useState(""), { announce: p, ariaLive: _ } = pe();
|
|
807
807
|
return d.useEffect(() => {
|
|
808
808
|
if (o.length <= 1)
|
|
809
809
|
u(s.split_transaction_errors_min_splits), p(s.split_transaction_errors_min_splits);
|
|
810
810
|
else if (o[0].amount < 0) {
|
|
811
811
|
const g = N(
|
|
812
812
|
s.split_transaction_errors_totals_must_equal_amount,
|
|
813
|
-
|
|
813
|
+
q(a.amount, "0,0.00")
|
|
814
814
|
);
|
|
815
815
|
u(g), p(g);
|
|
816
816
|
} else
|
|
817
817
|
u(""), p("");
|
|
818
|
-
}, [o]), /* @__PURE__ */
|
|
819
|
-
|
|
818
|
+
}, [o]), /* @__PURE__ */ c(F, { className: "mx-txn-split-manager", children: [
|
|
819
|
+
_,
|
|
820
820
|
o.map((g, h) => /* @__PURE__ */ e(
|
|
821
821
|
Et,
|
|
822
822
|
{
|
|
@@ -828,23 +828,23 @@ const ht = E(({ transaction: t }) => {
|
|
|
828
828
|
},
|
|
829
829
|
h
|
|
830
830
|
)),
|
|
831
|
-
|
|
832
|
-
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(
|
|
833
|
-
/* @__PURE__ */ e(
|
|
831
|
+
m && /* @__PURE__ */ c(v, { bgcolor: "background.paper", color: "error.main", direction: "row", gap: 8, p: 16, children: [
|
|
832
|
+
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(me, { sx: { fontSize: 15 } }) }),
|
|
833
|
+
/* @__PURE__ */ e(x, { variant: "body2", children: m })
|
|
834
834
|
] }),
|
|
835
835
|
/* @__PURE__ */ e(F, { p: 16, children: /* @__PURE__ */ e(
|
|
836
836
|
oe,
|
|
837
837
|
{
|
|
838
838
|
"aria-label": s.split_transaction_add_split_btn,
|
|
839
839
|
onClick: () => {
|
|
840
|
-
|
|
840
|
+
l(y.ON_TRANSACTION_SPLIT_ADD_CLICK), t();
|
|
841
841
|
},
|
|
842
842
|
children: s.split_transaction_add_split_btn
|
|
843
843
|
}
|
|
844
844
|
) })
|
|
845
845
|
] });
|
|
846
846
|
}, Ot = E(Dt), Lt = ({ transaction: t }) => {
|
|
847
|
-
const { onEvent: n } = w(), { announce: i, ariaLive: r } = pe(), { splitTransaction: o, unSplitTransaction: a } = O(), { common: s, transactions:
|
|
847
|
+
const { onEvent: n } = w(), { announce: i, ariaLive: r } = pe(), { splitTransaction: o, unSplitTransaction: a } = O(), { common: s, transactions: l } = I(), { setShouldDisableDrawerScroll: m } = J(), { categories: u } = we(), p = U(), _ = {
|
|
848
848
|
...t,
|
|
849
849
|
amount: t.amount - 1,
|
|
850
850
|
guid: "",
|
|
@@ -854,44 +854,44 @@ const ht = E(({ transaction: t }) => {
|
|
|
854
854
|
...t,
|
|
855
855
|
amount: 1,
|
|
856
856
|
category_guid: void 0,
|
|
857
|
-
category:
|
|
857
|
+
category: l.split_transaction_select_category_btn,
|
|
858
858
|
guid: "",
|
|
859
859
|
has_been_split: !1,
|
|
860
860
|
parent_guid: t.guid,
|
|
861
861
|
top_level_category_guid: void 0
|
|
862
|
-
}, [h,
|
|
863
|
-
const
|
|
864
|
-
|
|
862
|
+
}, [h, A] = d.useState(!1), [L, k] = d.useState(!1), [f, T] = d.useState([]), R = () => {
|
|
863
|
+
const C = [...f];
|
|
864
|
+
C.push({ ...g }), C[0].amount -= 1, T(C), i(
|
|
865
865
|
N(
|
|
866
|
-
|
|
867
|
-
|
|
866
|
+
l.split_transaction_add_split_announcement,
|
|
867
|
+
C.length
|
|
868
868
|
)
|
|
869
869
|
);
|
|
870
|
-
},
|
|
871
|
-
if (
|
|
872
|
-
const P =
|
|
873
|
-
|
|
874
|
-
N(
|
|
870
|
+
}, b = (C) => {
|
|
871
|
+
if (C > 0) {
|
|
872
|
+
const P = f[C], S = [...f];
|
|
873
|
+
S.splice(C, 1), S[0].amount += P.amount, T(S), i(
|
|
874
|
+
N(l.split_transaction_delete_split_announcement, C + 1)
|
|
875
875
|
);
|
|
876
876
|
}
|
|
877
|
-
}, Q = (
|
|
878
|
-
const
|
|
879
|
-
|
|
877
|
+
}, Q = (C, P) => {
|
|
878
|
+
const S = [...f];
|
|
879
|
+
S[C].amount = P, S[0].amount = t.amount - S.reduce(
|
|
880
880
|
(M, G, Te) => M + (Te !== 0 ? G.amount : 0),
|
|
881
881
|
0
|
|
882
|
-
), T(
|
|
883
|
-
}, ge = (
|
|
884
|
-
const
|
|
885
|
-
M && (
|
|
886
|
-
...
|
|
882
|
+
), T(S);
|
|
883
|
+
}, ge = (C, P) => {
|
|
884
|
+
const S = [...f], M = u.find((G) => G.guid === P);
|
|
885
|
+
M && (S[C] = {
|
|
886
|
+
...S[C],
|
|
887
887
|
category_guid: P,
|
|
888
888
|
category: M.name,
|
|
889
889
|
top_level_category_guid: M.parent_guid || P
|
|
890
|
-
}, T(
|
|
890
|
+
}, T(S), i(
|
|
891
891
|
N(
|
|
892
|
-
|
|
892
|
+
l.split_transaction_select_category_announcement,
|
|
893
893
|
M.name,
|
|
894
|
-
|
|
894
|
+
C + 1
|
|
895
895
|
)
|
|
896
896
|
));
|
|
897
897
|
}, he = () => {
|
|
@@ -899,36 +899,36 @@ const ht = E(({ transaction: t }) => {
|
|
|
899
899
|
k(!0);
|
|
900
900
|
return;
|
|
901
901
|
}
|
|
902
|
-
T([{ ...
|
|
902
|
+
T([{ ..._ }, { ...g }]), n(H.TRANSACTION_DETAILS_CLICK_SPLIT, {
|
|
903
903
|
transaction_guid: t.guid
|
|
904
|
-
}),
|
|
904
|
+
}), A(!0);
|
|
905
905
|
}, Z = async () => {
|
|
906
|
-
n(y.ON_TRANSACTION_SPLIT_SAVE_CLICK), await o({ ...t, has_been_split: !0 },
|
|
906
|
+
n(y.ON_TRANSACTION_SPLIT_SAVE_CLICK), await o({ ...t, has_been_split: !0 }, f), A(!1);
|
|
907
907
|
}, ee = async () => {
|
|
908
|
-
n(y.ON_TRANSACTION_SPLIT_CANCEL_CLICK), T([{ ...
|
|
908
|
+
n(y.ON_TRANSACTION_SPLIT_CANCEL_CLICK), T([{ ..._ }, { ...g }]), A(!1);
|
|
909
909
|
}, K = async () => {
|
|
910
910
|
n(H.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
|
|
911
911
|
transaction_guid: t.guid
|
|
912
912
|
});
|
|
913
|
-
const
|
|
914
|
-
await a(
|
|
913
|
+
const C = t.parent_guid ?? t.guid;
|
|
914
|
+
await a(C);
|
|
915
915
|
}, te = d.useMemo(() => {
|
|
916
|
-
const
|
|
917
|
-
return
|
|
918
|
-
}, [
|
|
919
|
-
return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */
|
|
920
|
-
/* @__PURE__ */
|
|
916
|
+
const C = f.some((S) => !S.category_guid), P = f.some((S) => S.amount <= 0);
|
|
917
|
+
return C || P;
|
|
918
|
+
}, [f]), ye = p.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
919
|
+
return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ c(B, { disableGutters: !0, disablePadding: !0, children: [
|
|
920
|
+
/* @__PURE__ */ c(Y, { onClick: he, children: [
|
|
921
921
|
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: ye }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "call_split", sx: { color: "text.primary" } }) }) }),
|
|
922
922
|
/* @__PURE__ */ e(
|
|
923
923
|
$,
|
|
924
924
|
{
|
|
925
|
-
primary: t.has_been_split || t.parent_guid ?
|
|
926
|
-
secondary: t.has_been_split || t.parent_guid ?
|
|
925
|
+
primary: t.has_been_split || t.parent_guid ? l.split_transaction_unsplit_title : l.split_transaction_title,
|
|
926
|
+
secondary: t.has_been_split || t.parent_guid ? l.split_transaction_unsplit_subtitle : l.split_transaction_desc
|
|
927
927
|
}
|
|
928
928
|
),
|
|
929
929
|
/* @__PURE__ */ e(z, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(D, { name: "delete" }) : /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
930
930
|
] }),
|
|
931
|
-
/* @__PURE__ */
|
|
931
|
+
/* @__PURE__ */ c(
|
|
932
932
|
ie,
|
|
933
933
|
{
|
|
934
934
|
ariaLabelClose: s.close_aria,
|
|
@@ -938,7 +938,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
938
938
|
onPrimaryAction: Z,
|
|
939
939
|
primaryText: s.save_button,
|
|
940
940
|
secondaryText: s.cancel_button,
|
|
941
|
-
title:
|
|
941
|
+
title: l.split_transaction_title,
|
|
942
942
|
children: [
|
|
943
943
|
r,
|
|
944
944
|
/* @__PURE__ */ e(Ge, { transaction: t }),
|
|
@@ -947,9 +947,9 @@ const ht = E(({ transaction: t }) => {
|
|
|
947
947
|
{
|
|
948
948
|
onAddSplit: R,
|
|
949
949
|
onCategoryChanged: ge,
|
|
950
|
-
onDeleteSplit:
|
|
950
|
+
onDeleteSplit: b,
|
|
951
951
|
onUpdateAmount: Q,
|
|
952
|
-
splits:
|
|
952
|
+
splits: f,
|
|
953
953
|
transaction: t
|
|
954
954
|
}
|
|
955
955
|
)
|
|
@@ -957,12 +957,12 @@ const ht = E(({ transaction: t }) => {
|
|
|
957
957
|
}
|
|
958
958
|
),
|
|
959
959
|
/* @__PURE__ */ e(
|
|
960
|
-
|
|
960
|
+
X,
|
|
961
961
|
{
|
|
962
|
-
copy: { title:
|
|
962
|
+
copy: { title: l.split_transaction_unsplit_title },
|
|
963
963
|
isOpen: L,
|
|
964
964
|
onClose: () => {
|
|
965
|
-
|
|
965
|
+
m(!1), k(!1);
|
|
966
966
|
},
|
|
967
967
|
onPrimaryAction: K,
|
|
968
968
|
onSecondaryAction: () => {
|
|
@@ -970,29 +970,29 @@ const ht = E(({ transaction: t }) => {
|
|
|
970
970
|
},
|
|
971
971
|
primaryText: s.delete_button,
|
|
972
972
|
secondaryText: s.cancel_button,
|
|
973
|
-
children: /* @__PURE__ */ e(
|
|
974
|
-
|
|
973
|
+
children: /* @__PURE__ */ e(j, { variant: "subtitle1", children: N(
|
|
974
|
+
l.split_transaction_unsplit_description,
|
|
975
975
|
t.description
|
|
976
976
|
) })
|
|
977
977
|
}
|
|
978
978
|
)
|
|
979
979
|
] }) });
|
|
980
980
|
}, wt = E(Lt), Rt = () => {
|
|
981
|
-
const t = at(), { onEvent: n } = w(), { addTag: i } = O(), { transactions: r } = I(), [o, a] = d.useState(!1), [s,
|
|
981
|
+
const t = at(), { onEvent: n } = w(), { addTag: i } = O(), { transactions: r } = I(), [o, a] = d.useState(!1), [s, l] = d.useState(""), [m, u] = d.useState(""), p = d.useRef(null);
|
|
982
982
|
d.useEffect(() => {
|
|
983
983
|
o && p?.current?.focus();
|
|
984
984
|
}, [o]);
|
|
985
|
-
const
|
|
985
|
+
const _ = () => {
|
|
986
986
|
n(
|
|
987
987
|
o ? y.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK : y.ON_TRANSACTION_TAGS_TAG_ADD_CLICK
|
|
988
|
-
), o ||
|
|
988
|
+
), o || l(""), a(!o);
|
|
989
989
|
}, g = async () => {
|
|
990
990
|
n(y.ON_TRANSACTION_TAGS_TAG_ADDED), await i(s), a(!1);
|
|
991
991
|
};
|
|
992
992
|
return d.useEffect(() => {
|
|
993
993
|
u(s.length > 40 ? r.tags_error_name_must_be_40_chars : "");
|
|
994
|
-
}, [s]), /* @__PURE__ */
|
|
995
|
-
/* @__PURE__ */
|
|
994
|
+
}, [s]), /* @__PURE__ */ c(F, { className: "mx-txn-tag-manager-header", children: [
|
|
995
|
+
/* @__PURE__ */ c(
|
|
996
996
|
v,
|
|
997
997
|
{
|
|
998
998
|
alignItems: "center",
|
|
@@ -1002,21 +1002,21 @@ const ht = E(({ transaction: t }) => {
|
|
|
1002
1002
|
px: 24,
|
|
1003
1003
|
py: 16,
|
|
1004
1004
|
children: [
|
|
1005
|
-
/* @__PURE__ */ e(
|
|
1005
|
+
/* @__PURE__ */ e(x, { bold: !0, children: r.tags_your_tags }),
|
|
1006
1006
|
/* @__PURE__ */ e(
|
|
1007
1007
|
oe,
|
|
1008
1008
|
{
|
|
1009
1009
|
"aria-expanded": o,
|
|
1010
1010
|
"aria-label": r.tags_add_tag_btn_aria,
|
|
1011
|
-
onClick:
|
|
1011
|
+
onClick: _,
|
|
1012
1012
|
children: r.tags_add_tag_btn
|
|
1013
1013
|
}
|
|
1014
1014
|
)
|
|
1015
1015
|
]
|
|
1016
1016
|
}
|
|
1017
1017
|
),
|
|
1018
|
-
/* @__PURE__ */
|
|
1019
|
-
|
|
1018
|
+
/* @__PURE__ */ c(
|
|
1019
|
+
X,
|
|
1020
1020
|
{
|
|
1021
1021
|
copy: { title: r.tags_add_tag_btn },
|
|
1022
1022
|
isOpen: o,
|
|
@@ -1029,13 +1029,13 @@ const ht = E(({ transaction: t }) => {
|
|
|
1029
1029
|
{
|
|
1030
1030
|
"aria-label": r.tags_placeholder,
|
|
1031
1031
|
name: "add-tag",
|
|
1032
|
-
onChange: (h) =>
|
|
1032
|
+
onChange: (h) => l(h.target.value),
|
|
1033
1033
|
placeholder: r.tags_placeholder,
|
|
1034
1034
|
sx: { width: "100%" },
|
|
1035
1035
|
value: s
|
|
1036
1036
|
}
|
|
1037
1037
|
),
|
|
1038
|
-
/* @__PURE__ */ e(
|
|
1038
|
+
/* @__PURE__ */ e(j, { id: "add-tag-error", sx: { color: "error.main" }, variant: "subtitle2", children: m })
|
|
1039
1039
|
]
|
|
1040
1040
|
}
|
|
1041
1041
|
)
|
|
@@ -1046,7 +1046,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1046
1046
|
{
|
|
1047
1047
|
"aria-label": r.tags_cancel_search || "Search",
|
|
1048
1048
|
onClick: () => t(""),
|
|
1049
|
-
children: /* @__PURE__ */ e(
|
|
1049
|
+
children: /* @__PURE__ */ e(me, {})
|
|
1050
1050
|
}
|
|
1051
1051
|
);
|
|
1052
1052
|
return /* @__PURE__ */ e(F, { className: "mx-txn-tag-manager-search", px: 24, py: 16, children: /* @__PURE__ */ e(
|
|
@@ -1065,26 +1065,26 @@ const ht = E(({ transaction: t }) => {
|
|
|
1065
1065
|
}
|
|
1066
1066
|
) });
|
|
1067
1067
|
}, Pt = E(kt), Gt = ({ onTagChecked: t, selectedTags: n, tag: i }) => {
|
|
1068
|
-
const { onEvent: r } = w(), { removeTag: o, updateTag: a } = O(), { common: s, transactions:
|
|
1068
|
+
const { onEvent: r } = w(), { removeTag: o, updateTag: a } = O(), { common: s, transactions: l } = I(), [m, u] = d.useState(!1), [p, _] = d.useState(!1), [g, h] = d.useState(""), [A, L] = d.useState(""), k = async () => {
|
|
1069
1069
|
r(y.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await a({ ...i, name: g }), u(!1);
|
|
1070
|
-
},
|
|
1071
|
-
r(y.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid),
|
|
1070
|
+
}, f = async () => {
|
|
1071
|
+
r(y.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid), _(!1);
|
|
1072
1072
|
};
|
|
1073
1073
|
d.useEffect(() => {
|
|
1074
|
-
L(g.length > 40 ?
|
|
1074
|
+
L(g.length > 40 ? l.tags_error_name_must_be_40_chars : "");
|
|
1075
1075
|
}, [g]);
|
|
1076
1076
|
const T = () => {
|
|
1077
1077
|
r(y.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), h(i.name), u(!0);
|
|
1078
1078
|
}, R = () => {
|
|
1079
|
-
r(y.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK),
|
|
1079
|
+
r(y.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), _(!0);
|
|
1080
1080
|
};
|
|
1081
|
-
return /* @__PURE__ */
|
|
1081
|
+
return /* @__PURE__ */ c(
|
|
1082
1082
|
B,
|
|
1083
1083
|
{
|
|
1084
1084
|
className: "mx-txn-transaction-manager-row",
|
|
1085
1085
|
disableGutters: !0,
|
|
1086
1086
|
disablePadding: !0,
|
|
1087
|
-
secondaryAction: !i.is_default_tag && /* @__PURE__ */
|
|
1087
|
+
secondaryAction: !i.is_default_tag && /* @__PURE__ */ c(v, { direction: "row", children: [
|
|
1088
1088
|
/* @__PURE__ */ e(
|
|
1089
1089
|
ne,
|
|
1090
1090
|
{
|
|
@@ -1100,12 +1100,12 @@ const ht = E(({ transaction: t }) => {
|
|
|
1100
1100
|
"aria-label": `Delete ${i.name} tag`,
|
|
1101
1101
|
color: "secondary",
|
|
1102
1102
|
onClick: R,
|
|
1103
|
-
children: /* @__PURE__ */ e(
|
|
1103
|
+
children: /* @__PURE__ */ e(_e, { color: "secondary" })
|
|
1104
1104
|
}
|
|
1105
1105
|
)
|
|
1106
1106
|
] }),
|
|
1107
1107
|
children: [
|
|
1108
|
-
/* @__PURE__ */
|
|
1108
|
+
/* @__PURE__ */ c(
|
|
1109
1109
|
Y,
|
|
1110
1110
|
{
|
|
1111
1111
|
"aria-checked": n.includes(i.guid),
|
|
@@ -1125,11 +1125,11 @@ const ht = E(({ transaction: t }) => {
|
|
|
1125
1125
|
]
|
|
1126
1126
|
}
|
|
1127
1127
|
),
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
|
|
1128
|
+
/* @__PURE__ */ c(
|
|
1129
|
+
X,
|
|
1130
1130
|
{
|
|
1131
1131
|
copy: { title: "Update tag name" },
|
|
1132
|
-
isOpen:
|
|
1132
|
+
isOpen: m,
|
|
1133
1133
|
onClose: () => u(!1),
|
|
1134
1134
|
onPrimaryAction: k,
|
|
1135
1135
|
onSecondaryAction: () => u(!1),
|
|
@@ -1137,30 +1137,30 @@ const ht = E(({ transaction: t }) => {
|
|
|
1137
1137
|
/* @__PURE__ */ e(
|
|
1138
1138
|
ve,
|
|
1139
1139
|
{
|
|
1140
|
-
"aria-describedby":
|
|
1141
|
-
"aria-label":
|
|
1140
|
+
"aria-describedby": A ? "update-tag-error" : void 0,
|
|
1141
|
+
"aria-label": l.tags_update_the_tag_name,
|
|
1142
1142
|
name: "update-tag",
|
|
1143
|
-
onChange: (
|
|
1143
|
+
onChange: (b) => h(b.target.value),
|
|
1144
1144
|
placeholder: "Tag name",
|
|
1145
1145
|
sx: { width: "100%" },
|
|
1146
1146
|
value: g
|
|
1147
1147
|
}
|
|
1148
1148
|
),
|
|
1149
|
-
/* @__PURE__ */ e(
|
|
1149
|
+
/* @__PURE__ */ e(j, { id: "update-tag-error", sx: { color: "error.main" }, variant: "subtitle2", children: A })
|
|
1150
1150
|
]
|
|
1151
1151
|
}
|
|
1152
1152
|
),
|
|
1153
1153
|
/* @__PURE__ */ e(
|
|
1154
|
-
|
|
1154
|
+
X,
|
|
1155
1155
|
{
|
|
1156
|
-
copy: { title:
|
|
1156
|
+
copy: { title: l.tags_delete_title },
|
|
1157
1157
|
isOpen: p,
|
|
1158
|
-
onClose: () =>
|
|
1159
|
-
onPrimaryAction:
|
|
1158
|
+
onClose: () => _(!1),
|
|
1159
|
+
onPrimaryAction: f,
|
|
1160
1160
|
onSecondaryAction: () => r(y.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
|
|
1161
1161
|
primaryText: s.delete_button,
|
|
1162
1162
|
secondaryText: s.cancel_button,
|
|
1163
|
-
children: /* @__PURE__ */ e(
|
|
1163
|
+
children: /* @__PURE__ */ e(x, { truncate: !1, children: l.tags_deleting_this_tag_will_remove_it })
|
|
1164
1164
|
}
|
|
1165
1165
|
)
|
|
1166
1166
|
]
|
|
@@ -1170,7 +1170,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1170
1170
|
const { tags: i } = O(), [r, o] = d.useState(""), a = i.filter(
|
|
1171
1171
|
(s) => s.name.toLowerCase().includes(r.toLowerCase())
|
|
1172
1172
|
);
|
|
1173
|
-
return /* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ c("div", { className: "mx-txn-tag-manager", children: [
|
|
1174
1174
|
/* @__PURE__ */ e(
|
|
1175
1175
|
Pt,
|
|
1176
1176
|
{
|
|
@@ -1179,33 +1179,33 @@ const ht = E(({ transaction: t }) => {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
),
|
|
1181
1181
|
/* @__PURE__ */ e(Mt, {}),
|
|
1182
|
-
/* @__PURE__ */ e(
|
|
1182
|
+
/* @__PURE__ */ e(ce, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(ue, { children: a.map((s) => /* @__PURE__ */ c(d.Fragment, { children: [
|
|
1183
1183
|
/* @__PURE__ */ e(Bt, { onTagChecked: n, selectedTags: t, tag: s }),
|
|
1184
1184
|
/* @__PURE__ */ e(de, { sx: { ml: 24 } })
|
|
1185
1185
|
] }, s.guid)) }) })
|
|
1186
1186
|
] });
|
|
1187
1187
|
}, Kt = E($t), Ft = ({ transaction: t }) => {
|
|
1188
|
-
const { onEvent: n } = w(), { tags: i, updateTaggings: r, updateTransaction: o } = O(), { common: a, transactions: s } = I(), { updateManualTransaction:
|
|
1188
|
+
const { onEvent: n } = w(), { tags: i, updateTaggings: r, updateTransaction: o } = O(), { common: a, transactions: s } = I(), { updateManualTransaction: l } = J(), m = U(), [u, p] = d.useState(!1), [_, g] = d.useState(t.tags);
|
|
1189
1189
|
d.useEffect(() => {
|
|
1190
1190
|
g(t.tags);
|
|
1191
1191
|
}, [u, t]);
|
|
1192
|
-
const h = (
|
|
1193
|
-
const T = [...
|
|
1194
|
-
R >= 0 ? T.splice(R, 1) : T.push(
|
|
1195
|
-
},
|
|
1192
|
+
const h = (f) => {
|
|
1193
|
+
const T = [..._], R = _.indexOf(f);
|
|
1194
|
+
R >= 0 ? T.splice(R, 1) : T.push(f), g(T);
|
|
1195
|
+
}, A = async () => {
|
|
1196
1196
|
if (t.is_manual && !t.guid) {
|
|
1197
|
-
|
|
1197
|
+
l({ ...t, tags: _ }), p(!1);
|
|
1198
1198
|
return;
|
|
1199
1199
|
}
|
|
1200
|
-
await r(
|
|
1200
|
+
await r(_, t.guid), await o({ ...t, tags: _ }), n(H.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), p(!1);
|
|
1201
1201
|
}, L = d.useMemo(
|
|
1202
1202
|
() => t.tags.map(
|
|
1203
|
-
(
|
|
1203
|
+
(f, T, R) => `${i.find((b) => b.guid === f)?.name}${T < R.length - 1 ? " / " : ""}`
|
|
1204
1204
|
),
|
|
1205
1205
|
[i, t]
|
|
1206
|
-
), k =
|
|
1207
|
-
return /* @__PURE__ */
|
|
1208
|
-
/* @__PURE__ */
|
|
1206
|
+
), k = m.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
1207
|
+
return /* @__PURE__ */ c(B, { disableGutters: !0, disablePadding: !0, children: [
|
|
1208
|
+
/* @__PURE__ */ c(
|
|
1209
1209
|
Y,
|
|
1210
1210
|
{
|
|
1211
1211
|
onClick: () => {
|
|
@@ -1217,8 +1217,8 @@ const ht = E(({ transaction: t }) => {
|
|
|
1217
1217
|
$,
|
|
1218
1218
|
{
|
|
1219
1219
|
primary: s.tags_title,
|
|
1220
|
-
primaryTypographyProps: { variant: "
|
|
1221
|
-
secondary: /* @__PURE__ */ e(
|
|
1220
|
+
primaryTypographyProps: { variant: "caption" },
|
|
1221
|
+
secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: t.tags?.length > 0 ? L : s.tags_desc })
|
|
1222
1222
|
}
|
|
1223
1223
|
),
|
|
1224
1224
|
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
@@ -1231,29 +1231,29 @@ const ht = E(({ transaction: t }) => {
|
|
|
1231
1231
|
ariaLabelClose: a.close_aria,
|
|
1232
1232
|
isOpen: u,
|
|
1233
1233
|
onClose: () => p(!1),
|
|
1234
|
-
onPrimaryAction:
|
|
1234
|
+
onPrimaryAction: A,
|
|
1235
1235
|
primaryText: a.save_button,
|
|
1236
1236
|
secondaryText: a.cancel_button,
|
|
1237
1237
|
title: s.tags_title,
|
|
1238
|
-
children: /* @__PURE__ */ e(Kt, { onTagChecked: h, selectedTags:
|
|
1238
|
+
children: /* @__PURE__ */ e(Kt, { onTagChecked: h, selectedTags: _ })
|
|
1239
1239
|
}
|
|
1240
1240
|
)
|
|
1241
1241
|
] });
|
|
1242
1242
|
}, Ht = E(Ft), Ut = ({ transaction: t, viewOnly: n = !1 }) => {
|
|
1243
|
-
const { updateTransaction: i } = O(), { common: r, transactions: o } = I(), { onEvent: a } = w(), { announce: s, ariaLive:
|
|
1243
|
+
const { updateTransaction: i } = O(), { common: r, transactions: o } = I(), { onEvent: a } = w(), { announce: s, ariaLive: l } = pe(), [m, u] = d.useState(!1), [p, _] = d.useState(""), g = d.useRef(null);
|
|
1244
1244
|
d.useEffect(() => {
|
|
1245
|
-
|
|
1246
|
-
}, [
|
|
1245
|
+
m && (_(t.description), g?.current?.focus());
|
|
1246
|
+
}, [m]);
|
|
1247
1247
|
const h = () => {
|
|
1248
1248
|
u(!0), a(y.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK), setTimeout(() => document.getElementById("transaction-description-input")?.focus(), 0);
|
|
1249
|
-
},
|
|
1249
|
+
}, A = async () => {
|
|
1250
1250
|
a(H.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
|
|
1251
1251
|
transaction_guid: t.guid
|
|
1252
1252
|
}), await i({ ...t, description: p }), u(!1), s(`${o.payee_title}: ${p}`), setTimeout(() => document.getElementById("transaction-description-edit-button")?.focus(), 0);
|
|
1253
1253
|
};
|
|
1254
|
-
return /* @__PURE__ */
|
|
1255
|
-
|
|
1256
|
-
|
|
1254
|
+
return /* @__PURE__ */ c(F, { className: "mx-txn-transaction-description", children: [
|
|
1255
|
+
l,
|
|
1256
|
+
m ? /* @__PURE__ */ c(We, { row: !0, children: [
|
|
1257
1257
|
/* @__PURE__ */ e(
|
|
1258
1258
|
Le,
|
|
1259
1259
|
{
|
|
@@ -1262,7 +1262,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1262
1262
|
inputProps: { maxLength: 140 },
|
|
1263
1263
|
label: o.payee_title,
|
|
1264
1264
|
name: o.payee_title,
|
|
1265
|
-
onChange: (L) =>
|
|
1265
|
+
onChange: (L) => _(L.target.value),
|
|
1266
1266
|
ref: g,
|
|
1267
1267
|
sx: {
|
|
1268
1268
|
backgroundColor: "background.paper",
|
|
@@ -1277,7 +1277,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1277
1277
|
oe,
|
|
1278
1278
|
{
|
|
1279
1279
|
disabled: !p,
|
|
1280
|
-
onClick:
|
|
1280
|
+
onClick: A,
|
|
1281
1281
|
sx: {
|
|
1282
1282
|
borderTopLeftRadius: 0,
|
|
1283
1283
|
borderBottomLeftRadius: 0
|
|
@@ -1286,8 +1286,8 @@ const ht = E(({ transaction: t }) => {
|
|
|
1286
1286
|
children: r.save_button
|
|
1287
1287
|
}
|
|
1288
1288
|
)
|
|
1289
|
-
] }) : /* @__PURE__ */
|
|
1290
|
-
/* @__PURE__ */ e(
|
|
1289
|
+
] }) : /* @__PURE__ */ c(v, { alignItems: "center", direction: "row", gap: 4, sx: { minHeight: 44 }, children: [
|
|
1290
|
+
/* @__PURE__ */ e(x, { bold: !0, children: t.description }),
|
|
1291
1291
|
!n && /* @__PURE__ */ e(
|
|
1292
1292
|
ne,
|
|
1293
1293
|
{
|
|
@@ -1295,7 +1295,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1295
1295
|
id: "transaction-description-edit-button",
|
|
1296
1296
|
onClick: h,
|
|
1297
1297
|
sx: { color: "action.active" },
|
|
1298
|
-
children: /* @__PURE__ */ e(
|
|
1298
|
+
children: /* @__PURE__ */ e(le, { name: "create", size: 22 })
|
|
1299
1299
|
}
|
|
1300
1300
|
)
|
|
1301
1301
|
] })
|
|
@@ -1305,7 +1305,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1305
1305
|
r(H.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await n({ ...t, is_flagged: !t.is_flagged });
|
|
1306
1306
|
};
|
|
1307
1307
|
return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
|
|
1308
|
-
|
|
1308
|
+
Xe,
|
|
1309
1309
|
{
|
|
1310
1310
|
"aria-label": i.flag_btn_aria,
|
|
1311
1311
|
"aria-pressed": t.is_flagged,
|
|
@@ -1317,29 +1317,29 @@ const ht = E(({ transaction: t }) => {
|
|
|
1317
1317
|
color: a ? "common.white" : "secondary.main",
|
|
1318
1318
|
"&.Mui-selected": {
|
|
1319
1319
|
color: a ? "primary.main" : "common.white",
|
|
1320
|
-
backgroundColor: a ?
|
|
1320
|
+
backgroundColor: a ? Ce(o.palette.primary.main, 0.25) : "warning.dark",
|
|
1321
1321
|
":hover": {
|
|
1322
1322
|
color: a ? "primary.main" : "common.white",
|
|
1323
|
-
backgroundColor: a ?
|
|
1323
|
+
backgroundColor: a ? Ce(o.palette.primary.main, 0.2) : "warning.main"
|
|
1324
1324
|
}
|
|
1325
1325
|
},
|
|
1326
1326
|
":hover": {
|
|
1327
1327
|
color: a ? "common.white" : "warning.contrastText",
|
|
1328
|
-
backgroundColor: a ?
|
|
1328
|
+
backgroundColor: a ? Ce(o.palette.primary.main, 0.2) : "warning.light"
|
|
1329
1329
|
}
|
|
1330
1330
|
},
|
|
1331
1331
|
value: "flagged",
|
|
1332
1332
|
children: /* @__PURE__ */ e(Ze, { color: "inherit" })
|
|
1333
1333
|
}
|
|
1334
1334
|
) });
|
|
1335
|
-
}, Yt = E(Wt), se = (t, n, i, r = !0, o = "inset") => r ? /* @__PURE__ */
|
|
1336
|
-
/* @__PURE__ */
|
|
1335
|
+
}, Yt = E(Wt), se = (t, n, i, r = !0, o = "inset") => r ? /* @__PURE__ */ c(d.Fragment, { children: [
|
|
1336
|
+
/* @__PURE__ */ c(B, { disableGutters: !0, disablePadding: !0, children: [
|
|
1337
1337
|
/* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(V, { sx: { bgcolor: "border.light" }, variant: "rounded", children: t }) }),
|
|
1338
1338
|
/* @__PURE__ */ e(
|
|
1339
1339
|
$,
|
|
1340
1340
|
{
|
|
1341
1341
|
primary: n,
|
|
1342
|
-
primaryTypographyProps: { variant: "
|
|
1342
|
+
primaryTypographyProps: { variant: "caption" },
|
|
1343
1343
|
secondary: i
|
|
1344
1344
|
}
|
|
1345
1345
|
)
|
|
@@ -1350,7 +1350,7 @@ const ht = E(({ transaction: t }) => {
|
|
|
1350
1350
|
const o = new Map(i.map((a) => [a.guid, a.name]));
|
|
1351
1351
|
return t.tags.map((a) => o.get(a)).filter(Boolean).join(" / ");
|
|
1352
1352
|
}, [i, t.tags]);
|
|
1353
|
-
return /* @__PURE__ */
|
|
1353
|
+
return /* @__PURE__ */ c(ue, { sx: { "& .MuiListItem-root": { px: 24, py: 12 } }, children: [
|
|
1354
1354
|
se(
|
|
1355
1355
|
/* @__PURE__ */ e(
|
|
1356
1356
|
Ie,
|
|
@@ -1362,44 +1362,44 @@ const ht = E(({ transaction: t }) => {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
),
|
|
1364
1364
|
n.category_title,
|
|
1365
|
-
/* @__PURE__ */ e(
|
|
1365
|
+
/* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: t.category ?? n.actions_select_a_category })
|
|
1366
1366
|
),
|
|
1367
1367
|
se(
|
|
1368
|
-
/* @__PURE__ */ e(
|
|
1368
|
+
/* @__PURE__ */ e(le, { name: "calendar_month", sx: { color: "text.primary" }, weight: xe.Dark }),
|
|
1369
1369
|
n.date_title,
|
|
1370
|
-
/* @__PURE__ */ e(
|
|
1370
|
+
/* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: Me(Ae(t.date), ke.YEAR_MONTH_DAY) })
|
|
1371
1371
|
),
|
|
1372
1372
|
se(
|
|
1373
|
-
/* @__PURE__ */ e(
|
|
1373
|
+
/* @__PURE__ */ e(le, { name: "article", sx: { color: "text.primary" }, weight: xe.Dark }),
|
|
1374
1374
|
n.memo_title,
|
|
1375
|
-
/* @__PURE__ */ e(
|
|
1375
|
+
/* @__PURE__ */ e(x, { bold: !0, sx: { overflowWrap: "break-word", whiteSpace: "wrap" }, variant: "body1", children: t.memo ?? n.memo_desc }),
|
|
1376
1376
|
!!t.memo,
|
|
1377
1377
|
t.tags?.length > 0 ? "inset" : "fullWidth"
|
|
1378
1378
|
),
|
|
1379
1379
|
se(
|
|
1380
|
-
/* @__PURE__ */ e(
|
|
1380
|
+
/* @__PURE__ */ e(le, { name: "local_offer", sx: { color: "text.primary" }, weight: xe.Dark }),
|
|
1381
1381
|
n.tags_title,
|
|
1382
|
-
/* @__PURE__ */ e(
|
|
1382
|
+
/* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: t.tags?.length ? r : n.tags_desc }),
|
|
1383
1383
|
!!t.tags?.length,
|
|
1384
1384
|
"fullWidth"
|
|
1385
1385
|
)
|
|
1386
1386
|
] });
|
|
1387
|
-
},
|
|
1388
|
-
bottomActions: t =
|
|
1387
|
+
}, jt = E(zt), qt = ({
|
|
1388
|
+
bottomActions: t = _t,
|
|
1389
1389
|
canFlagTransaction: n = !0,
|
|
1390
1390
|
topActions: i = ut,
|
|
1391
1391
|
transaction: r
|
|
1392
1392
|
}) => {
|
|
1393
|
-
const { onEvent: o } = w(), { isCopyLoaded: a } =
|
|
1393
|
+
const { onEvent: o } = w(), { isCopyLoaded: a } = je(), { userFeatures: s } = qe(), l = U(), m = r?.number && r.number.length > 4;
|
|
1394
1394
|
if (d.useEffect(
|
|
1395
1395
|
() => o(H.TRANSACTION_DETAILS_VIEW, { transaction_guid: r.guid }),
|
|
1396
1396
|
[]
|
|
1397
1397
|
), !a)
|
|
1398
1398
|
return /* @__PURE__ */ e(dt, {});
|
|
1399
|
-
const u = Ve(s, "MX_TXN_DETAILS_VIEW_ONLY"), p =
|
|
1400
|
-
return /* @__PURE__ */ e(F, { className: "mx-txn-transaction-details", width: "100%", children: r && /* @__PURE__ */
|
|
1401
|
-
/* @__PURE__ */
|
|
1402
|
-
/* @__PURE__ */ e(
|
|
1399
|
+
const u = Ve(s, "MX_TXN_DETAILS_VIEW_ONLY"), p = l.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
1400
|
+
return /* @__PURE__ */ e(F, { className: "mx-txn-transaction-details", width: "100%", children: r && /* @__PURE__ */ c(v, { children: [
|
|
1401
|
+
/* @__PURE__ */ c(v, { gap: 12, p: 24, children: [
|
|
1402
|
+
/* @__PURE__ */ e(ce, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
|
|
1403
1403
|
Ne,
|
|
1404
1404
|
{
|
|
1405
1405
|
categoryGuid: r.top_level_category_guid || "",
|
|
@@ -1408,41 +1408,41 @@ const ht = E(({ transaction: t }) => {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
) }),
|
|
1410
1410
|
/* @__PURE__ */ e(Vt, { transaction: r, viewOnly: u }),
|
|
1411
|
-
/* @__PURE__ */
|
|
1412
|
-
/* @__PURE__ */
|
|
1411
|
+
/* @__PURE__ */ c(v, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
|
|
1412
|
+
/* @__PURE__ */ c(j, { color: r.isIncome ? "success.main" : "text.primary", variant: "h1", children: [
|
|
1413
1413
|
r.isIncome ? "+" : "",
|
|
1414
|
-
|
|
1414
|
+
q(r.amount, "0,0.00")
|
|
1415
1415
|
] }),
|
|
1416
1416
|
!u && n && /* @__PURE__ */ e(Yt, { transaction: r })
|
|
1417
1417
|
] }),
|
|
1418
|
-
/* @__PURE__ */
|
|
1419
|
-
/* @__PURE__ */ e(
|
|
1420
|
-
${
|
|
1421
|
-
/* @__PURE__ */ e(
|
|
1418
|
+
/* @__PURE__ */ c(v, { sx: { bgcolor: p, borderRadius: "4px", gap: 4, p: 8 }, children: [
|
|
1419
|
+
/* @__PURE__ */ e(x, { bold: !0, children: `${r.account}
|
|
1420
|
+
${m ? r.number : "•".repeat(4).concat(r.number ?? "")}` }),
|
|
1421
|
+
/* @__PURE__ */ e(x, { bold: !0, variant: "tiny", children: r.feed_description })
|
|
1422
1422
|
] })
|
|
1423
1423
|
] }),
|
|
1424
|
-
/* @__PURE__ */ e(
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1424
|
+
/* @__PURE__ */ e(ce, { square: !0, sx: { boxShadow: "none" }, children: u ? /* @__PURE__ */ e(jt, { transaction: r }) : /* @__PURE__ */ e(ue, { children: i.map((_, g) => /* @__PURE__ */ c(d.Fragment, { children: [
|
|
1425
|
+
_ === re.Category && /* @__PURE__ */ e(yt, { transaction: r }),
|
|
1426
|
+
_ === re.Date && /* @__PURE__ */ e(Tt, { transaction: r }),
|
|
1427
|
+
_ === re.Memo && /* @__PURE__ */ e(It, { transaction: r }),
|
|
1428
|
+
_ === re.Tags && /* @__PURE__ */ e(Ht, { transaction: r }),
|
|
1429
1429
|
/* @__PURE__ */ e(de, { variant: g < i.length - 1 ? "inset" : "fullWidth" })
|
|
1430
|
-
] },
|
|
1431
|
-
!u && t.length > 0 && /* @__PURE__ */
|
|
1432
|
-
/* @__PURE__ */ e(
|
|
1433
|
-
/* @__PURE__ */ e(
|
|
1434
|
-
t.map((
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1430
|
+
] }, _)) }) }),
|
|
1431
|
+
!u && t.length > 0 && /* @__PURE__ */ c(d.Fragment, { children: [
|
|
1432
|
+
/* @__PURE__ */ e(x, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "body1", children: "Actions" }),
|
|
1433
|
+
/* @__PURE__ */ e(ce, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ c(ue, { children: [
|
|
1434
|
+
t.map((_, g) => /* @__PURE__ */ c(d.Fragment, { children: [
|
|
1435
|
+
_ === ae.MerchantBudget && /* @__PURE__ */ e(ht, { transaction: r }),
|
|
1436
|
+
_ === ae.SplitTransaction && /* @__PURE__ */ e(wt, { transaction: r }),
|
|
1437
|
+
_ === ae.HideTransaction && /* @__PURE__ */ e(St, { transaction: r }),
|
|
1438
|
+
_ === ae.MerchantLogo && /* @__PURE__ */ e(ft, { transaction: r }),
|
|
1439
1439
|
/* @__PURE__ */ e(de, { variant: g < t.length - 1 ? "inset" : "fullWidth" })
|
|
1440
|
-
] },
|
|
1441
|
-
r.is_manual && !r.parent_guid && !r.has_been_split && /* @__PURE__ */ e(
|
|
1440
|
+
] }, _)),
|
|
1441
|
+
r.is_manual && !r.parent_guid && !r.has_been_split && /* @__PURE__ */ e(Ct, { transaction: r })
|
|
1442
1442
|
] }) })
|
|
1443
1443
|
] })
|
|
1444
1444
|
] }) });
|
|
1445
|
-
}, Hr = E(
|
|
1445
|
+
}, Hr = E(qt);
|
|
1446
1446
|
export {
|
|
1447
1447
|
ae as B,
|
|
1448
1448
|
yt as C,
|
|
@@ -1451,5 +1451,5 @@ export {
|
|
|
1451
1451
|
Hr as T,
|
|
1452
1452
|
Ht as a,
|
|
1453
1453
|
re as b,
|
|
1454
|
-
|
|
1454
|
+
mt as c
|
|
1455
1455
|
};
|