@@ -347,9 +369,7 @@
|
- {{ getDisplayAmount(transaction.sourceAmount, transaction.sourceAccount.currency, transaction.hideAmount) }}
- {{ getDisplayAmount(transaction.destinationAmount, transaction.destinationAccount.currency, transaction.hideAmount) }}
-
+ {{ getTransactionDisplayAmount(transaction) }}
|
@@ -431,12 +451,14 @@ import {
transactionTypeToCategoryType
} from '@/lib/category.js';
import { getUnifiedSelectedAccountsCurrencyOrDefaultCurrency } from '@/lib/account.js';
+import { getTransactionDisplayAmount } from '@/lib/transaction.js';
import { scrollToSelectedItem } from '@/lib/ui.desktop.js';
import {
mdiMagnify,
mdiCheck,
- mdiTextBoxCheckOutline,
+ mdiViewGridOutline,
+ mdiVectorArrangeBelow,
mdiRefresh,
mdiMenu,
mdiMenuDown,
@@ -485,7 +507,8 @@ export default {
icons: {
search: mdiMagnify,
check: mdiCheck,
- all: mdiTextBoxCheckOutline,
+ all: mdiViewGridOutline,
+ multiple: mdiVectorArrangeBelow,
refresh: mdiRefresh,
menu: mdiMenu,
dropdownMenu: mdiMenuDown,
@@ -502,11 +525,7 @@ export default {
return getUnifiedSelectedAccountsCurrencyOrDefaultCurrency(this.allAccounts, this.queryAllFilterAccountIds, this.userStore.currentUserDefaultCurrency);
},
canAddTransaction() {
- if (this.queryAllFilterCategoryIdsCount > 1 || this.queryAllFilterAccountIdsCount > 1) {
- return false;
- }
-
- if (this.query.accountIds) {
+ if (this.query.accountIds && this.queryAllFilterAccountIdsCount === 1) {
const account = this.allAccounts[this.query.accountIds];
if (account && account.type === accountConstants.allAccountTypes.MultiSubAccounts) {
@@ -1040,14 +1059,20 @@ export default {
this.currentPageTransactions = [];
this.transactionsStore.clearTransactions();
this.$router.push(this.getFilterLinkUrl());
+ },
+ showMultipleCategoriesDialog() {
+
+ },
+ showMultipleAccountsDialog() {
+
},
add() {
const self = this;
self.$refs.editDialog.open({
type: self.query.type,
- categoryId: self.query.categoryIds,
- accountId: self.query.accountIds
+ categoryId: self.queryAllFilterCategoryIdsCount === 1 ? self.query.categoryIds : '',
+ accountId: self.queryAllFilterAccountIdsCount === 1 ? self.query.accountIds : ''
}).then(result => {
if (result && result.message) {
self.$refs.snackbar.showMessage(result.message);
@@ -1134,13 +1159,6 @@ export default {
getDisplayTimezone(transaction) {
return `UTC${getUtcOffsetByUtcOffsetMinutes(transaction.utcOffset)}`;
},
- getDisplayAmount(amount, currency, hideAmount) {
- if (hideAmount) {
- return this.getDisplayCurrency('***', currency);
- }
-
- return this.getDisplayCurrency(amount, currency);
- },
getDisplayMonthTotalAmount(amount, currency, symbol, incomplete) {
const displayAmount = this.getDisplayCurrency(amount, currency);
return symbol + displayAmount + (incomplete ? '+' : '');
@@ -1172,6 +1190,9 @@ export default {
getTransactionTypeFromCategoryType(categoryType) {
return categoryTypeToTransactionType(parseInt(categoryType));
},
+ getTransactionDisplayAmount(transaction) {
+ return getTransactionDisplayAmount(transaction, this.queryAllFilterAccountIdsCount, this.queryAllFilterAccountIds, this.getDisplayCurrency);
+ },
getCategoryListItemCheckedClass(category, queryCategoryIds) {
if (queryCategoryIds && queryCategoryIds[category.id]) {
return {
diff --git a/src/views/mobile/transactions/ListPage.vue b/src/views/mobile/transactions/ListPage.vue
index 1535bded..eaf28d6c 100644
--- a/src/views/mobile/transactions/ListPage.vue
+++ b/src/views/mobile/transactions/ListPage.vue
@@ -11,7 +11,7 @@
-
+
@@ -200,9 +200,7 @@
- {{ getDisplayAmount(transaction.sourceAmount, transaction.sourceAccount.currency, transaction.hideAmount) }}
- {{ getDisplayAmount(transaction.destinationAmount, transaction.destinationAccount.currency, transaction.hideAmount) }}
-
+ {{ getTransactionDisplayAmount(transaction) }}
@@ -286,12 +284,20 @@
-
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
+ v-if="queryAllFilterCategoryIds[subCategory.id]">
@@ -348,14 +354,22 @@
-
+
+
+
+
+
+
+
+
+
+ v-if="queryAllFilterAccountIds[account.id]">
@@ -461,6 +475,7 @@ import {
} from '@/lib/datetime.js';
import { categoryTypeToTransactionType, transactionTypeToCategoryType } from '@/lib/category.js';
import { getUnifiedSelectedAccountsCurrencyOrDefaultCurrency } from '@/lib/account.js';
+import { getTransactionDisplayAmount } from '@/lib/transaction.js';
import { onSwipeoutDeleted, scrollToSelectedItem } from '@/lib/ui.mobile.js';
export default {
@@ -490,11 +505,7 @@ export default {
return getUnifiedSelectedAccountsCurrencyOrDefaultCurrency(this.allAccounts, this.queryAllFilterAccountIds, this.userStore.currentUserDefaultCurrency);
},
canAddTransaction() {
- if (this.queryAllFilterCategoryIdsCount > 1 || this.queryAllFilterAccountIdsCount > 1) {
- return false;
- }
-
- if (this.query.accountIds) {
+ if (this.query.accountIds && this.queryAllFilterAccountIdsCount === 1) {
const account = this.allAccounts[this.query.accountIds];
if (account && account.type === accountConstants.allAccountTypes.MultiSubAccounts) {
@@ -868,6 +879,12 @@ export default {
});
this.reload(null);
+ },
+ showMultipleCategoriesPopup() {
+
+ },
+ showMultipleAccountsPopup() {
+
},
duplicate(transaction) {
this.f7router.navigate(`/transaction/add?id=${transaction.id}&type=${transaction.type}`);
@@ -936,13 +953,6 @@ export default {
getDisplayTimezone(transaction) {
return `UTC${getUtcOffsetByUtcOffsetMinutes(transaction.utcOffset)}`;
},
- getDisplayAmount(amount, currency, hideAmount) {
- if (hideAmount) {
- return this.getDisplayCurrency('***', currency);
- }
-
- return this.getDisplayCurrency(amount, currency);
- },
getDisplayMonthTotalAmount(amount, currency, symbol, incomplete) {
const displayAmount = this.getDisplayCurrency(amount, currency);
return symbol + displayAmount + (incomplete ? '+' : '');
@@ -970,6 +980,9 @@ export default {
getTransactionTypeFromCategoryType(categoryType) {
return categoryTypeToTransactionType(parseInt(categoryType));
},
+ getTransactionDisplayAmount(transaction) {
+ return getTransactionDisplayAmount(transaction, this.queryAllFilterAccountIdsCount, this.queryAllFilterAccountIds, this.getDisplayCurrency);
+ },
getTransactionDomId(transaction) {
return 'transaction_' + transaction.id;
},
|