mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 07:57:33 +08:00
support showing hidden tags in filtering page / dialog
This commit is contained in:
@@ -66,10 +66,15 @@
|
||||
:value="transactionTag.id"
|
||||
:checked="!filterTagIds[transactionTag.id]"
|
||||
:key="transactionTag.id"
|
||||
v-for="transactionTag in allVisibleTags"
|
||||
v-for="transactionTag in allTags"
|
||||
v-show="showHidden || !transactionTag.hidden"
|
||||
@change="selectTransactionTag">
|
||||
<template #media>
|
||||
<f7-icon f7="number"></f7-icon>
|
||||
<f7-icon f7="number">
|
||||
<f7-badge color="gray" class="right-bottom-icon" v-if="transactionTag.hidden">
|
||||
<f7-icon f7="eye_slash_fill"></f7-icon>
|
||||
</f7-badge>
|
||||
</f7-icon>
|
||||
</template>
|
||||
</f7-list-item>
|
||||
</f7-list>
|
||||
@@ -83,6 +88,10 @@
|
||||
<f7-actions-button @click="selectNone">{{ $t('Select None') }}</f7-actions-button>
|
||||
<f7-actions-button @click="selectInvert">{{ $t('Invert Selection') }}</f7-actions-button>
|
||||
</f7-actions-group>
|
||||
<f7-actions-group>
|
||||
<f7-actions-button v-if="!showHidden" @click="showHidden = true">{{ $t('Show Hidden Transaction Tags') }}</f7-actions-button>
|
||||
<f7-actions-button v-if="showHidden" @click="showHidden = false">{{ $t('Hide Hidden Transaction Tags') }}</f7-actions-button>
|
||||
</f7-actions-group>
|
||||
<f7-actions-group>
|
||||
<f7-actions-button bold close>{{ $t('Cancel') }}</f7-actions-button>
|
||||
</f7-actions-group>
|
||||
@@ -112,6 +121,7 @@ export default {
|
||||
loadingError: null,
|
||||
type: null,
|
||||
filterTagIds: {},
|
||||
showHidden: false,
|
||||
collapseStates: {
|
||||
'default': {
|
||||
opened: true
|
||||
@@ -128,11 +138,11 @@ export default {
|
||||
applyText() {
|
||||
return 'Apply';
|
||||
},
|
||||
allVisibleTags() {
|
||||
return this.transactionTagsStore.allVisibleTags;
|
||||
allTags() {
|
||||
return this.transactionTagsStore.allTransactionTags;
|
||||
},
|
||||
hasAnyAvailableTag() {
|
||||
return this.transactionTagsStore.allVisibleTagsCount > 0;
|
||||
return this.transactionTagsStore.allAvailableTagsCount > 0;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -453,7 +453,7 @@
|
||||
</template>
|
||||
</f7-list-item>
|
||||
<f7-list-item :class="{ 'list-item-selected': query.tagIds && queryAllFilterTagIdsCount > 1 }"
|
||||
:title="$t('Multiple Tags')" @click="filterMultipleTags()" v-if="allVisibleTagsCount > 0">
|
||||
:title="$t('Multiple Tags')" @click="filterMultipleTags()" v-if="allAvailableTagsCount > 0">
|
||||
<template #after>
|
||||
<f7-icon class="list-item-checked-icon" f7="checkmark_alt" v-if="query.tagIds && queryAllFilterTagIdsCount > 1"></f7-icon>
|
||||
</template>
|
||||
@@ -675,8 +675,8 @@ export default {
|
||||
allTransactionTags() {
|
||||
return this.transactionTagsStore.allTransactionTagsMap;
|
||||
},
|
||||
allVisibleTagsCount() {
|
||||
return this.transactionTagsStore.allVisibleTagsCount;
|
||||
allAvailableTagsCount() {
|
||||
return this.transactionTagsStore.allAvailableTagsCount;
|
||||
},
|
||||
allDateRanges() {
|
||||
return datetimeConstants.allDateRanges;
|
||||
|
||||
Reference in New Issue
Block a user