mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 17:24:26 +08:00
support setting account categories hidden which has no accounts
This commit is contained in:
@@ -33,7 +33,8 @@ var ALL_ALLOWED_CLOUD_SYNC_APP_SETTING_KEY_TYPES = map[string]UserApplicationClo
|
|||||||
"insightsExplorerDefaultDateRangeType": USER_APPLICATION_CLOUD_SETTING_TYPE_NUMBER,
|
"insightsExplorerDefaultDateRangeType": USER_APPLICATION_CLOUD_SETTING_TYPE_NUMBER,
|
||||||
"showTagInInsightsExplorerPage": USER_APPLICATION_CLOUD_SETTING_TYPE_BOOLEAN,
|
"showTagInInsightsExplorerPage": USER_APPLICATION_CLOUD_SETTING_TYPE_BOOLEAN,
|
||||||
// Account List Page
|
// Account List Page
|
||||||
"totalAmountExcludeAccountIds": USER_APPLICATION_CLOUD_SETTING_TYPE_STRING_BOOLEAN_MAP,
|
"totalAmountExcludeAccountIds": USER_APPLICATION_CLOUD_SETTING_TYPE_STRING_BOOLEAN_MAP,
|
||||||
|
"hideCategoriesWithoutAccounts": USER_APPLICATION_CLOUD_SETTING_TYPE_BOOLEAN,
|
||||||
// Exchange Rates Data Page
|
// Exchange Rates Data Page
|
||||||
"currencySortByInExchangeRatesPage": USER_APPLICATION_CLOUD_SETTING_TYPE_NUMBER,
|
"currencySortByInExchangeRatesPage": USER_APPLICATION_CLOUD_SETTING_TYPE_NUMBER,
|
||||||
// Statistics Settings
|
// Statistics Settings
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ export interface ApplicationSettings extends BaseApplicationSetting {
|
|||||||
showTagInInsightsExplorerPage: boolean;
|
showTagInInsightsExplorerPage: boolean;
|
||||||
// Account List Page
|
// Account List Page
|
||||||
totalAmountExcludeAccountIds: Record<string, boolean>;
|
totalAmountExcludeAccountIds: Record<string, boolean>;
|
||||||
|
hideCategoriesWithoutAccounts: boolean;
|
||||||
// Exchange Rates Data Page
|
// Exchange Rates Data Page
|
||||||
currencySortByInExchangeRatesPage: number;
|
currencySortByInExchangeRatesPage: number;
|
||||||
// Statistics Settings
|
// Statistics Settings
|
||||||
@@ -120,6 +121,7 @@ export const ALL_ALLOWED_CLOUD_SYNC_APP_SETTING_KEY_TYPES: Record<string, UserAp
|
|||||||
'showTagInInsightsExplorerPage': UserApplicationCloudSettingType.Boolean,
|
'showTagInInsightsExplorerPage': UserApplicationCloudSettingType.Boolean,
|
||||||
// Account List Page
|
// Account List Page
|
||||||
'totalAmountExcludeAccountIds': UserApplicationCloudSettingType.StringBooleanMap,
|
'totalAmountExcludeAccountIds': UserApplicationCloudSettingType.StringBooleanMap,
|
||||||
|
'hideCategoriesWithoutAccounts': UserApplicationCloudSettingType.Boolean,
|
||||||
// Exchange Rates Data Page
|
// Exchange Rates Data Page
|
||||||
'currencySortByInExchangeRatesPage': UserApplicationCloudSettingType.Number,
|
'currencySortByInExchangeRatesPage': UserApplicationCloudSettingType.Number,
|
||||||
// Statistics Settings
|
// Statistics Settings
|
||||||
@@ -170,6 +172,7 @@ export const DEFAULT_APPLICATION_SETTINGS: ApplicationSettings = {
|
|||||||
showTagInInsightsExplorerPage: true,
|
showTagInInsightsExplorerPage: true,
|
||||||
// Account List Page
|
// Account List Page
|
||||||
totalAmountExcludeAccountIds: {},
|
totalAmountExcludeAccountIds: {},
|
||||||
|
hideCategoriesWithoutAccounts: false,
|
||||||
// Exchange Rates Data Page
|
// Exchange Rates Data Page
|
||||||
currencySortByInExchangeRatesPage: CurrencySortingType.Default.type,
|
currencySortByInExchangeRatesPage: CurrencySortingType.Default.type,
|
||||||
// Statistics Settings
|
// Statistics Settings
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "Account List Page",
|
"Account List Page": "Account List Page",
|
||||||
"Accounts Included in Total": "Accounts Included in Total",
|
"Accounts Included in Total": "Accounts Included in Total",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "Wechselkursdatenseite",
|
"Exchange Rates Data Page": "Wechselkursdatenseite",
|
||||||
"Exchange Rate": "Wechselkurs",
|
"Exchange Rate": "Wechselkurs",
|
||||||
"Enable Swipe Back": "Enable Swipe Back",
|
"Enable Swipe Back": "Enable Swipe Back",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "Account List Page",
|
"Account List Page": "Account List Page",
|
||||||
"Accounts Included in Total": "Accounts Included in Total",
|
"Accounts Included in Total": "Accounts Included in Total",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "Exchange Rates Data Page",
|
"Exchange Rates Data Page": "Exchange Rates Data Page",
|
||||||
"Exchange Rate": "Exchange Rate",
|
"Exchange Rate": "Exchange Rate",
|
||||||
"Enable Swipe Back": "Enable Swipe Back",
|
"Enable Swipe Back": "Enable Swipe Back",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "Página de Cuentas",
|
"Account List Page": "Página de Cuentas",
|
||||||
"Accounts Included in Total": "Cuentas Incluidas en el Total",
|
"Accounts Included in Total": "Cuentas Incluidas en el Total",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "Página de Tipos de Cambio",
|
"Exchange Rates Data Page": "Página de Tipos de Cambio",
|
||||||
"Exchange Rate": "Tipo de Cambio",
|
"Exchange Rate": "Tipo de Cambio",
|
||||||
"Enable Swipe Back": "Deslizar para Regresar",
|
"Enable Swipe Back": "Deslizar para Regresar",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "Page de liste des comptes",
|
"Account List Page": "Page de liste des comptes",
|
||||||
"Accounts Included in Total": "Comptes inclus dans le total",
|
"Accounts Included in Total": "Comptes inclus dans le total",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "Page des données de taux de change",
|
"Exchange Rates Data Page": "Page des données de taux de change",
|
||||||
"Exchange Rate": "Taux de change",
|
"Exchange Rate": "Taux de change",
|
||||||
"Enable Swipe Back": "Activer le balayage de retour",
|
"Enable Swipe Back": "Activer le balayage de retour",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "Account List Page",
|
"Account List Page": "Account List Page",
|
||||||
"Accounts Included in Total": "Accounts Included in Total",
|
"Accounts Included in Total": "Accounts Included in Total",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "Pagina dati tassi di cambio",
|
"Exchange Rates Data Page": "Pagina dati tassi di cambio",
|
||||||
"Exchange Rate": "Tasso di cambio",
|
"Exchange Rate": "Tasso di cambio",
|
||||||
"Enable Swipe Back": "Enable Swipe Back",
|
"Enable Swipe Back": "Enable Swipe Back",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "Account List Page",
|
"Account List Page": "Account List Page",
|
||||||
"Accounts Included in Total": "Accounts Included in Total",
|
"Accounts Included in Total": "Accounts Included in Total",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "為替レートデータページ",
|
"Exchange Rates Data Page": "為替レートデータページ",
|
||||||
"Exchange Rate": "為替レート",
|
"Exchange Rate": "為替レート",
|
||||||
"Enable Swipe Back": "Enable Swipe Back",
|
"Enable Swipe Back": "Enable Swipe Back",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "ಖಾತೆ ಪಟ್ಟಿ ಪುಟ",
|
"Account List Page": "ಖಾತೆ ಪಟ್ಟಿ ಪುಟ",
|
||||||
"Accounts Included in Total": "ಒಟ್ಟು ಮೊತ್ತದಲ್ಲಿ ಒಳಗೊಂಡ ಖಾತೆಗಳು",
|
"Accounts Included in Total": "ಒಟ್ಟು ಮೊತ್ತದಲ್ಲಿ ಒಳಗೊಂಡ ಖಾತೆಗಳು",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "ವಿನಿಮಯ ದರಗಳ ಪುಟ",
|
"Exchange Rates Data Page": "ವಿನಿಮಯ ದರಗಳ ಪುಟ",
|
||||||
"Exchange Rate": "ವಿನಿಮಯ ದರ",
|
"Exchange Rate": "ವಿನಿಮಯ ದರ",
|
||||||
"Enable Swipe Back": "ಸ್ವೈಪ್ ಬ್ಯಾಕ್ ಸಕ್ರಿಯಗೊಳಿಸಿ",
|
"Enable Swipe Back": "ಸ್ವೈಪ್ ಬ್ಯಾಕ್ ಸಕ್ರಿಯಗೊಳಿಸಿ",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "계좌 목록 페이지",
|
"Account List Page": "계좌 목록 페이지",
|
||||||
"Accounts Included in Total": "총계에 포함된 계좌",
|
"Accounts Included in Total": "총계에 포함된 계좌",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "환율 데이터 페이지",
|
"Exchange Rates Data Page": "환율 데이터 페이지",
|
||||||
"Exchange Rate": "환율",
|
"Exchange Rate": "환율",
|
||||||
"Enable Swipe Back": "스와이프 뒤로 가기 활성화",
|
"Enable Swipe Back": "스와이프 뒤로 가기 활성화",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "Rekeningenpagina",
|
"Account List Page": "Rekeningenpagina",
|
||||||
"Accounts Included in Total": "Rekeningen opgenomen in totaal",
|
"Accounts Included in Total": "Rekeningen opgenomen in totaal",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "Wisselkoersgegevenspagina",
|
"Exchange Rates Data Page": "Wisselkoersgegevenspagina",
|
||||||
"Exchange Rate": "Wisselkoers",
|
"Exchange Rate": "Wisselkoers",
|
||||||
"Enable Swipe Back": "Enable Swipe Back",
|
"Enable Swipe Back": "Enable Swipe Back",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "Account List Page",
|
"Account List Page": "Account List Page",
|
||||||
"Accounts Included in Total": "Accounts Included in Total",
|
"Accounts Included in Total": "Accounts Included in Total",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "Página de Dados de Taxas de Câmbio",
|
"Exchange Rates Data Page": "Página de Dados de Taxas de Câmbio",
|
||||||
"Exchange Rate": "Taxa de Câmbio",
|
"Exchange Rate": "Taxa de Câmbio",
|
||||||
"Enable Swipe Back": "Enable Swipe Back",
|
"Enable Swipe Back": "Enable Swipe Back",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "Account List Page",
|
"Account List Page": "Account List Page",
|
||||||
"Accounts Included in Total": "Accounts Included in Total",
|
"Accounts Included in Total": "Accounts Included in Total",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "Страница данных о курсах валют",
|
"Exchange Rates Data Page": "Страница данных о курсах валют",
|
||||||
"Exchange Rate": "Курс обмена",
|
"Exchange Rate": "Курс обмена",
|
||||||
"Enable Swipe Back": "Enable Swipe Back",
|
"Enable Swipe Back": "Enable Swipe Back",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Stran za vpoglede in raziskovanje",
|
"Insights Explorer Page": "Stran za vpoglede in raziskovanje",
|
||||||
"Account List Page": "Stran s seznamom računov",
|
"Account List Page": "Stran s seznamom računov",
|
||||||
"Accounts Included in Total": "Računi vključeni v skupno vsoto",
|
"Accounts Included in Total": "Računi vključeni v skupno vsoto",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "Stran z menjalnimi tečaji",
|
"Exchange Rates Data Page": "Stran z menjalnimi tečaji",
|
||||||
"Exchange Rate": "Menjalni tečaj",
|
"Exchange Rate": "Menjalni tečaj",
|
||||||
"Enable Swipe Back": "Omogoči podrsanje nazaj",
|
"Enable Swipe Back": "Omogoči podrsanje nazaj",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "หน้าบัญชี",
|
"Account List Page": "หน้าบัญชี",
|
||||||
"Accounts Included in Total": "บัญชีที่รวมในผลรวม",
|
"Accounts Included in Total": "บัญชีที่รวมในผลรวม",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "หน้าข้อมูลอัตราแลกเปลี่ยน",
|
"Exchange Rates Data Page": "หน้าข้อมูลอัตราแลกเปลี่ยน",
|
||||||
"Exchange Rate": "อัตราแลกเปลี่ยน",
|
"Exchange Rate": "อัตราแลกเปลี่ยน",
|
||||||
"Enable Swipe Back": "เปิดใช้งานปัดย้อนกลับ",
|
"Enable Swipe Back": "เปิดใช้งานปัดย้อนกลับ",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "Hesap Listesi Sayfası",
|
"Account List Page": "Hesap Listesi Sayfası",
|
||||||
"Accounts Included in Total": "Toplama Dahil Edilen Hesaplar",
|
"Accounts Included in Total": "Toplama Dahil Edilen Hesaplar",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "Döviz Kuru Verileri Sayfası",
|
"Exchange Rates Data Page": "Döviz Kuru Verileri Sayfası",
|
||||||
"Exchange Rate": "Döviz Kuru",
|
"Exchange Rate": "Döviz Kuru",
|
||||||
"Enable Swipe Back": "Geri Kaydırmayı Etkinleştir",
|
"Enable Swipe Back": "Geri Kaydırmayı Etkinleştir",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "Account List Page",
|
"Account List Page": "Account List Page",
|
||||||
"Accounts Included in Total": "Accounts Included in Total",
|
"Accounts Included in Total": "Accounts Included in Total",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "Сторінка курсів валют",
|
"Exchange Rates Data Page": "Сторінка курсів валют",
|
||||||
"Exchange Rate": "Курс обміну",
|
"Exchange Rate": "Курс обміну",
|
||||||
"Enable Swipe Back": "Enable Swipe Back",
|
"Enable Swipe Back": "Enable Swipe Back",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "Insights Explorer Page",
|
"Insights Explorer Page": "Insights Explorer Page",
|
||||||
"Account List Page": "Account List Page",
|
"Account List Page": "Account List Page",
|
||||||
"Accounts Included in Total": "Accounts Included in Total",
|
"Accounts Included in Total": "Accounts Included in Total",
|
||||||
|
"Hide Categories Without Accounts": "Hide Categories Without Accounts",
|
||||||
"Exchange Rates Data Page": "Trang dữ liệu tỷ giá hối đoái",
|
"Exchange Rates Data Page": "Trang dữ liệu tỷ giá hối đoái",
|
||||||
"Exchange Rate": "Tỷ giá hối đoái",
|
"Exchange Rate": "Tỷ giá hối đoái",
|
||||||
"Enable Swipe Back": "Enable Swipe Back",
|
"Enable Swipe Back": "Enable Swipe Back",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "洞察探索页面",
|
"Insights Explorer Page": "洞察探索页面",
|
||||||
"Account List Page": "账户列表页面",
|
"Account List Page": "账户列表页面",
|
||||||
"Accounts Included in Total": "计入总金额的账户",
|
"Accounts Included in Total": "计入总金额的账户",
|
||||||
|
"Hide Categories Without Accounts": "隐藏没有账户的分类",
|
||||||
"Exchange Rates Data Page": "汇率数据页面",
|
"Exchange Rates Data Page": "汇率数据页面",
|
||||||
"Exchange Rate": "汇率",
|
"Exchange Rate": "汇率",
|
||||||
"Enable Swipe Back": "启用侧滑返回",
|
"Enable Swipe Back": "启用侧滑返回",
|
||||||
|
|||||||
@@ -2190,6 +2190,7 @@
|
|||||||
"Insights Explorer Page": "洞察探索頁面",
|
"Insights Explorer Page": "洞察探索頁面",
|
||||||
"Account List Page": "帳戶清單頁面",
|
"Account List Page": "帳戶清單頁面",
|
||||||
"Accounts Included in Total": "計入總金額的帳戶",
|
"Accounts Included in Total": "計入總金額的帳戶",
|
||||||
|
"Hide Categories Without Accounts": "隱藏沒有帳戶的分類",
|
||||||
"Exchange Rates Data Page": "匯率資料頁面",
|
"Exchange Rates Data Page": "匯率資料頁面",
|
||||||
"Exchange Rate": "匯率",
|
"Exchange Rate": "匯率",
|
||||||
"Enable Swipe Back": "啟用滑動返回",
|
"Enable Swipe Back": "啟用滑動返回",
|
||||||
|
|||||||
@@ -265,6 +265,12 @@ export const useSettingsStore = defineStore('settings', () => {
|
|||||||
updateUserApplicationCloudSettingValue('totalAmountExcludeAccountIds', value);
|
updateUserApplicationCloudSettingValue('totalAmountExcludeAccountIds', value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setHideCategoriesWithoutAccounts(value: boolean): void {
|
||||||
|
updateApplicationSettingsValue('hideCategoriesWithoutAccounts', value);
|
||||||
|
appSettings.value.hideCategoriesWithoutAccounts = value;
|
||||||
|
updateUserApplicationCloudSettingValue('hideCategoriesWithoutAccounts', value);
|
||||||
|
}
|
||||||
|
|
||||||
// Exchange Rates Data Page
|
// Exchange Rates Data Page
|
||||||
function setCurrencySortByInExchangeRatesPage(value: number): void {
|
function setCurrencySortByInExchangeRatesPage(value: number): void {
|
||||||
updateApplicationSettingsValue('currencySortByInExchangeRatesPage', value);
|
updateApplicationSettingsValue('currencySortByInExchangeRatesPage', value);
|
||||||
@@ -485,6 +491,7 @@ export const useSettingsStore = defineStore('settings', () => {
|
|||||||
setShowTagInInsightsExplorerPage,
|
setShowTagInInsightsExplorerPage,
|
||||||
// -- Account List Page
|
// -- Account List Page
|
||||||
setTotalAmountExcludeAccountIds,
|
setTotalAmountExcludeAccountIds,
|
||||||
|
setHideCategoriesWithoutAccounts,
|
||||||
// -- Exchange Rates Data Page
|
// -- Exchange Rates Data Page
|
||||||
setCurrencySortByInExchangeRatesPage,
|
setCurrencySortByInExchangeRatesPage,
|
||||||
// -- Statistics Settings
|
// -- Statistics Settings
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ export const ALL_APPLICATION_CLOUD_SETTINGS: CategorizedApplicationCloudSettingI
|
|||||||
{
|
{
|
||||||
categoryName: 'Account List Page',
|
categoryName: 'Account List Page',
|
||||||
items: [
|
items: [
|
||||||
{ settingKey: 'totalAmountExcludeAccountIds', settingName: 'Accounts Included in Total', mobile: true, desktop: true }
|
{ settingKey: 'totalAmountExcludeAccountIds', settingName: 'Accounts Included in Total', mobile: true, desktop: true },
|
||||||
|
{ settingKey: 'hideCategoriesWithoutAccounts', settingName: 'Hide Categories Without Accounts', mobile: false, desktop: true }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,7 +31,8 @@
|
|||||||
<v-tabs show-arrows class="account-category-tabs my-4" direction="vertical"
|
<v-tabs show-arrows class="account-category-tabs my-4" direction="vertical"
|
||||||
:disabled="loading" v-model="activeAccountCategoryType">
|
:disabled="loading" v-model="activeAccountCategoryType">
|
||||||
<v-tab class="tab-text-truncate" :key="accountCategory.type" :value="accountCategory.type"
|
<v-tab class="tab-text-truncate" :key="accountCategory.type" :value="accountCategory.type"
|
||||||
v-for="accountCategory in AccountCategory.values()">
|
v-for="accountCategory in AccountCategory.values()"
|
||||||
|
v-show="!hideAccountCategoriesWithoutAccounts || (allCategorizedAccountsMap[accountCategory.type] && allCategorizedAccountsMap[accountCategory.type]!.accounts.length > 0)">
|
||||||
<ItemIcon icon-type="account" :icon-id="accountCategory.defaultAccountIconId" />
|
<ItemIcon icon-type="account" :icon-id="accountCategory.defaultAccountIconId" />
|
||||||
<div class="d-flex flex-column text-truncate ms-2">
|
<div class="d-flex flex-column text-truncate ms-2">
|
||||||
<small class="text-truncate text-start smaller" v-if="!loading || allAccountCount > 0">{{ accountCategoryTotalBalance(accountCategory) }}</small>
|
<small class="text-truncate text-start smaller" v-if="!loading || allAccountCount > 0">{{ accountCategoryTotalBalance(accountCategory) }}</small>
|
||||||
@@ -327,6 +328,7 @@ import { useDisplay } from 'vuetify';
|
|||||||
import { useI18n } from '@/locales/helpers.ts';
|
import { useI18n } from '@/locales/helpers.ts';
|
||||||
import { useAccountListPageBase } from '@/views/base/accounts/AccountListPageBase.ts';
|
import { useAccountListPageBase } from '@/views/base/accounts/AccountListPageBase.ts';
|
||||||
|
|
||||||
|
import { useSettingsStore } from '@/stores/setting.ts';
|
||||||
import { useAccountsStore } from '@/stores/account.ts';
|
import { useAccountsStore } from '@/stores/account.ts';
|
||||||
|
|
||||||
import { DateRange, DateRangeScene, type LocalizedDateRange, type TimeRangeAndDateType } from '@/core/datetime.ts';
|
import { DateRange, DateRangeScene, type LocalizedDateRange, type TimeRangeAndDateType } from '@/core/datetime.ts';
|
||||||
@@ -382,6 +384,7 @@ const {
|
|||||||
accountBalance
|
accountBalance
|
||||||
} = useAccountListPageBase();
|
} = useAccountListPageBase();
|
||||||
|
|
||||||
|
const settingsStore = useSettingsStore();
|
||||||
const accountsStore = useAccountsStore();
|
const accountsStore = useAccountsStore();
|
||||||
|
|
||||||
const confirmDialog = useTemplateRef<ConfirmDialogType>('confirmDialog');
|
const confirmDialog = useTemplateRef<ConfirmDialogType>('confirmDialog');
|
||||||
@@ -400,6 +403,7 @@ const showNav = ref<boolean>(display.mdAndUp.value);
|
|||||||
const showAccountsIncludedInTotalDialog = ref<boolean>(false);
|
const showAccountsIncludedInTotalDialog = ref<boolean>(false);
|
||||||
const showCustomDateRangeDialog = ref<boolean>(false);
|
const showCustomDateRangeDialog = ref<boolean>(false);
|
||||||
|
|
||||||
|
const hideAccountCategoriesWithoutAccounts = computed<boolean>(() => settingsStore.appSettings.hideCategoriesWithoutAccounts);
|
||||||
const hasAnyVisibleAccount = computed<boolean>(() => accountsStore.allVisibleAccountsCount > 0);
|
const hasAnyVisibleAccount = computed<boolean>(() => accountsStore.allVisibleAccountsCount > 0);
|
||||||
const activeAccountCategory = computed<AccountCategory | undefined>(() => AccountCategory.valueOf(activeAccountCategoryType.value));
|
const activeAccountCategory = computed<AccountCategory | undefined>(() => AccountCategory.valueOf(activeAccountCategoryType.value));
|
||||||
const activeAccountCategoryTotalBalance = computed<string>(() => accountCategoryTotalBalance(activeAccountCategory.value));
|
const activeAccountCategoryTotalBalance = computed<string>(() => accountCategoryTotalBalance(activeAccountCategory.value));
|
||||||
|
|||||||
@@ -277,6 +277,17 @@
|
|||||||
@click="showAccountsIncludedInTotalDialog = true"
|
@click="showAccountsIncludedInTotalDialog = true"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
<v-col cols="12" md="6">
|
||||||
|
<v-select
|
||||||
|
item-title="displayName"
|
||||||
|
item-value="value"
|
||||||
|
persistent-placeholder
|
||||||
|
:label="tt('Hide Categories Without Accounts')"
|
||||||
|
:placeholder="tt('Hide Categories Without Accounts')"
|
||||||
|
:items="enableDisableOptions"
|
||||||
|
v-model="hideCategoriesWithoutAccounts"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-form>
|
</v-form>
|
||||||
@@ -421,6 +432,11 @@ const showTagInInsightsExplorerPage = computed<boolean>({
|
|||||||
set: (value) => settingsStore.setShowTagInInsightsExplorerPage(value)
|
set: (value) => settingsStore.setShowTagInInsightsExplorerPage(value)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const hideCategoriesWithoutAccounts = computed<boolean>({
|
||||||
|
get: () => settingsStore.appSettings.hideCategoriesWithoutAccounts,
|
||||||
|
set: (value) => settingsStore.setHideCategoriesWithoutAccounts(value)
|
||||||
|
});
|
||||||
|
|
||||||
function init(): void {
|
function init(): void {
|
||||||
loadingAccounts.value = true;
|
loadingAccounts.value = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user