diff --git a/pkg/models/user_app_cloud_setting.go b/pkg/models/user_app_cloud_setting.go index de4e893e..286841bd 100644 --- a/pkg/models/user_app_cloud_setting.go +++ b/pkg/models/user_app_cloud_setting.go @@ -31,6 +31,7 @@ var ALL_ALLOWED_CLOUD_SYNC_APP_SETTING_KEY_TYPES = map[string]UserApplicationClo "alwaysShowTransactionPicturesInMobileTransactionEditPage": USER_APPLICATION_CLOUD_SETTING_TYPE_BOOLEAN, // Insights Explorer Page "insightsExplorerDefaultDateRangeType": USER_APPLICATION_CLOUD_SETTING_TYPE_NUMBER, + "showTagInInsightsExplorerPage": USER_APPLICATION_CLOUD_SETTING_TYPE_BOOLEAN, // Account List Page "totalAmountExcludeAccountIds": USER_APPLICATION_CLOUD_SETTING_TYPE_STRING_BOOLEAN_MAP, // Exchange Rates Data Page diff --git a/src/core/setting.ts b/src/core/setting.ts index f5107025..e2d6e849 100644 --- a/src/core/setting.ts +++ b/src/core/setting.ts @@ -52,6 +52,7 @@ export interface ApplicationSettings extends BaseApplicationSetting { alwaysShowTransactionPicturesInMobileTransactionEditPage: boolean; // Insights Explorer Page insightsExplorerDefaultDateRangeType: number; + showTagInInsightsExplorerPage: boolean; // Account List Page totalAmountExcludeAccountIds: Record; // Exchange Rates Data Page @@ -116,6 +117,7 @@ export const ALL_ALLOWED_CLOUD_SYNC_APP_SETTING_KEY_TYPES: Record { updateUserApplicationCloudSettingValue('insightsExplorerDefaultDateRangeType', value); } + function setShowTagInInsightsExplorerPage(value: boolean): void { + updateApplicationSettingsValue('showTagInInsightsExplorerPage', value); + appSettings.value.showTagInInsightsExplorerPage = value; + updateUserApplicationCloudSettingValue('showTagInInsightsExplorerPage', value); + } + // Account List Page function setTotalAmountExcludeAccountIds(value: Record): void { updateApplicationSettingsValue('totalAmountExcludeAccountIds', value); @@ -476,6 +482,7 @@ export const useSettingsStore = defineStore('settings', () => { setAlwaysShowTransactionPicturesInMobileTransactionEditPage, // -- Insights Explorer Page setInsightsExplorerDefaultDateRangeType, + setShowTagInInsightsExplorerPage, // -- Account List Page setTotalAmountExcludeAccountIds, // -- Exchange Rates Data Page diff --git a/src/views/base/settings/AppCloudSyncPageBase.ts b/src/views/base/settings/AppCloudSyncPageBase.ts index 69906537..6d5062c3 100644 --- a/src/views/base/settings/AppCloudSyncPageBase.ts +++ b/src/views/base/settings/AppCloudSyncPageBase.ts @@ -53,7 +53,8 @@ export const ALL_APPLICATION_CLOUD_SETTINGS: CategorizedApplicationCloudSettingI { categoryName: 'Insights Explorer Page', items: [ - { settingKey: 'insightsExplorerDefaultDateRangeType', settingName: 'Default Date Range', mobile: false, desktop: true } + { settingKey: 'insightsExplorerDefaultDateRangeType', settingName: 'Default Date Range', mobile: false, desktop: true }, + { settingKey: 'showTagInInsightsExplorerPage', settingName: 'Show Transaction Tag', mobile: false, desktop: true } ] }, { diff --git a/src/views/desktop/app/settings/tabs/AppBasicSettingTab.vue b/src/views/desktop/app/settings/tabs/AppBasicSettingTab.vue index 9b43bcec..f379ee1a 100644 --- a/src/views/desktop/app/settings/tabs/AppBasicSettingTab.vue +++ b/src/views/desktop/app/settings/tabs/AppBasicSettingTab.vue @@ -240,6 +240,17 @@ v-model="insightsExplorerDefaultDateRangeType" /> + + + @@ -405,6 +416,11 @@ const insightsExplorerDefaultDateRangeType = computed({ set: (value) => settingsStore.setInsightsExplorerDefaultDateRangeType(value) }); +const showTagInInsightsExplorerPage = computed({ + get: () => settingsStore.appSettings.showTagInInsightsExplorerPage, + set: (value) => settingsStore.setShowTagInInsightsExplorerPage(value) +}); + function init(): void { loadingAccounts.value = true; diff --git a/src/views/desktop/insights/tabs/ExplorerDataTableTab.vue b/src/views/desktop/insights/tabs/ExplorerDataTableTab.vue index e56ca7de..1dcbe14d 100644 --- a/src/views/desktop/insights/tabs/ExplorerDataTableTab.vue +++ b/src/views/desktop/insights/tabs/ExplorerDataTableTab.vue @@ -49,6 +49,17 @@ {{ item.destinationAccount?.name }} +