@mx-cartographer/experiences 7.2.22-alpha.sms2 → 7.2.23-alpha.sab1
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 -3
- package/dist/{AccountDetailsContent-C-TlAp1T.mjs → AccountDetailsContent-B6ZFRZ8l.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-BXnLseqP.mjs} +20 -18
- package/dist/{ManageIncome-CGYYCOFR.mjs → ManageIncome-CXeJPfjE.mjs} +1 -1
- package/dist/{RecurringSettings-BMcgNklx.mjs → RecurringSettings-D7476j-N.mjs} +1 -1
- package/dist/{TransactionDetails-D9ycDgYU.mjs → TransactionDetails-Cscyr17P.mjs} +433 -399
- package/dist/accounts/index.es.js +2 -2
- package/dist/budgets/index.es.js +3 -3
- package/dist/cashflow/index.es.js +3 -3
- package/dist/categories/index.es.js +1 -1
- package/dist/common/stores/GlobalStore.d.ts +5 -2
- package/dist/finstrong/index.es.js +1 -1
- package/dist/goals/index.es.js +1 -1
- package/dist/notifications/index.es.js +27 -27
- package/dist/recurringtransactions/index.es.js +4 -4
- package/dist/settings/index.es.js +1 -1
- package/dist/spending/index.es.js +16 -17
- package/dist/transactions/index.es.js +61 -62
- package/dist/trends/index.es.js +1 -1
- package/package.json +1 -1
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import _ from "react";
|
|
3
|
-
import { observer as
|
|
4
|
-
import { useVirtualizer as
|
|
5
|
-
import
|
|
3
|
+
import { observer as A } from "mobx-react-lite";
|
|
4
|
+
import { useVirtualizer as Re } from "@tanstack/react-virtual";
|
|
5
|
+
import v from "@mui/material/Box";
|
|
6
6
|
import Z from "@mui/material/Divider";
|
|
7
7
|
import J from "@mui/material/List";
|
|
8
|
-
import { MerchantLogo as
|
|
8
|
+
import { MerchantLogo as ge, Icon as C, Text as T, useTokens as ee, CategoryIcon as he, CategoryIconVariants as be, IconWeight as D, P as le, H1 as Ae, TextField as Te } from "@mxenabled/mxui";
|
|
9
9
|
import B from "@mui/material/ListItemAvatar";
|
|
10
10
|
import M from "@mui/material/ListItemText";
|
|
11
|
-
import
|
|
11
|
+
import b from "@mui/material/Stack";
|
|
12
12
|
import { T as Pe, L as Ge, O as h, C as Me, b as Ke, i as $e } from "./User-BQUxBeZV.mjs";
|
|
13
|
-
import { G as Be, h as
|
|
13
|
+
import { G as Be, h as w, u as x, g as L, m as xe, b as Fe, p as He } from "./hooks-D6XlXHf4.mjs";
|
|
14
14
|
import { f as te } from "./NumberFormatting-Buh7u8Oi.mjs";
|
|
15
15
|
import { Receipt as ze, Delete as oe, ChevronRight as Ue, Cancel as ie, Search as Xe, Edit as Ve, Flag as We } from "@mxenabled/mx-icons";
|
|
16
16
|
import { fromUnixTime as W } from "date-fns/fromUnixTime";
|
|
@@ -22,21 +22,21 @@ import ne from "@mui/material/Paper";
|
|
|
22
22
|
import ce from "@mui/material/Button";
|
|
23
23
|
import je from "@mui/material/FormGroup";
|
|
24
24
|
import Q from "@mui/material/IconButton";
|
|
25
|
-
import
|
|
25
|
+
import ve from "@mui/material/TextField";
|
|
26
26
|
import qe from "@mui/material/ToggleButton";
|
|
27
|
-
import
|
|
27
|
+
import De from "@mui/material/styles/useTheme";
|
|
28
28
|
import z from "@mui/material/Avatar";
|
|
29
29
|
import F from "@mui/material/ListItem";
|
|
30
|
-
import { a as V, f as
|
|
30
|
+
import { a as V, f as we, D as Ee } from "./Dialog-CWW597AF.mjs";
|
|
31
31
|
import U from "@mui/material/ListItemButton";
|
|
32
32
|
import X from "@mui/material/ListItemIcon";
|
|
33
|
-
import { a as
|
|
33
|
+
import { a as Oe } from "./CategorySelectorDrawer-BXnLseqP.mjs";
|
|
34
34
|
import { b as se } from "./Localization-2MODESHW.mjs";
|
|
35
35
|
import { getUnixTime as Ze } from "date-fns/getUnixTime";
|
|
36
36
|
import { D as de } from "./Drawer-kEE73B87.mjs";
|
|
37
37
|
import ye from "@mui/material/InputAdornment";
|
|
38
38
|
import Je from "@mui/material/Checkbox";
|
|
39
|
-
import
|
|
39
|
+
import pe from "@mui/material/Grid";
|
|
40
40
|
import { C as Qe } from "./CurrencyInput-DUsQbkXb.mjs";
|
|
41
41
|
import et from "@mui/material/Switch";
|
|
42
42
|
var q = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(q || {}), re = /* @__PURE__ */ ((t) => (t[t.SplitTransaction = 0] = "SplitTransaction", t[t.HideTransaction = 1] = "HideTransaction", t[t.MerchantLogo = 2] = "MerchantLogo", t))(re || {});
|
|
@@ -54,7 +54,7 @@ const tt = [
|
|
|
54
54
|
], G = () => {
|
|
55
55
|
if (!_.useContext(Be))
|
|
56
56
|
throw new Error("useTransactionsUiStore() must be used within the GlobalDataContext");
|
|
57
|
-
return
|
|
57
|
+
return w().uiStore;
|
|
58
58
|
};
|
|
59
59
|
function nt() {
|
|
60
60
|
return window.opener && window.opener.location ? window.opener.location.toString() : document.referrer;
|
|
@@ -71,17 +71,17 @@ function ot(t) {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
const it = ({ transaction: t, onClick: r }) => {
|
|
74
|
-
const { associatedBeats: i } =
|
|
74
|
+
const { associatedBeats: i } = w(), { expandedSplits: a } = G(), { transactions: o } = x(), { showInsights: n } = G(), s = t.transaction_type === Pe.CREDIT, d = _.useMemo(() => i.find((c) => c.associated_transaction_guid === t.guid), [i, t]);
|
|
75
75
|
return (
|
|
76
76
|
//TODO: implement common/components/ListItemRow.tsx
|
|
77
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ l(
|
|
78
78
|
Ge,
|
|
79
79
|
{
|
|
80
80
|
clickEventName: h.ON_TRANSACTION_LIST_ITEM_CLICK,
|
|
81
81
|
onClick: r ? () => r(t.guid) : void 0,
|
|
82
82
|
children: [
|
|
83
|
-
/* @__PURE__ */ e(B, { children: t.parent_guid &&
|
|
84
|
-
|
|
83
|
+
/* @__PURE__ */ e(B, { children: t.parent_guid && a.includes(t.parent_guid) ? /* @__PURE__ */ e(_.Fragment, {}) : /* @__PURE__ */ e(
|
|
84
|
+
ge,
|
|
85
85
|
{
|
|
86
86
|
categoryGuid: t.top_level_category_guid || "",
|
|
87
87
|
merchantGuid: t.merchant_guid || ""
|
|
@@ -91,14 +91,14 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
91
91
|
M,
|
|
92
92
|
{
|
|
93
93
|
disableTypography: !0,
|
|
94
|
-
secondary: /* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
t.is_flagged && /* @__PURE__ */ e(
|
|
97
|
-
t.is_hidden && /* @__PURE__ */ e(
|
|
98
|
-
t.has_been_split && /* @__PURE__ */ e(
|
|
94
|
+
secondary: /* @__PURE__ */ l(b, { direction: "row", justifyContent: "space-between", children: [
|
|
95
|
+
/* @__PURE__ */ l(b, { alignItems: "center", direction: "row", gap: 4, children: [
|
|
96
|
+
t.is_flagged && /* @__PURE__ */ e(C, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
|
|
97
|
+
t.is_hidden && /* @__PURE__ */ e(C, { name: "visibility_off", size: 16 }),
|
|
98
|
+
t.has_been_split && /* @__PURE__ */ e(C, { name: "call_split", size: 16 }),
|
|
99
99
|
/* @__PURE__ */ e(T, { variant: "XSmall", children: t.has_been_split ? o.split_transaction_category_label : t.category })
|
|
100
100
|
] }),
|
|
101
|
-
d &&
|
|
101
|
+
d && n && /* @__PURE__ */ e(
|
|
102
102
|
T,
|
|
103
103
|
{
|
|
104
104
|
bold: !0,
|
|
@@ -111,20 +111,20 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
111
111
|
}
|
|
112
112
|
)
|
|
113
113
|
] }),
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ l(b, { direction: "row", justifyContent: "space-between", sx: { gap: 8 }, children: [
|
|
115
|
+
/* @__PURE__ */ l(T, { bold: !0, variant: "Body", children: [
|
|
116
116
|
t.is_hidden && o.hide_trnx_cancel_hidden_note,
|
|
117
117
|
t.payee || t.description || t.feed_description
|
|
118
118
|
] }),
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ l(
|
|
120
120
|
T,
|
|
121
121
|
{
|
|
122
122
|
bold: !0,
|
|
123
|
-
color:
|
|
123
|
+
color: s ? "success.main" : "text.primary",
|
|
124
124
|
sx: { flexShrink: 0 },
|
|
125
125
|
variant: "Body",
|
|
126
126
|
children: [
|
|
127
|
-
|
|
127
|
+
s ? "+" : "",
|
|
128
128
|
te(t.amount, "0,0.00")
|
|
129
129
|
]
|
|
130
130
|
}
|
|
@@ -136,55 +136,55 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
136
136
|
}
|
|
137
137
|
)
|
|
138
138
|
);
|
|
139
|
-
}, st =
|
|
139
|
+
}, st = A(it), lt = ({
|
|
140
140
|
bgcolor: t = "background.default",
|
|
141
141
|
children: r
|
|
142
|
-
}) => /* @__PURE__ */ e(
|
|
143
|
-
const i = ee(), { transactions:
|
|
144
|
-
return /* @__PURE__ */
|
|
142
|
+
}) => /* @__PURE__ */ e(v, { display: "inline-block", sx: { bgcolor: t, py: 4, width: "100%" }, children: /* @__PURE__ */ e(T, { bold: !0, sx: { pl: 24 }, variant: "XSmall", children: r }) }), ct = ({ showIcon: t = !0, showSubtitle: r = !0 }) => {
|
|
143
|
+
const i = ee(), { transactions: a } = x();
|
|
144
|
+
return /* @__PURE__ */ l(b, { alignItems: "center", gap: i.Spacing.Small, height: "auto", mt: i.Spacing.Large, children: [
|
|
145
145
|
t && /* @__PURE__ */ e(ze, { color: "secondary", sx: { fontSize: 32 } }),
|
|
146
|
-
/* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Small", children:
|
|
147
|
-
r && /* @__PURE__ */ e(T, { color: "secondary", variant: "XSmall", children:
|
|
146
|
+
/* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Small", children: a.zero_state_no_transactions }),
|
|
147
|
+
r && /* @__PURE__ */ e(T, { color: "secondary", variant: "XSmall", children: a.zero_state_there_are_no_transactions })
|
|
148
148
|
] });
|
|
149
|
-
}, dt =
|
|
150
|
-
const i = W(r[t].date),
|
|
151
|
-
return !Ne(i,
|
|
149
|
+
}, dt = A(ct), Se = (t, r) => {
|
|
150
|
+
const i = W(r[t].date), a = W(r[t - 1]?.date);
|
|
151
|
+
return !Ne(i, a);
|
|
152
152
|
}, _t = (t, r) => {
|
|
153
|
-
const i = W(r[t].date),
|
|
154
|
-
return Ne(i,
|
|
153
|
+
const i = W(r[t].date), a = W(r[t + 1]?.date);
|
|
154
|
+
return Ne(i, a);
|
|
155
155
|
}, Ce = 65, fe = 34, ut = ({
|
|
156
156
|
bgcolor: t,
|
|
157
157
|
filter: r,
|
|
158
158
|
height: i = "calc(100dvh - 36px)",
|
|
159
|
-
loader:
|
|
159
|
+
loader: a = /* @__PURE__ */ e(Ie, { label: "Loading", size: 40 }),
|
|
160
160
|
onClick: o,
|
|
161
|
-
showInsights:
|
|
162
|
-
showLoader:
|
|
161
|
+
showInsights: n = !1,
|
|
162
|
+
showLoader: s = !1,
|
|
163
163
|
showHiddenTransactions: d = !1,
|
|
164
164
|
width: c = "100%",
|
|
165
165
|
zeroState: u = /* @__PURE__ */ e(dt, {})
|
|
166
166
|
}) => {
|
|
167
|
-
const { isLoading: m, sortedTransactions:
|
|
168
|
-
const I = r ?
|
|
169
|
-
return d ? I : I.filter((
|
|
170
|
-
}, [
|
|
171
|
-
const
|
|
172
|
-
if (
|
|
173
|
-
N(
|
|
167
|
+
const { isLoading: m, sortedTransactions: p } = w(), g = _.useMemo(() => {
|
|
168
|
+
const I = r ? p.filter(r) : p;
|
|
169
|
+
return d ? I : I.filter((R) => !R.is_hidden);
|
|
170
|
+
}, [p, d]), { clearExpandedSplits: S, setShowInsights: y, toggleSplit: N } = G(), { onEvent: f } = L(), k = (I) => {
|
|
171
|
+
const R = g.find((Y) => Y.guid === I);
|
|
172
|
+
if (R?.has_been_split) {
|
|
173
|
+
N(R.guid);
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
|
-
|
|
177
|
-
account_guid:
|
|
176
|
+
f(P.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
|
|
177
|
+
account_guid: R?.account_guid,
|
|
178
178
|
transaction_guid: I
|
|
179
179
|
}), o?.(I);
|
|
180
|
-
}, K = _.useRef(null), $ =
|
|
181
|
-
count:
|
|
180
|
+
}, K = _.useRef(null), $ = Re({
|
|
181
|
+
count: g.length,
|
|
182
182
|
getScrollElement: () => K.current,
|
|
183
|
-
estimateSize: (I) => Ce + (Se(I,
|
|
183
|
+
estimateSize: (I) => Ce + (Se(I, g) ? fe : 0),
|
|
184
184
|
overscan: 5
|
|
185
185
|
});
|
|
186
|
-
return _.useEffect(() => $.measure(), [
|
|
187
|
-
|
|
186
|
+
return _.useEffect(() => $.measure(), [g]), _.useEffect(() => y(n), [n]), _.useEffect(() => () => S(), []), /* @__PURE__ */ e(J, { sx: { width: c }, children: /* @__PURE__ */ e(v, { height: i, overflow: "auto", ref: K, width: c, children: /* @__PURE__ */ l(
|
|
187
|
+
v,
|
|
188
188
|
{
|
|
189
189
|
height: (
|
|
190
190
|
// set the height to auto when there are no transactions so the zero state isn't set to 0
|
|
@@ -193,12 +193,12 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
193
193
|
position: "relative",
|
|
194
194
|
width: "100%",
|
|
195
195
|
children: [
|
|
196
|
-
(m ||
|
|
197
|
-
!m && !
|
|
198
|
-
!m && !
|
|
199
|
-
const
|
|
200
|
-
return /* @__PURE__ */
|
|
201
|
-
|
|
196
|
+
(m || s) && a,
|
|
197
|
+
!m && !s && $.getVirtualItems().length === 0 && u,
|
|
198
|
+
!m && !s && $.getVirtualItems().length > 0 && $.getVirtualItems().map((I) => {
|
|
199
|
+
const R = g[I.index], Y = Se(I.index, g), _e = _t(I.index, g), ue = Ce + (Y ? fe : 0);
|
|
200
|
+
return /* @__PURE__ */ l(
|
|
201
|
+
v,
|
|
202
202
|
{
|
|
203
203
|
sx: {
|
|
204
204
|
height: ue,
|
|
@@ -207,42 +207,42 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
207
207
|
width: "100%"
|
|
208
208
|
},
|
|
209
209
|
children: [
|
|
210
|
-
Y && /* @__PURE__ */ e(lt, { bgcolor: t, children: Ye(
|
|
211
|
-
/* @__PURE__ */ e(st, { onClick:
|
|
210
|
+
Y && /* @__PURE__ */ e(lt, { bgcolor: t, children: Ye(R.date) }),
|
|
211
|
+
/* @__PURE__ */ e(st, { onClick: k, transaction: R }),
|
|
212
212
|
/* @__PURE__ */ e(Z, { sx: { ml: _e ? 24 : 0 } })
|
|
213
213
|
]
|
|
214
214
|
},
|
|
215
|
-
|
|
215
|
+
R.guid
|
|
216
216
|
);
|
|
217
217
|
})
|
|
218
218
|
]
|
|
219
219
|
}
|
|
220
220
|
) }) });
|
|
221
|
-
}, Ra =
|
|
222
|
-
const { addOrUpdateTransactionRule: r, updateTransaction: i } =
|
|
223
|
-
await i({ ...t, category_guid: m }),
|
|
221
|
+
}, Ra = A(ut), mt = ({ transaction: t }) => {
|
|
222
|
+
const { addOrUpdateTransactionRule: r, updateTransaction: i } = w(), { categories: a } = xe(), { onEvent: o } = L(), { setShouldDisableDrawerScroll: n, updateManualTransaction: s } = G(), { transactions: d } = x(), [c, u] = _.useState(!1), [m, p] = _.useState(""), g = async (f) => {
|
|
223
|
+
await i({ ...t, category_guid: m }), f && await r(m, t), p(""), o(P.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
224
224
|
transaction_guid: t.guid
|
|
225
225
|
});
|
|
226
|
-
},
|
|
226
|
+
}, S = (f) => {
|
|
227
227
|
if (t.is_manual && !t.guid) {
|
|
228
|
-
const
|
|
229
|
-
|
|
228
|
+
const k = a.find((K) => K.guid === f);
|
|
229
|
+
s({
|
|
230
230
|
...t,
|
|
231
|
-
category:
|
|
232
|
-
category_guid:
|
|
233
|
-
top_level_category_guid:
|
|
231
|
+
category: k?.name,
|
|
232
|
+
category_guid: f,
|
|
233
|
+
top_level_category_guid: k?.parent_guid || f
|
|
234
234
|
});
|
|
235
235
|
} else
|
|
236
|
-
|
|
236
|
+
p(f);
|
|
237
237
|
y();
|
|
238
238
|
}, y = () => {
|
|
239
|
-
u(!1),
|
|
239
|
+
u(!1), n(!1);
|
|
240
240
|
}, N = _.useMemo(
|
|
241
|
-
() =>
|
|
241
|
+
() => a.find((f) => f.guid === m),
|
|
242
242
|
[m]
|
|
243
243
|
);
|
|
244
|
-
return /* @__PURE__ */
|
|
245
|
-
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ l(_.Fragment, { children: [
|
|
245
|
+
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
246
246
|
U,
|
|
247
247
|
{
|
|
248
248
|
onClick: () => {
|
|
@@ -266,16 +266,16 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
266
266
|
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.category ?? d.actions_select_a_category })
|
|
267
267
|
}
|
|
268
268
|
),
|
|
269
|
-
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
|
|
269
|
+
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
270
270
|
]
|
|
271
271
|
}
|
|
272
272
|
) }),
|
|
273
273
|
/* @__PURE__ */ e(
|
|
274
|
-
|
|
274
|
+
Oe,
|
|
275
275
|
{
|
|
276
276
|
initialSelected: t.category_guid,
|
|
277
277
|
onClose: y,
|
|
278
|
-
onSelect:
|
|
278
|
+
onSelect: S,
|
|
279
279
|
showDrawer: c,
|
|
280
280
|
title: d.actions_select_a_category
|
|
281
281
|
}
|
|
@@ -290,9 +290,9 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
290
290
|
)
|
|
291
291
|
},
|
|
292
292
|
isOpen: !!m,
|
|
293
|
-
onClose: () =>
|
|
294
|
-
onPrimaryAction: () =>
|
|
295
|
-
onSecondaryAction: () =>
|
|
293
|
+
onClose: () => p(""),
|
|
294
|
+
onPrimaryAction: () => g(!0),
|
|
295
|
+
onSecondaryAction: () => g(!1),
|
|
296
296
|
primaryText: d.actions_apply_to_all,
|
|
297
297
|
secondaryText: d.actions_this_time_only,
|
|
298
298
|
children: /* @__PURE__ */ e(le, { variant: "Paragraph", children: se(
|
|
@@ -303,81 +303,81 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
303
303
|
}
|
|
304
304
|
)
|
|
305
305
|
] });
|
|
306
|
-
},
|
|
307
|
-
const r = ee(), { onEvent: i } = L(), { updateTransaction:
|
|
308
|
-
m(Ze(
|
|
309
|
-
},
|
|
306
|
+
}, pt = ({ transaction: t }) => {
|
|
307
|
+
const r = ee(), { onEvent: i } = L(), { updateTransaction: a } = w(), { updateManualTransaction: o } = G(), { common: n, transactions: s } = x(), [d, c] = _.useState(!1), [u, m] = _.useState(t.date), p = (S) => {
|
|
308
|
+
m(Ze(S));
|
|
309
|
+
}, g = async () => {
|
|
310
310
|
if (t.is_manual && !t.guid) {
|
|
311
311
|
o({ ...t, date: u }), c(!1);
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
|
-
await
|
|
314
|
+
await a({ ...t, date: u }), i(P.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), c(!1);
|
|
315
315
|
};
|
|
316
|
-
return /* @__PURE__ */
|
|
317
|
-
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
316
|
+
return /* @__PURE__ */ l(v, { className: "mx-txn-date-action", children: [
|
|
317
|
+
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
318
318
|
U,
|
|
319
319
|
{
|
|
320
320
|
onClick: () => {
|
|
321
321
|
i(h.ON_TRANSACTION_DATE_CLICK), c(!0);
|
|
322
322
|
},
|
|
323
323
|
children: [
|
|
324
|
-
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
324
|
+
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "calendar_month", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
325
325
|
/* @__PURE__ */ e(
|
|
326
326
|
M,
|
|
327
327
|
{
|
|
328
|
-
primary:
|
|
328
|
+
primary: s.date_title,
|
|
329
329
|
primaryTypographyProps: { variant: "XSmall" },
|
|
330
|
-
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children:
|
|
330
|
+
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: we(W(t.date), Ee.YEAR_MONTH_DAY) })
|
|
331
331
|
}
|
|
332
332
|
),
|
|
333
|
-
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
|
|
333
|
+
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
334
334
|
]
|
|
335
335
|
}
|
|
336
336
|
) }),
|
|
337
337
|
/* @__PURE__ */ e(
|
|
338
338
|
de,
|
|
339
339
|
{
|
|
340
|
-
ariaLabelClose:
|
|
340
|
+
ariaLabelClose: n.close_aria,
|
|
341
341
|
isOpen: d,
|
|
342
342
|
onClose: () => c(!1),
|
|
343
|
-
onPrimaryAction:
|
|
344
|
-
primaryText:
|
|
345
|
-
secondaryText:
|
|
346
|
-
title:
|
|
347
|
-
children: /* @__PURE__ */ e(
|
|
343
|
+
onPrimaryAction: g,
|
|
344
|
+
primaryText: n.save_button,
|
|
345
|
+
secondaryText: n.cancel_button,
|
|
346
|
+
title: s.date_edit_title,
|
|
347
|
+
children: /* @__PURE__ */ e(b, { alignItems: "center", mt: r.Spacing.XXLarge, children: /* @__PURE__ */ e(
|
|
348
348
|
Me,
|
|
349
349
|
{
|
|
350
350
|
beginDate: W(u),
|
|
351
351
|
copy: {
|
|
352
|
-
nextAria:
|
|
353
|
-
prevAria:
|
|
354
|
-
today:
|
|
352
|
+
nextAria: s.date_next_aria,
|
|
353
|
+
prevAria: s.date_prev_aria,
|
|
354
|
+
today: n.date_range_picker.today
|
|
355
355
|
},
|
|
356
|
-
onDateSelected:
|
|
356
|
+
onDateSelected: p,
|
|
357
357
|
selectionType: Ke.Single
|
|
358
358
|
}
|
|
359
359
|
) })
|
|
360
360
|
}
|
|
361
361
|
)
|
|
362
362
|
] });
|
|
363
|
-
},
|
|
364
|
-
const { onEvent: r } = L(), { removeTransaction: i } =
|
|
363
|
+
}, gt = ({ transaction: t }) => {
|
|
364
|
+
const { onEvent: r } = L(), { removeTransaction: i } = w(), { setShouldDisableDrawerScroll: a } = G(), { common: o, transactions: n } = x(), [s, d] = _.useState(!1), c = async () => {
|
|
365
365
|
await i(t.guid), r(h.ON_TRANSACTION_DELETE_DELETED);
|
|
366
366
|
};
|
|
367
|
-
return /* @__PURE__ */
|
|
368
|
-
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
367
|
+
return /* @__PURE__ */ l(v, { className: "mx-txn-delete", children: [
|
|
368
|
+
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
369
369
|
U,
|
|
370
370
|
{
|
|
371
371
|
onClick: () => {
|
|
372
|
-
r(h.ON_TRANSACTION_DELETE_CLICK),
|
|
372
|
+
r(h.ON_TRANSACTION_DELETE_CLICK), a(!0), d(!0);
|
|
373
373
|
},
|
|
374
374
|
children: [
|
|
375
375
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { variant: "rounded", children: /* @__PURE__ */ e(oe, { color: "secondary", fontSize: "small" }) }) }),
|
|
376
376
|
/* @__PURE__ */ e(
|
|
377
377
|
M,
|
|
378
378
|
{
|
|
379
|
-
primary:
|
|
380
|
-
secondary:
|
|
379
|
+
primary: n.manual_transaction_delete_title,
|
|
380
|
+
secondary: n.manual_transaction_delete_subtitle
|
|
381
381
|
}
|
|
382
382
|
),
|
|
383
383
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(oe, {}) })
|
|
@@ -387,67 +387,67 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
387
387
|
/* @__PURE__ */ e(
|
|
388
388
|
V,
|
|
389
389
|
{
|
|
390
|
-
copy: { title:
|
|
391
|
-
isOpen:
|
|
390
|
+
copy: { title: n.manual_transaction_delete_title },
|
|
391
|
+
isOpen: s,
|
|
392
392
|
onClose: () => {
|
|
393
|
-
|
|
393
|
+
a(!1), d(!1);
|
|
394
394
|
},
|
|
395
395
|
onPrimaryAction: c,
|
|
396
396
|
onSecondaryAction: () => r(h.ON_TRANSACTION_DELETE_CANCEL),
|
|
397
397
|
primaryText: o.delete_button,
|
|
398
398
|
secondaryText: o.cancel_button,
|
|
399
|
-
children: /* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children:
|
|
399
|
+
children: /* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: n.manual_transaction_delete_description })
|
|
400
400
|
}
|
|
401
401
|
)
|
|
402
402
|
] });
|
|
403
|
-
}, ht =
|
|
404
|
-
const { onEvent: r } = L(), { updateTransaction: i } =
|
|
403
|
+
}, ht = A(gt), Tt = ({ transaction: t }) => {
|
|
404
|
+
const { onEvent: r } = L(), { updateTransaction: i } = w(), { setShouldDisableDrawerScroll: a } = G(), { common: o, transactions: n } = x(), [s, d] = _.useState(!1), c = async () => {
|
|
405
405
|
await i({ ...t, merchant_guid: "" }), r(P.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
|
406
406
|
transaction_guid: t.guid
|
|
407
407
|
});
|
|
408
408
|
};
|
|
409
|
-
return /* @__PURE__ */
|
|
410
|
-
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
409
|
+
return /* @__PURE__ */ l(v, { className: "mx-txn-delete-logo", children: [
|
|
410
|
+
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
411
411
|
U,
|
|
412
412
|
{
|
|
413
413
|
onClick: () => {
|
|
414
414
|
r(h.ON_TRANSACTION_DELETE_LOGO_CLICK), d(!0);
|
|
415
415
|
},
|
|
416
416
|
children: [
|
|
417
|
-
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
418
|
-
/* @__PURE__ */ e(M, { primary:
|
|
419
|
-
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
|
|
417
|
+
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "delete", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
418
|
+
/* @__PURE__ */ e(M, { primary: n.merchant_logo_title, secondary: n.merchant_logo_desc }),
|
|
419
|
+
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
420
420
|
]
|
|
421
421
|
}
|
|
422
422
|
) }),
|
|
423
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ l(
|
|
424
424
|
V,
|
|
425
425
|
{
|
|
426
|
-
copy: { title:
|
|
427
|
-
isOpen:
|
|
426
|
+
copy: { title: n.merchant_logo_modal_title },
|
|
427
|
+
isOpen: s,
|
|
428
428
|
onClose: () => {
|
|
429
|
-
|
|
429
|
+
a(!1), d(!1);
|
|
430
430
|
},
|
|
431
431
|
onPrimaryAction: c,
|
|
432
432
|
onSecondaryAction: () => r(h.ON_TRANSACTION_DELETE_LOGO_CANCEL),
|
|
433
433
|
primaryText: o.delete_button,
|
|
434
434
|
secondaryText: o.cancel_button,
|
|
435
|
-
title:
|
|
435
|
+
title: n.merchant_logo_modal_title,
|
|
436
436
|
children: [
|
|
437
|
-
/* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children:
|
|
438
|
-
/* @__PURE__ */ e(T, { bold: !0, sx: { whiteSpace: "normal" }, variant: "Paragraph", children: ` ${
|
|
437
|
+
/* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: n.merchant_logo_modal_desc }),
|
|
438
|
+
/* @__PURE__ */ e(T, { bold: !0, sx: { whiteSpace: "normal" }, variant: "Paragraph", children: ` ${n.merchant_logo_modal_desc_bold}` })
|
|
439
439
|
]
|
|
440
440
|
}
|
|
441
441
|
)
|
|
442
442
|
] });
|
|
443
|
-
}, yt =
|
|
444
|
-
const { onEvent: r } = L(), { updateTransaction: i } =
|
|
443
|
+
}, yt = A(Tt), St = ({ transaction: t }) => {
|
|
444
|
+
const { onEvent: r } = L(), { updateTransaction: i } = w(), { setShouldDisableDrawerScroll: a } = G(), { common: o, transactions: n } = x(), [s, d] = _.useState(!1), c = t.is_hidden, u = async () => {
|
|
445
445
|
await i({ ...t, is_hidden: !t.is_hidden }), r(
|
|
446
446
|
c ? h.ON_TRANSACTION_UNHIDDEN : h.ON_TRANSACTION_HIDDEN
|
|
447
447
|
);
|
|
448
448
|
};
|
|
449
|
-
return /* @__PURE__ */
|
|
450
|
-
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
449
|
+
return /* @__PURE__ */ l(v, { className: "mx-txn-hide-transaction", children: [
|
|
450
|
+
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
451
451
|
U,
|
|
452
452
|
{
|
|
453
453
|
"aria-checked": c,
|
|
@@ -464,18 +464,18 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
464
464
|
role: "switch",
|
|
465
465
|
children: [
|
|
466
466
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: c ? /* @__PURE__ */ e(
|
|
467
|
-
|
|
467
|
+
C,
|
|
468
468
|
{
|
|
469
469
|
name: "visibilityOff",
|
|
470
470
|
sx: { color: "text.primary" },
|
|
471
471
|
weight: D.Dark
|
|
472
472
|
}
|
|
473
|
-
) : /* @__PURE__ */ e(
|
|
473
|
+
) : /* @__PURE__ */ e(C, { name: "visibility", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
474
474
|
/* @__PURE__ */ e(
|
|
475
475
|
M,
|
|
476
476
|
{
|
|
477
|
-
primary: c ?
|
|
478
|
-
secondary: c ?
|
|
477
|
+
primary: c ? n.hide_trnx_subtitle_unhide_trnx : n.hide_trnx_subtitle_hide_trnx,
|
|
478
|
+
secondary: c ? n.hide_trnx_desc_unhiding : n.hide_trnx_desc_hiding
|
|
479
479
|
}
|
|
480
480
|
),
|
|
481
481
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
|
|
@@ -494,11 +494,11 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
494
494
|
V,
|
|
495
495
|
{
|
|
496
496
|
copy: {
|
|
497
|
-
title: c ?
|
|
497
|
+
title: c ? n.hide_trnx_subtitle_unhide_trnx : n.hide_trnx_subtitle_hide_trnx
|
|
498
498
|
},
|
|
499
|
-
isOpen:
|
|
499
|
+
isOpen: s,
|
|
500
500
|
onClose: () => {
|
|
501
|
-
|
|
501
|
+
a(!1), d(!1);
|
|
502
502
|
},
|
|
503
503
|
onPrimaryAction: u,
|
|
504
504
|
onSecondaryAction: () => r(
|
|
@@ -506,54 +506,54 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
506
506
|
),
|
|
507
507
|
primaryText: c ? o.unhide_button : o.hide_button,
|
|
508
508
|
secondaryText: o.cancel_button,
|
|
509
|
-
children: /* @__PURE__ */ e(T, { truncate: !1, variant: "Paragraph", children: c ?
|
|
509
|
+
children: /* @__PURE__ */ e(T, { truncate: !1, variant: "Paragraph", children: c ? n.hide_trnx_desc_unhiding : n.hide_trnx_desc_hiding })
|
|
510
510
|
}
|
|
511
511
|
)
|
|
512
512
|
] });
|
|
513
|
-
}, Ct =
|
|
514
|
-
const { amount: r, description: i, isIncome:
|
|
515
|
-
return /* @__PURE__ */
|
|
513
|
+
}, Ct = A(St), Le = ({ transaction: t }) => {
|
|
514
|
+
const { amount: r, description: i, isIncome: a, merchant_guid: o, payee: n, top_level_category_guid: s } = t;
|
|
515
|
+
return /* @__PURE__ */ l(b, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
|
|
516
516
|
/* @__PURE__ */ e(
|
|
517
|
-
|
|
517
|
+
ge,
|
|
518
518
|
{
|
|
519
|
-
categoryGuid:
|
|
519
|
+
categoryGuid: s || "",
|
|
520
520
|
merchantGuid: o || "",
|
|
521
521
|
size: 64
|
|
522
522
|
}
|
|
523
523
|
),
|
|
524
|
-
/* @__PURE__ */
|
|
525
|
-
/* @__PURE__ */ e(T, { bold: !0, mb: 4, truncate: !0, variant: "Body", children: i ||
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
|
|
524
|
+
/* @__PURE__ */ l(b, { overflow: "hidden'", children: [
|
|
525
|
+
/* @__PURE__ */ e(T, { bold: !0, mb: 4, truncate: !0, variant: "Body", children: i || n }),
|
|
526
|
+
/* @__PURE__ */ l(Ae, { color: a ? "success.main" : "text.primary", truncate: !0, children: [
|
|
527
|
+
a ? "+" : "",
|
|
528
528
|
te(r, "0,0.00")
|
|
529
529
|
] })
|
|
530
530
|
] })
|
|
531
531
|
] });
|
|
532
532
|
}, ft = ({ transaction: t }) => {
|
|
533
|
-
const { onEvent: r } = L(), { updateTransaction: i } =
|
|
533
|
+
const { onEvent: r } = L(), { updateTransaction: i } = w(), { updateManualTransaction: a } = G(), { common: o, transactions: n } = x(), [s, d] = _.useState(!1), [c, u] = _.useState("");
|
|
534
534
|
_.useEffect(() => {
|
|
535
|
-
|
|
536
|
-
}, [
|
|
535
|
+
s && u(t.memo ? t.memo : "");
|
|
536
|
+
}, [s]);
|
|
537
537
|
const m = async () => {
|
|
538
538
|
if (t.is_manual && !t.guid) {
|
|
539
|
-
|
|
539
|
+
a({ ...t, memo: c }), d(!1);
|
|
540
540
|
return;
|
|
541
541
|
}
|
|
542
542
|
await i({ ...t, memo: c }), r(P.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), d(!1);
|
|
543
543
|
};
|
|
544
|
-
return /* @__PURE__ */
|
|
545
|
-
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
544
|
+
return /* @__PURE__ */ l("div", { className: "mx-txn-memo-action", children: [
|
|
545
|
+
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
546
546
|
U,
|
|
547
547
|
{
|
|
548
548
|
onClick: () => {
|
|
549
549
|
r(h.ON_TRANSACTION_MEMO_CLICK), d(!0);
|
|
550
550
|
},
|
|
551
551
|
children: [
|
|
552
|
-
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
552
|
+
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "article", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
553
553
|
/* @__PURE__ */ e(
|
|
554
554
|
M,
|
|
555
555
|
{
|
|
556
|
-
primary:
|
|
556
|
+
primary: n.memo_title,
|
|
557
557
|
primaryTypographyProps: { variant: "XSmall" },
|
|
558
558
|
secondary: /* @__PURE__ */ e(
|
|
559
559
|
T,
|
|
@@ -561,35 +561,35 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
561
561
|
bold: !0,
|
|
562
562
|
sx: { overflowWrap: "break-word", whiteSpace: "wrap" },
|
|
563
563
|
variant: "Body",
|
|
564
|
-
children: t.memo ? t.memo :
|
|
564
|
+
children: t.memo ? t.memo : n.memo_desc
|
|
565
565
|
}
|
|
566
566
|
)
|
|
567
567
|
}
|
|
568
568
|
),
|
|
569
|
-
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
|
|
569
|
+
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
570
570
|
]
|
|
571
571
|
}
|
|
572
572
|
) }),
|
|
573
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ l(
|
|
574
574
|
de,
|
|
575
575
|
{
|
|
576
576
|
ariaLabelClose: o.close_aria,
|
|
577
|
-
isOpen:
|
|
577
|
+
isOpen: s,
|
|
578
578
|
onClose: () => d(!1),
|
|
579
579
|
onPrimaryAction: m,
|
|
580
|
-
title:
|
|
580
|
+
title: n.memo_title,
|
|
581
581
|
children: [
|
|
582
582
|
/* @__PURE__ */ e(Le, { transaction: t }),
|
|
583
583
|
/* @__PURE__ */ e(
|
|
584
|
-
|
|
584
|
+
ve,
|
|
585
585
|
{
|
|
586
|
-
"aria-label":
|
|
586
|
+
"aria-label": n.memo_desc_aria,
|
|
587
587
|
focused: !0,
|
|
588
588
|
fullWidth: !0,
|
|
589
589
|
multiline: !0,
|
|
590
590
|
name: "memo",
|
|
591
|
-
onChange: (
|
|
592
|
-
placeholder:
|
|
591
|
+
onChange: (p) => u(p.target.value),
|
|
592
|
+
placeholder: n.memo_desc,
|
|
593
593
|
rows: 4,
|
|
594
594
|
sx: { px: 16 },
|
|
595
595
|
value: c
|
|
@@ -599,61 +599,89 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
599
599
|
}
|
|
600
600
|
)
|
|
601
601
|
] });
|
|
602
|
-
}, bt =
|
|
602
|
+
}, bt = A(ft), At = (t = "polite") => {
|
|
603
|
+
const [r, i] = _.useState(""), [a, o] = _.useState(t), n = _.useCallback((d, c) => {
|
|
604
|
+
c && o(c), i(d);
|
|
605
|
+
}, []), s = _.useMemo(
|
|
606
|
+
() => /* @__PURE__ */ e(
|
|
607
|
+
v,
|
|
608
|
+
{
|
|
609
|
+
"aria-atomic": "true",
|
|
610
|
+
"aria-live": a,
|
|
611
|
+
role: a === "assertive" ? "alert" : "status",
|
|
612
|
+
sx: {
|
|
613
|
+
position: "absolute",
|
|
614
|
+
width: "1px",
|
|
615
|
+
height: "1px",
|
|
616
|
+
padding: 0,
|
|
617
|
+
margin: "-1px",
|
|
618
|
+
overflow: "hidden",
|
|
619
|
+
clip: "rect(0 0 0 0)",
|
|
620
|
+
clipPath: "inset(50%)",
|
|
621
|
+
whiteSpace: "nowrap",
|
|
622
|
+
border: 0
|
|
623
|
+
},
|
|
624
|
+
children: r
|
|
625
|
+
}
|
|
626
|
+
),
|
|
627
|
+
[r, a]
|
|
628
|
+
);
|
|
629
|
+
return { announce: n, ariaLive: s };
|
|
630
|
+
}, xt = ({
|
|
603
631
|
index: t,
|
|
604
632
|
onDeleteRow: r,
|
|
605
633
|
onCategoryChanged: i,
|
|
606
|
-
onUpdateAmount:
|
|
634
|
+
onUpdateAmount: a,
|
|
607
635
|
split: o
|
|
608
636
|
}) => {
|
|
609
|
-
const
|
|
610
|
-
isNaN(Number(y)) || (u(y),
|
|
637
|
+
const n = ee(), { onEvent: s } = L(), { transactions: d } = x(), [c, u] = _.useState(`${o.amount}`), [m, p] = _.useState(!1), g = t === 0, S = (y) => {
|
|
638
|
+
isNaN(Number(y)) || (u(y), a(t, Number(y)));
|
|
611
639
|
};
|
|
612
|
-
return /* @__PURE__ */
|
|
613
|
-
|
|
640
|
+
return /* @__PURE__ */ l(
|
|
641
|
+
v,
|
|
614
642
|
{
|
|
615
643
|
bgcolor: "background.paper",
|
|
616
644
|
className: "mx-txn-split-manager-row",
|
|
617
|
-
pb:
|
|
618
|
-
px:
|
|
645
|
+
pb: n.Spacing.Tiny,
|
|
646
|
+
px: n.Spacing.XSmall,
|
|
619
647
|
children: [
|
|
620
|
-
/* @__PURE__ */
|
|
621
|
-
/* @__PURE__ */ e(
|
|
648
|
+
/* @__PURE__ */ l(pe, { alignItems: g ? "center" : "start", container: !0, children: [
|
|
649
|
+
/* @__PURE__ */ e(pe, { item: !0, xs: 7, children: /* @__PURE__ */ l(b, { alignItems: "start", children: [
|
|
622
650
|
/* @__PURE__ */ e(
|
|
623
651
|
ce,
|
|
624
652
|
{
|
|
625
653
|
endIcon: /* @__PURE__ */ e(Ue, {}),
|
|
626
|
-
onClick: () =>
|
|
654
|
+
onClick: () => p(!0),
|
|
627
655
|
startIcon: /* @__PURE__ */ e(he, { categoryGuid: o.top_level_category_guid }),
|
|
628
|
-
sx: { px:
|
|
656
|
+
sx: { px: n.Spacing.Small, py: n.Spacing.XSmall },
|
|
629
657
|
children: o.category
|
|
630
658
|
}
|
|
631
659
|
),
|
|
632
|
-
/* @__PURE__ */ e(
|
|
633
|
-
|
|
660
|
+
/* @__PURE__ */ e(v, { children: !o.category_guid && /* @__PURE__ */ l(
|
|
661
|
+
b,
|
|
634
662
|
{
|
|
635
663
|
color: "error.main",
|
|
636
664
|
direction: "row",
|
|
637
|
-
gap:
|
|
638
|
-
p:
|
|
665
|
+
gap: n.Spacing.XSmall,
|
|
666
|
+
p: n.Spacing.Small,
|
|
639
667
|
children: [
|
|
640
|
-
/* @__PURE__ */ e(ie, { sx: { fontSize:
|
|
668
|
+
/* @__PURE__ */ e(ie, { sx: { fontSize: n.FontSize.Body } }),
|
|
641
669
|
/* @__PURE__ */ e(T, { variant: "Small", children: d.split_transaction_errors_select_category })
|
|
642
670
|
]
|
|
643
671
|
}
|
|
644
672
|
) })
|
|
645
673
|
] }) }),
|
|
646
|
-
/* @__PURE__ */ e(
|
|
647
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ e(pe, { item: !0, xs: 5, children: g ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(T, { children: te(o.amount, "0,0.00") }) }) : /* @__PURE__ */ l(b, { alignItems: "start", children: [
|
|
675
|
+
/* @__PURE__ */ l(b, { alignItems: "start", direction: "row", gap: n.Spacing.XSmall, children: [
|
|
648
676
|
/* @__PURE__ */ e(
|
|
649
677
|
Qe,
|
|
650
678
|
{
|
|
651
679
|
amount: c,
|
|
652
680
|
ariaLabel: d.split_transaction_edit_split_amount,
|
|
653
681
|
name: "split-amount-input",
|
|
654
|
-
setAmount:
|
|
682
|
+
setAmount: S,
|
|
655
683
|
sx: {
|
|
656
|
-
".MuiOutlinedInput-input": { p:
|
|
684
|
+
".MuiOutlinedInput-input": { p: n.Spacing.Small }
|
|
657
685
|
},
|
|
658
686
|
type: "number"
|
|
659
687
|
}
|
|
@@ -664,22 +692,22 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
664
692
|
"aria-label": d.split_transaction_delete_split_btn,
|
|
665
693
|
color: "secondary",
|
|
666
694
|
onClick: () => {
|
|
667
|
-
|
|
695
|
+
s(h.ON_TRANSACTION_SPLIT_DELETE_CLICK), r(t);
|
|
668
696
|
},
|
|
669
697
|
sx: { w: 44, h: 44 },
|
|
670
698
|
children: /* @__PURE__ */ e(oe, {})
|
|
671
699
|
}
|
|
672
700
|
)
|
|
673
701
|
] }),
|
|
674
|
-
!c && /* @__PURE__ */
|
|
675
|
-
|
|
702
|
+
!c && /* @__PURE__ */ l(
|
|
703
|
+
b,
|
|
676
704
|
{
|
|
677
705
|
color: "error.main",
|
|
678
706
|
direction: "row",
|
|
679
|
-
gap:
|
|
680
|
-
py:
|
|
707
|
+
gap: n.Spacing.XSmall,
|
|
708
|
+
py: n.Spacing.Small,
|
|
681
709
|
children: [
|
|
682
|
-
/* @__PURE__ */ e(ie, { sx: { fontSize:
|
|
710
|
+
/* @__PURE__ */ e(ie, { sx: { fontSize: n.FontSize.Body } }),
|
|
683
711
|
/* @__PURE__ */ e(T, { variant: "Small", children: d.split_transaction_errors_enter_an_amount })
|
|
684
712
|
]
|
|
685
713
|
}
|
|
@@ -687,12 +715,12 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
687
715
|
] }) })
|
|
688
716
|
] }),
|
|
689
717
|
/* @__PURE__ */ e(
|
|
690
|
-
|
|
718
|
+
Oe,
|
|
691
719
|
{
|
|
692
720
|
initialSelected: o.category_guid,
|
|
693
|
-
onClose: () =>
|
|
721
|
+
onClose: () => p(!1),
|
|
694
722
|
onSelect: (y) => {
|
|
695
|
-
i(t, y),
|
|
723
|
+
i(t, y), p(!1);
|
|
696
724
|
},
|
|
697
725
|
showDrawer: m,
|
|
698
726
|
title: d.actions_select_a_category
|
|
@@ -701,48 +729,53 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
701
729
|
]
|
|
702
730
|
}
|
|
703
731
|
);
|
|
704
|
-
},
|
|
732
|
+
}, Nt = A(xt), It = ({
|
|
705
733
|
onAddSplit: t,
|
|
706
734
|
onCategoryChanged: r,
|
|
707
735
|
onDeleteSplit: i,
|
|
708
|
-
onUpdateAmount:
|
|
736
|
+
onUpdateAmount: a,
|
|
709
737
|
splits: o,
|
|
710
|
-
transaction:
|
|
738
|
+
transaction: n
|
|
711
739
|
}) => {
|
|
712
|
-
const
|
|
740
|
+
const s = ee(), { transactions: d } = x(), { onEvent: c } = L(), [u, m] = _.useState(""), { announce: p, ariaLive: g } = At();
|
|
713
741
|
return _.useEffect(() => {
|
|
714
|
-
|
|
715
|
-
|
|
742
|
+
if (o.length <= 1)
|
|
743
|
+
m(d.split_transaction_errors_min_splits), p(d.split_transaction_errors_min_splits);
|
|
744
|
+
else if (o[0].amount < 0) {
|
|
745
|
+
const S = se(
|
|
716
746
|
d.split_transaction_errors_totals_must_equal_amount,
|
|
717
|
-
te(
|
|
718
|
-
)
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
747
|
+
te(n.amount, "0,0.00")
|
|
748
|
+
);
|
|
749
|
+
m(S), p(S);
|
|
750
|
+
} else
|
|
751
|
+
m(""), p("");
|
|
752
|
+
}, [o]), /* @__PURE__ */ l(v, { className: "mx-txn-split-manager", children: [
|
|
753
|
+
o.map((S, y) => /* @__PURE__ */ e(
|
|
754
|
+
Nt,
|
|
723
755
|
{
|
|
724
|
-
index:
|
|
756
|
+
index: y,
|
|
725
757
|
onCategoryChanged: r,
|
|
726
758
|
onDeleteRow: i,
|
|
727
|
-
onUpdateAmount:
|
|
728
|
-
split:
|
|
759
|
+
onUpdateAmount: a,
|
|
760
|
+
split: S
|
|
729
761
|
},
|
|
730
|
-
|
|
762
|
+
y
|
|
731
763
|
)),
|
|
732
|
-
u && /* @__PURE__ */
|
|
733
|
-
|
|
764
|
+
u && /* @__PURE__ */ l(
|
|
765
|
+
b,
|
|
734
766
|
{
|
|
735
767
|
color: "error.main",
|
|
736
768
|
direction: "row",
|
|
737
|
-
gap:
|
|
738
|
-
p:
|
|
769
|
+
gap: s.Spacing.XSmall,
|
|
770
|
+
p: s.Spacing.Medium,
|
|
739
771
|
children: [
|
|
740
|
-
/* @__PURE__ */ e(ie, { sx: { fontSize:
|
|
741
|
-
/* @__PURE__ */ e(T, { variant: "Small", children: u })
|
|
772
|
+
/* @__PURE__ */ e(ie, { sx: { fontSize: s.FontSize.Body } }),
|
|
773
|
+
/* @__PURE__ */ e(T, { variant: "Small", children: u }),
|
|
774
|
+
g
|
|
742
775
|
]
|
|
743
776
|
}
|
|
744
777
|
),
|
|
745
|
-
/* @__PURE__ */ e(
|
|
778
|
+
/* @__PURE__ */ e(v, { p: s.Spacing.Medium, children: /* @__PURE__ */ e(
|
|
746
779
|
ce,
|
|
747
780
|
{
|
|
748
781
|
"aria-label": d.split_transaction_add_split_btn,
|
|
@@ -753,8 +786,8 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
753
786
|
}
|
|
754
787
|
) })
|
|
755
788
|
] });
|
|
756
|
-
},
|
|
757
|
-
const { onEvent: r } = L(), { splitTransaction: i, unSplitTransaction:
|
|
789
|
+
}, vt = A(It), Dt = ({ transaction: t }) => {
|
|
790
|
+
const { onEvent: r } = L(), { splitTransaction: i, unSplitTransaction: a } = w(), { common: o, transactions: n } = x(), { setShouldDisableDrawerScroll: s } = G(), { categories: d } = xe(), c = {
|
|
758
791
|
...t,
|
|
759
792
|
amount: t.amount - 1,
|
|
760
793
|
guid: "",
|
|
@@ -764,15 +797,15 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
764
797
|
...t,
|
|
765
798
|
amount: 1,
|
|
766
799
|
category_guid: void 0,
|
|
767
|
-
category:
|
|
800
|
+
category: n.split_transaction_select_category_btn,
|
|
768
801
|
guid: "",
|
|
769
802
|
has_been_split: !1,
|
|
770
803
|
parent_guid: t.guid,
|
|
771
804
|
top_level_category_guid: void 0
|
|
772
|
-
}, [m,
|
|
805
|
+
}, [m, p] = _.useState(!1), [g, S] = _.useState(!1), [y, N] = _.useState([]), f = () => {
|
|
773
806
|
const E = [...y];
|
|
774
807
|
E.push({ ...u }), E[0].amount -= 1, N(E);
|
|
775
|
-
},
|
|
808
|
+
}, k = (E) => {
|
|
776
809
|
if (E > 0) {
|
|
777
810
|
const H = y[E], O = [...y];
|
|
778
811
|
O.splice(E, 1), O[0].amount += H.amount, N(O);
|
|
@@ -780,7 +813,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
780
813
|
}, K = (E, H) => {
|
|
781
814
|
const O = [...y];
|
|
782
815
|
O[E].amount = H, O[0].amount = t.amount - O.reduce(
|
|
783
|
-
(j, me,
|
|
816
|
+
(j, me, ke) => j + (ke !== 0 ? me.amount : 0),
|
|
784
817
|
0
|
|
785
818
|
), N(O);
|
|
786
819
|
}, $ = (E, H) => {
|
|
@@ -793,57 +826,57 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
793
826
|
}, N(O));
|
|
794
827
|
}, I = () => {
|
|
795
828
|
if (t.parent_guid || t.has_been_split) {
|
|
796
|
-
|
|
829
|
+
S(!0);
|
|
797
830
|
return;
|
|
798
831
|
}
|
|
799
832
|
N([{ ...c }, { ...u }]), r(P.TRANSACTION_DETAILS_CLICK_SPLIT, {
|
|
800
833
|
transaction_guid: t.guid
|
|
801
|
-
}),
|
|
802
|
-
},
|
|
803
|
-
r(h.ON_TRANSACTION_SPLIT_SAVE_CLICK), await i({ ...t, has_been_split: !0 }, y),
|
|
834
|
+
}), p(!0);
|
|
835
|
+
}, R = async () => {
|
|
836
|
+
r(h.ON_TRANSACTION_SPLIT_SAVE_CLICK), await i({ ...t, has_been_split: !0 }, y), p(!1);
|
|
804
837
|
}, Y = async () => {
|
|
805
|
-
r(h.ON_TRANSACTION_SPLIT_CANCEL_CLICK), N([{ ...c }, { ...u }]),
|
|
838
|
+
r(h.ON_TRANSACTION_SPLIT_CANCEL_CLICK), N([{ ...c }, { ...u }]), p(!1);
|
|
806
839
|
}, _e = async () => {
|
|
807
840
|
r(P.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
|
|
808
841
|
transaction_guid: t.guid
|
|
809
842
|
});
|
|
810
843
|
const E = t.parent_guid ?? t.guid;
|
|
811
|
-
await
|
|
844
|
+
await a(E);
|
|
812
845
|
}, ue = _.useMemo(() => {
|
|
813
846
|
const E = y.some((O) => !O.category_guid), H = y.some((O) => O.amount <= 0);
|
|
814
847
|
return E || H;
|
|
815
848
|
}, [y]);
|
|
816
|
-
return /* @__PURE__ */
|
|
817
|
-
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
818
|
-
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
849
|
+
return /* @__PURE__ */ l(_.Fragment, { children: [
|
|
850
|
+
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(U, { onClick: I, children: [
|
|
851
|
+
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "call_split", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
819
852
|
/* @__PURE__ */ e(
|
|
820
853
|
M,
|
|
821
854
|
{
|
|
822
|
-
primary: t.has_been_split || t.parent_guid ?
|
|
823
|
-
secondary: t.has_been_split || t.parent_guid ?
|
|
855
|
+
primary: t.has_been_split || t.parent_guid ? n.split_transaction_unsplit_title : n.split_transaction_title,
|
|
856
|
+
secondary: t.has_been_split || t.parent_guid ? n.split_transaction_unsplit_subtitle : n.split_transaction_desc
|
|
824
857
|
}
|
|
825
858
|
),
|
|
826
|
-
/* @__PURE__ */ e(X, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(
|
|
859
|
+
/* @__PURE__ */ e(X, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(C, { name: "delete", weight: D.Dark }) : /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
827
860
|
] }) }),
|
|
828
|
-
/* @__PURE__ */
|
|
861
|
+
/* @__PURE__ */ l(
|
|
829
862
|
de,
|
|
830
863
|
{
|
|
831
864
|
ariaLabelClose: o.close_aria,
|
|
832
865
|
isOpen: m,
|
|
833
866
|
isPrimaryDisabled: ue,
|
|
834
867
|
onClose: Y,
|
|
835
|
-
onPrimaryAction:
|
|
868
|
+
onPrimaryAction: R,
|
|
836
869
|
primaryText: o.save_button,
|
|
837
870
|
secondaryText: o.cancel_button,
|
|
838
|
-
title:
|
|
871
|
+
title: n.split_transaction_title,
|
|
839
872
|
children: [
|
|
840
873
|
/* @__PURE__ */ e(Le, { transaction: t }),
|
|
841
874
|
/* @__PURE__ */ e(
|
|
842
|
-
|
|
875
|
+
vt,
|
|
843
876
|
{
|
|
844
|
-
onAddSplit:
|
|
877
|
+
onAddSplit: f,
|
|
845
878
|
onCategoryChanged: $,
|
|
846
|
-
onDeleteSplit:
|
|
879
|
+
onDeleteSplit: k,
|
|
847
880
|
onUpdateAmount: K,
|
|
848
881
|
splits: y,
|
|
849
882
|
transaction: t
|
|
@@ -855,10 +888,10 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
855
888
|
/* @__PURE__ */ e(
|
|
856
889
|
V,
|
|
857
890
|
{
|
|
858
|
-
copy: { title:
|
|
859
|
-
isOpen:
|
|
891
|
+
copy: { title: n.split_transaction_unsplit_title },
|
|
892
|
+
isOpen: g,
|
|
860
893
|
onClose: () => {
|
|
861
|
-
|
|
894
|
+
s(!1), S(!1);
|
|
862
895
|
},
|
|
863
896
|
onPrimaryAction: _e,
|
|
864
897
|
onSecondaryAction: () => {
|
|
@@ -867,29 +900,29 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
867
900
|
primaryText: o.delete_button,
|
|
868
901
|
secondaryText: o.cancel_button,
|
|
869
902
|
children: /* @__PURE__ */ e(le, { variant: "Paragraph", children: se(
|
|
870
|
-
|
|
903
|
+
n.split_transaction_unsplit_description,
|
|
871
904
|
t.description
|
|
872
905
|
) })
|
|
873
906
|
}
|
|
874
907
|
)
|
|
875
908
|
] });
|
|
876
|
-
},
|
|
877
|
-
const t =
|
|
909
|
+
}, wt = A(Dt), Et = () => {
|
|
910
|
+
const t = De(), { onEvent: r } = L(), { addTag: i } = w(), { transactions: a } = x(), [o, n] = _.useState(!1), [s, d] = _.useState(""), [c, u] = _.useState(""), m = _.useRef(null);
|
|
878
911
|
_.useEffect(() => {
|
|
879
912
|
o && m?.current?.focus();
|
|
880
913
|
}, [o]);
|
|
881
|
-
const
|
|
914
|
+
const p = () => {
|
|
882
915
|
r(
|
|
883
916
|
o ? h.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK : h.ON_TRANSACTION_TAGS_TAG_ADD_CLICK
|
|
884
|
-
), o || d(""),
|
|
885
|
-
},
|
|
886
|
-
r(h.ON_TRANSACTION_TAGS_TAG_ADDED), await i(
|
|
917
|
+
), o || d(""), n(!o);
|
|
918
|
+
}, g = async () => {
|
|
919
|
+
r(h.ON_TRANSACTION_TAGS_TAG_ADDED), await i(s), n(!1);
|
|
887
920
|
};
|
|
888
921
|
return _.useEffect(() => {
|
|
889
|
-
u(
|
|
890
|
-
}, [
|
|
891
|
-
/* @__PURE__ */
|
|
892
|
-
|
|
922
|
+
u(s.length > 40 ? a.tags_error_name_must_be_40_chars : "");
|
|
923
|
+
}, [s]), /* @__PURE__ */ l(v, { className: "mx-txn-tag-manager-header", children: [
|
|
924
|
+
/* @__PURE__ */ l(
|
|
925
|
+
b,
|
|
893
926
|
{
|
|
894
927
|
alignItems: "center",
|
|
895
928
|
bgcolor: t.palette.background.default,
|
|
@@ -898,37 +931,37 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
898
931
|
px: 24,
|
|
899
932
|
py: 16,
|
|
900
933
|
children: [
|
|
901
|
-
/* @__PURE__ */ e(T, { bold: !0, children:
|
|
934
|
+
/* @__PURE__ */ e(T, { bold: !0, children: a.tags_your_tags }),
|
|
902
935
|
/* @__PURE__ */ e(
|
|
903
936
|
ce,
|
|
904
937
|
{
|
|
905
938
|
"aria-expanded": o,
|
|
906
|
-
"aria-label":
|
|
907
|
-
onClick:
|
|
908
|
-
children:
|
|
939
|
+
"aria-label": a.tags_add_tag_btn_aria,
|
|
940
|
+
onClick: p,
|
|
941
|
+
children: a.tags_add_tag_btn
|
|
909
942
|
}
|
|
910
943
|
)
|
|
911
944
|
]
|
|
912
945
|
}
|
|
913
946
|
),
|
|
914
|
-
/* @__PURE__ */
|
|
947
|
+
/* @__PURE__ */ l(
|
|
915
948
|
V,
|
|
916
949
|
{
|
|
917
|
-
copy: { title:
|
|
950
|
+
copy: { title: a.tags_add_tag_btn },
|
|
918
951
|
isOpen: o,
|
|
919
|
-
onClose: () =>
|
|
920
|
-
onPrimaryAction:
|
|
921
|
-
onSecondaryAction: () =>
|
|
952
|
+
onClose: () => n(!1),
|
|
953
|
+
onPrimaryAction: g,
|
|
954
|
+
onSecondaryAction: () => n(!1),
|
|
922
955
|
children: [
|
|
923
956
|
/* @__PURE__ */ e(
|
|
924
957
|
Te,
|
|
925
958
|
{
|
|
926
|
-
"aria-label":
|
|
959
|
+
"aria-label": a.tags_placeholder,
|
|
927
960
|
name: "add-tag",
|
|
928
|
-
onChange: (
|
|
929
|
-
placeholder:
|
|
961
|
+
onChange: (S) => d(S.target.value),
|
|
962
|
+
placeholder: a.tags_placeholder,
|
|
930
963
|
sx: { width: "100%" },
|
|
931
|
-
value:
|
|
964
|
+
value: s
|
|
932
965
|
}
|
|
933
966
|
),
|
|
934
967
|
/* @__PURE__ */ e(le, { id: "add-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: c })
|
|
@@ -936,51 +969,51 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
936
969
|
}
|
|
937
970
|
)
|
|
938
971
|
] });
|
|
939
|
-
}, Ot =
|
|
940
|
-
const { common: i, transactions:
|
|
972
|
+
}, Ot = A(Et), Lt = ({ onSearchValueChanged: t, searchValue: r }) => {
|
|
973
|
+
const { common: i, transactions: a } = x(), o = ee(), n = /* @__PURE__ */ e(
|
|
941
974
|
Q,
|
|
942
975
|
{
|
|
943
|
-
"aria-label":
|
|
976
|
+
"aria-label": a.tags_cancel_search || "Search",
|
|
944
977
|
onClick: () => t(""),
|
|
945
978
|
children: /* @__PURE__ */ e(ie, {})
|
|
946
979
|
}
|
|
947
980
|
);
|
|
948
|
-
return /* @__PURE__ */ e(
|
|
981
|
+
return /* @__PURE__ */ e(v, { className: "mx-txn-tag-manager-search", px: o.Spacing.Large, py: o.Spacing.Medium, children: /* @__PURE__ */ e(
|
|
949
982
|
Te,
|
|
950
983
|
{
|
|
951
984
|
InputProps: {
|
|
952
985
|
startAdornment: /* @__PURE__ */ e(ye, { position: "start", children: /* @__PURE__ */ e(Xe, { color: "disabled" }) }),
|
|
953
|
-
endAdornment: /* @__PURE__ */ e(ye, { position: "end", sx: { padding: 0 }, children: r ?
|
|
986
|
+
endAdornment: /* @__PURE__ */ e(ye, { position: "end", sx: { padding: 0 }, children: r ? n : null })
|
|
954
987
|
},
|
|
955
988
|
"aria-label": i.search_aria,
|
|
956
989
|
name: "search",
|
|
957
|
-
onChange: (
|
|
990
|
+
onChange: (s) => t(s.target.value),
|
|
958
991
|
placeholder: i.search_placeholder,
|
|
959
992
|
sx: { bgcolor: "background.paper", width: "100%" },
|
|
960
993
|
value: r
|
|
961
994
|
}
|
|
962
995
|
) });
|
|
963
|
-
},
|
|
964
|
-
const { onEvent:
|
|
965
|
-
|
|
966
|
-
},
|
|
967
|
-
|
|
996
|
+
}, kt = A(Lt), Rt = ({ onTagChecked: t, selectedTags: r, tag: i }) => {
|
|
997
|
+
const { onEvent: a } = L(), { removeTag: o, updateTag: n } = w(), { common: s, transactions: d } = x(), [c, u] = _.useState(!1), [m, p] = _.useState(!1), [g, S] = _.useState(""), [y, N] = _.useState(""), f = async () => {
|
|
998
|
+
a(h.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await n({ ...i, name: g }), u(!1);
|
|
999
|
+
}, k = async () => {
|
|
1000
|
+
a(h.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid), p(!1);
|
|
968
1001
|
};
|
|
969
1002
|
_.useEffect(() => {
|
|
970
|
-
N(
|
|
971
|
-
}, [
|
|
1003
|
+
N(g.length > 40 ? d.tags_error_name_must_be_40_chars : "");
|
|
1004
|
+
}, [g]);
|
|
972
1005
|
const K = () => {
|
|
973
|
-
|
|
1006
|
+
a(h.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), S(i.name), u(!0);
|
|
974
1007
|
}, $ = () => {
|
|
975
|
-
|
|
1008
|
+
a(h.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), p(!0);
|
|
976
1009
|
};
|
|
977
|
-
return /* @__PURE__ */
|
|
1010
|
+
return /* @__PURE__ */ l(
|
|
978
1011
|
F,
|
|
979
1012
|
{
|
|
980
1013
|
className: "mx-txn-transaction-manager-row",
|
|
981
1014
|
disableGutters: !0,
|
|
982
1015
|
disablePadding: !0,
|
|
983
|
-
secondaryAction: !i.is_default_tag && /* @__PURE__ */
|
|
1016
|
+
secondaryAction: !i.is_default_tag && /* @__PURE__ */ l(b, { direction: "row", children: [
|
|
984
1017
|
/* @__PURE__ */ e(
|
|
985
1018
|
Q,
|
|
986
1019
|
{
|
|
@@ -1001,7 +1034,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1001
1034
|
)
|
|
1002
1035
|
] }),
|
|
1003
1036
|
children: [
|
|
1004
|
-
/* @__PURE__ */
|
|
1037
|
+
/* @__PURE__ */ l(
|
|
1005
1038
|
U,
|
|
1006
1039
|
{
|
|
1007
1040
|
"aria-checked": r.includes(i.guid),
|
|
@@ -1013,13 +1046,13 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1013
1046
|
]
|
|
1014
1047
|
}
|
|
1015
1048
|
),
|
|
1016
|
-
/* @__PURE__ */
|
|
1049
|
+
/* @__PURE__ */ l(
|
|
1017
1050
|
V,
|
|
1018
1051
|
{
|
|
1019
1052
|
copy: { title: "Update tag name" },
|
|
1020
1053
|
isOpen: c,
|
|
1021
1054
|
onClose: () => u(!1),
|
|
1022
|
-
onPrimaryAction:
|
|
1055
|
+
onPrimaryAction: f,
|
|
1023
1056
|
onSecondaryAction: () => u(!1),
|
|
1024
1057
|
children: [
|
|
1025
1058
|
/* @__PURE__ */ e(
|
|
@@ -1028,10 +1061,10 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1028
1061
|
"aria-describedby": y ? "update-tag-error" : void 0,
|
|
1029
1062
|
"aria-label": d.tags_update_the_tag_name,
|
|
1030
1063
|
name: "update-tag",
|
|
1031
|
-
onChange: (I) =>
|
|
1064
|
+
onChange: (I) => S(I.target.value),
|
|
1032
1065
|
placeholder: "Tag name",
|
|
1033
1066
|
sx: { width: "100%" },
|
|
1034
|
-
value:
|
|
1067
|
+
value: g
|
|
1035
1068
|
}
|
|
1036
1069
|
),
|
|
1037
1070
|
/* @__PURE__ */ e(le, { id: "update-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: y })
|
|
@@ -1043,107 +1076,107 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1043
1076
|
{
|
|
1044
1077
|
copy: { title: d.tags_delete_title },
|
|
1045
1078
|
isOpen: m,
|
|
1046
|
-
onClose: () =>
|
|
1047
|
-
onPrimaryAction:
|
|
1048
|
-
onSecondaryAction: () =>
|
|
1049
|
-
primaryText:
|
|
1050
|
-
secondaryText:
|
|
1079
|
+
onClose: () => p(!1),
|
|
1080
|
+
onPrimaryAction: k,
|
|
1081
|
+
onSecondaryAction: () => a(h.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
|
|
1082
|
+
primaryText: s.delete_button,
|
|
1083
|
+
secondaryText: s.cancel_button,
|
|
1051
1084
|
children: /* @__PURE__ */ e(T, { truncate: !1, children: d.tags_deleting_this_tag_will_remove_it })
|
|
1052
1085
|
}
|
|
1053
1086
|
)
|
|
1054
1087
|
]
|
|
1055
1088
|
}
|
|
1056
1089
|
);
|
|
1057
|
-
},
|
|
1058
|
-
const { tags: i } =
|
|
1059
|
-
(
|
|
1090
|
+
}, Pt = A(Rt), Gt = ({ selectedTags: t, onTagChecked: r }) => {
|
|
1091
|
+
const { tags: i } = w(), [a, o] = _.useState(""), n = i.filter(
|
|
1092
|
+
(s) => s.name.toLowerCase().includes(a.toLowerCase())
|
|
1060
1093
|
);
|
|
1061
|
-
return /* @__PURE__ */
|
|
1094
|
+
return /* @__PURE__ */ l("div", { className: "mx-txn-tag-manager", children: [
|
|
1062
1095
|
/* @__PURE__ */ e(
|
|
1063
|
-
|
|
1096
|
+
kt,
|
|
1064
1097
|
{
|
|
1065
|
-
onSearchValueChanged: (
|
|
1066
|
-
searchValue:
|
|
1098
|
+
onSearchValueChanged: (s) => o(s),
|
|
1099
|
+
searchValue: a
|
|
1067
1100
|
}
|
|
1068
1101
|
),
|
|
1069
1102
|
/* @__PURE__ */ e(Ot, {}),
|
|
1070
|
-
/* @__PURE__ */ e(ne, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(J, { children:
|
|
1071
|
-
/* @__PURE__ */ e(
|
|
1103
|
+
/* @__PURE__ */ e(ne, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(J, { children: n.map((s) => /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1104
|
+
/* @__PURE__ */ e(Pt, { onTagChecked: r, selectedTags: t, tag: s }),
|
|
1072
1105
|
/* @__PURE__ */ e(Z, { sx: { ml: 24 } })
|
|
1073
|
-
] },
|
|
1106
|
+
] }, s.guid)) }) })
|
|
1074
1107
|
] });
|
|
1075
|
-
},
|
|
1076
|
-
const { onEvent: r } = L(), { tags: i, updateTaggings:
|
|
1108
|
+
}, Mt = A(Gt), Kt = ({ transaction: t }) => {
|
|
1109
|
+
const { onEvent: r } = L(), { tags: i, updateTaggings: a, updateTransaction: o } = w(), { common: n, transactions: s } = x(), { updateManualTransaction: d } = G(), [c, u] = _.useState(!1), [m, p] = _.useState(t.tags);
|
|
1077
1110
|
_.useEffect(() => {
|
|
1078
|
-
|
|
1111
|
+
p(t.tags);
|
|
1079
1112
|
}, [c, t]);
|
|
1080
|
-
const
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1083
|
-
},
|
|
1113
|
+
const g = (N) => {
|
|
1114
|
+
const f = [...m], k = m.indexOf(N);
|
|
1115
|
+
k >= 0 ? f.splice(k, 1) : f.push(N), p(f);
|
|
1116
|
+
}, S = async () => {
|
|
1084
1117
|
if (t.is_manual && !t.guid) {
|
|
1085
1118
|
d({ ...t, tags: m }), u(!1);
|
|
1086
1119
|
return;
|
|
1087
1120
|
}
|
|
1088
|
-
await
|
|
1121
|
+
await a(m, t.guid), await o({ ...t, tags: m }), r(P.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), u(!1);
|
|
1089
1122
|
}, y = _.useMemo(
|
|
1090
1123
|
() => t.tags.map(
|
|
1091
|
-
(N,
|
|
1124
|
+
(N, f, k) => `${i.find((K) => K.guid === N)?.name}${f < k.length - 1 ? " / " : ""}`
|
|
1092
1125
|
),
|
|
1093
1126
|
[i, t]
|
|
1094
1127
|
);
|
|
1095
|
-
return /* @__PURE__ */
|
|
1096
|
-
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
1128
|
+
return /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1129
|
+
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
1097
1130
|
U,
|
|
1098
1131
|
{
|
|
1099
1132
|
onClick: () => {
|
|
1100
1133
|
r(h.ON_TRANSACTION_TAGS_CLICK), u(!0);
|
|
1101
1134
|
},
|
|
1102
1135
|
children: [
|
|
1103
|
-
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
1136
|
+
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "local_offer", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
1104
1137
|
/* @__PURE__ */ e(
|
|
1105
1138
|
M,
|
|
1106
1139
|
{
|
|
1107
|
-
primary:
|
|
1140
|
+
primary: s.tags_title,
|
|
1108
1141
|
primaryTypographyProps: { variant: "XSmall" },
|
|
1109
|
-
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length > 0 ? y :
|
|
1142
|
+
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length > 0 ? y : s.tags_desc })
|
|
1110
1143
|
}
|
|
1111
1144
|
),
|
|
1112
|
-
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
|
|
1145
|
+
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
1113
1146
|
]
|
|
1114
1147
|
}
|
|
1115
1148
|
) }),
|
|
1116
1149
|
/* @__PURE__ */ e(
|
|
1117
1150
|
de,
|
|
1118
1151
|
{
|
|
1119
|
-
ariaLabelClose:
|
|
1152
|
+
ariaLabelClose: n.close_aria,
|
|
1120
1153
|
isOpen: c,
|
|
1121
1154
|
onClose: () => u(!1),
|
|
1122
|
-
onPrimaryAction:
|
|
1123
|
-
primaryText:
|
|
1124
|
-
secondaryText:
|
|
1125
|
-
title:
|
|
1126
|
-
children: /* @__PURE__ */ e(
|
|
1155
|
+
onPrimaryAction: S,
|
|
1156
|
+
primaryText: n.save_button,
|
|
1157
|
+
secondaryText: n.cancel_button,
|
|
1158
|
+
title: s.tags_title,
|
|
1159
|
+
children: /* @__PURE__ */ e(Mt, { onTagChecked: g, selectedTags: m })
|
|
1127
1160
|
}
|
|
1128
1161
|
)
|
|
1129
1162
|
] });
|
|
1130
|
-
},
|
|
1131
|
-
const { updateTransaction: i } =
|
|
1163
|
+
}, $t = A(Kt), Bt = ({ transaction: t, viewOnly: r = !1 }) => {
|
|
1164
|
+
const { updateTransaction: i } = w(), { common: a, transactions: o } = x(), { onEvent: n } = L(), [s, d] = _.useState(!1), [c, u] = _.useState(""), m = _.useRef(null);
|
|
1132
1165
|
_.useEffect(() => {
|
|
1133
|
-
|
|
1134
|
-
}, [
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1166
|
+
s && (u(t.description), m?.current?.focus());
|
|
1167
|
+
}, [s]);
|
|
1168
|
+
const p = async () => {
|
|
1169
|
+
n(P.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
|
|
1137
1170
|
transaction_guid: t.guid
|
|
1138
1171
|
}), await i({ ...t, description: c }), d(!1);
|
|
1139
1172
|
};
|
|
1140
|
-
return /* @__PURE__ */ e(
|
|
1173
|
+
return /* @__PURE__ */ e(v, { className: "mx-txn-transaction-description", children: s ? /* @__PURE__ */ l(je, { row: !0, children: [
|
|
1141
1174
|
/* @__PURE__ */ e(
|
|
1142
|
-
|
|
1175
|
+
ve,
|
|
1143
1176
|
{
|
|
1144
1177
|
"aria-label": o.description_add_a_subcategory,
|
|
1145
1178
|
name: "add-subcategory",
|
|
1146
|
-
onChange: (
|
|
1179
|
+
onChange: (g) => u(g.target.value),
|
|
1147
1180
|
ref: m,
|
|
1148
1181
|
sx: {
|
|
1149
1182
|
backgroundColor: "background.paper",
|
|
@@ -1158,29 +1191,29 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1158
1191
|
ce,
|
|
1159
1192
|
{
|
|
1160
1193
|
disabled: !c,
|
|
1161
|
-
onClick:
|
|
1194
|
+
onClick: p,
|
|
1162
1195
|
sx: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
|
|
1163
1196
|
variant: "outlined",
|
|
1164
|
-
children:
|
|
1197
|
+
children: a.save_button
|
|
1165
1198
|
}
|
|
1166
1199
|
)
|
|
1167
|
-
] }) : /* @__PURE__ */
|
|
1200
|
+
] }) : /* @__PURE__ */ l(b, { alignItems: "center", direction: "row", gap: 4, sx: { minHeight: 44 }, children: [
|
|
1168
1201
|
/* @__PURE__ */ e(T, { bold: !0, children: t.description }),
|
|
1169
1202
|
!r && /* @__PURE__ */ e(
|
|
1170
1203
|
Q,
|
|
1171
1204
|
{
|
|
1172
1205
|
"aria-label": o.description_edit_transaction_name,
|
|
1173
1206
|
onClick: () => {
|
|
1174
|
-
d(!0),
|
|
1207
|
+
d(!0), n(h.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK);
|
|
1175
1208
|
},
|
|
1176
1209
|
sx: { color: "action.active" },
|
|
1177
|
-
children: /* @__PURE__ */ e(
|
|
1210
|
+
children: /* @__PURE__ */ e(C, { name: "create", size: 22 })
|
|
1178
1211
|
}
|
|
1179
1212
|
)
|
|
1180
1213
|
] }) });
|
|
1181
|
-
},
|
|
1182
|
-
const { updateTransaction: r } =
|
|
1183
|
-
|
|
1214
|
+
}, Ft = A(Bt), Ht = ({ transaction: t }) => {
|
|
1215
|
+
const { updateTransaction: r } = w(), { transactions: i } = x(), { onEvent: a } = L(), o = De(), n = async () => {
|
|
1216
|
+
a(P.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await r({ ...t, is_flagged: !t.is_flagged });
|
|
1184
1217
|
};
|
|
1185
1218
|
return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
|
|
1186
1219
|
qe,
|
|
@@ -1188,7 +1221,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1188
1221
|
"aria-label": i.flag_btn_aria,
|
|
1189
1222
|
"aria-pressed": t.is_flagged,
|
|
1190
1223
|
color: "warning",
|
|
1191
|
-
onClick:
|
|
1224
|
+
onClick: n,
|
|
1192
1225
|
selected: t.is_flagged,
|
|
1193
1226
|
sx: {
|
|
1194
1227
|
borderRadius: 6,
|
|
@@ -1210,8 +1243,8 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1210
1243
|
children: /* @__PURE__ */ e(We, { color: "inherit" })
|
|
1211
1244
|
}
|
|
1212
1245
|
) });
|
|
1213
|
-
},
|
|
1214
|
-
/* @__PURE__ */
|
|
1246
|
+
}, zt = A(Ht), ae = (t, r, i, a = !0, o = "inset") => a ? /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1247
|
+
/* @__PURE__ */ l(F, { disableGutters: !0, disablePadding: !0, children: [
|
|
1215
1248
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: t }) }),
|
|
1216
1249
|
/* @__PURE__ */ e(
|
|
1217
1250
|
M,
|
|
@@ -1223,12 +1256,12 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1223
1256
|
)
|
|
1224
1257
|
] }),
|
|
1225
1258
|
/* @__PURE__ */ e(Z, { variant: o })
|
|
1226
|
-
] }) : null,
|
|
1227
|
-
const { transactions: r } =
|
|
1228
|
-
const o = new Map(i.map((
|
|
1229
|
-
return t.tags.map((
|
|
1259
|
+
] }) : null, Ut = ({ transaction: t }) => {
|
|
1260
|
+
const { transactions: r } = x(), { tags: i } = w(), a = _.useMemo(() => {
|
|
1261
|
+
const o = new Map(i.map((n) => [n.guid, n.name]));
|
|
1262
|
+
return t.tags.map((n) => o.get(n)).filter(Boolean).join(" / ");
|
|
1230
1263
|
}, [i, t.tags]);
|
|
1231
|
-
return /* @__PURE__ */
|
|
1264
|
+
return /* @__PURE__ */ l(J, { sx: { "& .MuiListItem-root": { px: 24, py: 12 } }, children: [
|
|
1232
1265
|
ae(
|
|
1233
1266
|
/* @__PURE__ */ e(
|
|
1234
1267
|
he,
|
|
@@ -1243,93 +1276,94 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1243
1276
|
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.category ?? r.actions_select_a_category })
|
|
1244
1277
|
),
|
|
1245
1278
|
ae(
|
|
1246
|
-
/* @__PURE__ */ e(
|
|
1279
|
+
/* @__PURE__ */ e(C, { name: "calendar_month", sx: { color: "text.primary" }, weight: D.Dark }),
|
|
1247
1280
|
r.date_title,
|
|
1248
|
-
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children:
|
|
1281
|
+
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: we(W(t.date), Ee.YEAR_MONTH_DAY) })
|
|
1249
1282
|
),
|
|
1250
1283
|
ae(
|
|
1251
|
-
/* @__PURE__ */ e(
|
|
1284
|
+
/* @__PURE__ */ e(C, { name: "article", sx: { color: "text.primary" }, weight: D.Dark }),
|
|
1252
1285
|
r.memo_title,
|
|
1253
1286
|
/* @__PURE__ */ e(T, { bold: !0, sx: { overflowWrap: "break-word", whiteSpace: "wrap" }, variant: "Body", children: t.memo ?? r.memo_desc }),
|
|
1254
1287
|
!!t.memo,
|
|
1255
1288
|
t.tags?.length > 0 ? "inset" : "fullWidth"
|
|
1256
1289
|
),
|
|
1257
1290
|
ae(
|
|
1258
|
-
/* @__PURE__ */ e(
|
|
1291
|
+
/* @__PURE__ */ e(C, { name: "local_offer", sx: { color: "text.primary" }, weight: D.Dark }),
|
|
1259
1292
|
r.tags_title,
|
|
1260
|
-
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length ?
|
|
1293
|
+
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length ? a : r.tags_desc }),
|
|
1261
1294
|
!!t.tags?.length,
|
|
1262
1295
|
"fullWidth"
|
|
1263
1296
|
)
|
|
1264
1297
|
] });
|
|
1265
|
-
},
|
|
1298
|
+
}, Xt = A(Ut), Vt = ({
|
|
1266
1299
|
bottomActions: t = at,
|
|
1267
1300
|
canFlagTransaction: r = !0,
|
|
1268
1301
|
topActions: i = tt,
|
|
1269
|
-
transaction:
|
|
1302
|
+
transaction: a
|
|
1270
1303
|
}) => {
|
|
1271
|
-
const { onEvent: o } = L(), { isCopyLoaded:
|
|
1304
|
+
const { onEvent: o } = L(), { isCopyLoaded: n } = Fe(), { userFeatures: s } = He(), d = a?.number && a.number.length > 4;
|
|
1272
1305
|
if (_.useEffect(
|
|
1273
|
-
() => o(P.TRANSACTION_DETAILS_VIEW, { transaction_guid:
|
|
1306
|
+
() => o(P.TRANSACTION_DETAILS_VIEW, { transaction_guid: a.guid }),
|
|
1274
1307
|
[]
|
|
1275
|
-
), !
|
|
1308
|
+
), !n)
|
|
1276
1309
|
return /* @__PURE__ */ e(Ie, {});
|
|
1277
|
-
const c = $e(
|
|
1278
|
-
return /* @__PURE__ */ e(
|
|
1279
|
-
/* @__PURE__ */
|
|
1310
|
+
const c = $e(s, "MX_TXN_DETAILS_VIEW_ONLY");
|
|
1311
|
+
return /* @__PURE__ */ e(v, { className: "mx-txn-transaction-details", width: "100%", children: a && /* @__PURE__ */ l(b, { children: [
|
|
1312
|
+
/* @__PURE__ */ l(b, { gap: 12, p: 24, children: [
|
|
1280
1313
|
/* @__PURE__ */ e(ne, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
|
|
1281
|
-
|
|
1314
|
+
ge,
|
|
1282
1315
|
{
|
|
1283
|
-
categoryGuid:
|
|
1284
|
-
merchantGuid:
|
|
1316
|
+
categoryGuid: a.top_level_category_guid || "",
|
|
1317
|
+
merchantGuid: a.merchant_guid || "",
|
|
1285
1318
|
size: 64
|
|
1286
1319
|
}
|
|
1287
1320
|
) }),
|
|
1288
|
-
/* @__PURE__ */ e(
|
|
1289
|
-
/* @__PURE__ */
|
|
1290
|
-
/* @__PURE__ */
|
|
1291
|
-
|
|
1292
|
-
te(
|
|
1321
|
+
/* @__PURE__ */ e(Ft, { transaction: a, viewOnly: c }),
|
|
1322
|
+
/* @__PURE__ */ l(b, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
|
|
1323
|
+
/* @__PURE__ */ l(Ae, { color: a.isIncome ? "success.main" : "text.primary", children: [
|
|
1324
|
+
a.isIncome ? "+" : "",
|
|
1325
|
+
te(a.amount, "0,0.00")
|
|
1293
1326
|
] }),
|
|
1294
|
-
!c && r && /* @__PURE__ */ e(
|
|
1327
|
+
!c && r && /* @__PURE__ */ e(zt, { transaction: a })
|
|
1295
1328
|
] }),
|
|
1296
|
-
/* @__PURE__ */
|
|
1297
|
-
/* @__PURE__ */ e(T, { bold: !0, children: `${
|
|
1298
|
-
${d ?
|
|
1299
|
-
/* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Tiny", children:
|
|
1329
|
+
/* @__PURE__ */ l(b, { bgcolor: "background.highlight", borderRadius: "12px", gap: 4, p: 8, children: [
|
|
1330
|
+
/* @__PURE__ */ e(T, { bold: !0, children: `${a.account}
|
|
1331
|
+
${d ? a.number : "•".repeat(4).concat(a.number ?? "")}` }),
|
|
1332
|
+
/* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Tiny", children: a.feed_description })
|
|
1300
1333
|
] })
|
|
1301
1334
|
] }),
|
|
1302
|
-
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: c ? /* @__PURE__ */ e(
|
|
1303
|
-
u === q.Category && /* @__PURE__ */ e(mt, { transaction:
|
|
1304
|
-
u === q.Date && /* @__PURE__ */ e(
|
|
1305
|
-
u === q.Memo && /* @__PURE__ */ e(bt, { transaction:
|
|
1306
|
-
u === q.Tags && /* @__PURE__ */ e(
|
|
1335
|
+
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: c ? /* @__PURE__ */ e(Xt, { transaction: a }) : /* @__PURE__ */ e(J, { children: i.map((u, m) => /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1336
|
+
u === q.Category && /* @__PURE__ */ e(mt, { transaction: a }),
|
|
1337
|
+
u === q.Date && /* @__PURE__ */ e(pt, { transaction: a }),
|
|
1338
|
+
u === q.Memo && /* @__PURE__ */ e(bt, { transaction: a }),
|
|
1339
|
+
u === q.Tags && /* @__PURE__ */ e($t, { transaction: a }),
|
|
1307
1340
|
/* @__PURE__ */ e(Z, { variant: m < i.length - 1 ? "inset" : "fullWidth" })
|
|
1308
1341
|
] }, u)) }) }),
|
|
1309
|
-
!c && t.length > 0 && /* @__PURE__ */
|
|
1342
|
+
!c && t.length > 0 && /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1310
1343
|
/* @__PURE__ */ e(T, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "Body", children: "Actions" }),
|
|
1311
|
-
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */
|
|
1312
|
-
t.map((u, m) => /* @__PURE__ */
|
|
1313
|
-
u === re.SplitTransaction && /* @__PURE__ */ e(
|
|
1314
|
-
u === re.HideTransaction && /* @__PURE__ */ e(Ct, { transaction:
|
|
1315
|
-
u === re.MerchantLogo && /* @__PURE__ */ e(yt, { transaction:
|
|
1344
|
+
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ l(J, { children: [
|
|
1345
|
+
t.map((u, m) => /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1346
|
+
u === re.SplitTransaction && /* @__PURE__ */ e(wt, { transaction: a }),
|
|
1347
|
+
u === re.HideTransaction && /* @__PURE__ */ e(Ct, { transaction: a }),
|
|
1348
|
+
u === re.MerchantLogo && /* @__PURE__ */ e(yt, { transaction: a }),
|
|
1316
1349
|
/* @__PURE__ */ e(Z, { variant: m < t.length - 1 ? "inset" : "fullWidth" })
|
|
1317
1350
|
] }, u)),
|
|
1318
|
-
|
|
1351
|
+
a.is_manual && !a.parent_guid && !a.has_been_split && /* @__PURE__ */ e(ht, { transaction: a })
|
|
1319
1352
|
] }) })
|
|
1320
1353
|
] })
|
|
1321
1354
|
] }) });
|
|
1322
|
-
},
|
|
1355
|
+
}, Pa = A(Vt);
|
|
1323
1356
|
export {
|
|
1324
1357
|
re as B,
|
|
1325
1358
|
mt as C,
|
|
1326
|
-
|
|
1359
|
+
pt as D,
|
|
1327
1360
|
bt as M,
|
|
1328
1361
|
lt as S,
|
|
1329
1362
|
Ra as T,
|
|
1330
|
-
|
|
1363
|
+
Pa as a,
|
|
1331
1364
|
st as b,
|
|
1332
|
-
|
|
1333
|
-
|
|
1365
|
+
At as c,
|
|
1366
|
+
$t as d,
|
|
1367
|
+
q as e,
|
|
1334
1368
|
G as u
|
|
1335
1369
|
};
|