diff --git a/pkg/models/user_app_cloud_setting.go b/pkg/models/user_app_cloud_setting.go index 6e904b35..de4e893e 100644 --- a/pkg/models/user_app_cloud_setting.go +++ b/pkg/models/user_app_cloud_setting.go @@ -31,7 +31,6 @@ 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, - "timezoneUsedForInsightsExplorerPage": USER_APPLICATION_CLOUD_SETTING_TYPE_NUMBER, // 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 2d5f35c6..f5107025 100644 --- a/src/core/setting.ts +++ b/src/core/setting.ts @@ -52,7 +52,6 @@ export interface ApplicationSettings extends BaseApplicationSetting { alwaysShowTransactionPicturesInMobileTransactionEditPage: boolean; // Insights Explorer Page insightsExplorerDefaultDateRangeType: number; - timezoneUsedForInsightsExplorerPage: number; // Account List Page totalAmountExcludeAccountIds: Record; // Exchange Rates Data Page @@ -117,7 +116,6 @@ export const ALL_ALLOWED_CLOUD_SYNC_APP_SETTING_KEY_TYPES: Record { const transactionTagsStore = useTransactionTagsStore(); const exchangeRatesStore = useExchangeRatesStore(); - function getDataCategoryInfo(dimension: TransactionExplorerDataDimension, queryName: string, queryIndex: number, transaction: TransactionInsightDataItem): CategoriedInfo { + function getDataCategoryInfo(timezoneUsedForDateRange: number, dimension: TransactionExplorerDataDimension, queryName: string, queryIndex: number, transaction: TransactionInsightDataItem): CategoriedInfo { let transactionTimeUtfOffset: number | undefined = undefined; - if (settingsStore.appSettings.timezoneUsedForInsightsExplorerPage === TimezoneTypeForStatistics.TransactionTimezone.type) { + if (timezoneUsedForDateRange === TimezoneTypeForStatistics.TransactionTimezone.type) { transactionTimeUtfOffset = transaction.utcOffset; } @@ -158,52 +161,56 @@ export const useExplorersStore = defineStore('explorers', () => { }; } } else if (dimension === TransactionExplorerDataDimension.DateTime) { - const unixTime = transaction.time.toString(10); + const dateTime = isDefined(transactionTimeUtfOffset) ? parseDateTimeFromUnixTimeWithTimezoneOffset(transaction.time, transactionTimeUtfOffset) : parseDateTimeFromUnixTime(transaction.time); + const textualDateTime = `${dateTime.getGregorianCalendarYearDashMonthDashDay()} ${dateTime.getHour().toString(10).padStart(2, '0')}:${dateTime.getMinute().toString(10).padStart(2, '0')}:${dateTime.getSecond().toString(10).padStart(2, '0')}`; return { - categoryName: unixTime, - categoryId: unixTime, - categoryIdType: TransactionExplorerDimensionType.Other + categoryName: textualDateTime, + categoryId: textualDateTime, + categoryIdType: TransactionExplorerDimensionType.DateTime }; } else if (dimension === TransactionExplorerDataDimension.DateTimeByYearMonthDay) { - const unixTime = getDayFirstUnixTimeBySpecifiedUnixTime(transaction.time, transactionTimeUtfOffset).toString(10); + const dateTime = isDefined(transactionTimeUtfOffset) ? parseDateTimeFromUnixTimeWithTimezoneOffset(transaction.time, transactionTimeUtfOffset) : parseDateTimeFromUnixTime(transaction.time); + const yearMonthDay = dateTime.getGregorianCalendarYearDashMonthDashDay(); return { - categoryName: unixTime, - categoryId: unixTime, - categoryIdType: TransactionExplorerDimensionType.Other + categoryName: yearMonthDay, + categoryId: yearMonthDay, + categoryIdType: TransactionExplorerDimensionType.YearMonthDay }; } else if (dimension === TransactionExplorerDataDimension.DateTimeByYearMonth) { - const unixTime = getMonthFirstUnixTimeBySpecifiedUnixTime(transaction.time, transactionTimeUtfOffset).toString(10); + const dateTime = isDefined(transactionTimeUtfOffset) ? parseDateTimeFromUnixTimeWithTimezoneOffset(transaction.time, transactionTimeUtfOffset) : parseDateTimeFromUnixTime(transaction.time); + const yearMonth = dateTime.getGregorianCalendarYearDashMonth(); return { - categoryName: unixTime, - categoryId: unixTime, - categoryIdType: TransactionExplorerDimensionType.Other + categoryName: yearMonth, + categoryId: yearMonth, + categoryIdType: TransactionExplorerDimensionType.YearMonth }; } else if (dimension === TransactionExplorerDataDimension.DateTimeByYearQuarter) { - const unixTime = getQuarterFirstUnixTimeBySpecifiedUnixTime(transaction.time, transactionTimeUtfOffset).toString(10); + const dateTime = isDefined(transactionTimeUtfOffset) ? parseDateTimeFromUnixTimeWithTimezoneOffset(transaction.time, transactionTimeUtfOffset) : parseDateTimeFromUnixTime(transaction.time); + const yearQuarter = `${dateTime.getGregorianCalendarYear().toString(10)}-${dateTime.getGregorianCalendarQuarter().toString(10)}`; return { - categoryName: unixTime, - categoryId: unixTime, - categoryIdType: TransactionExplorerDimensionType.Other + categoryName: yearQuarter, + categoryId: yearQuarter, + categoryIdType: TransactionExplorerDimensionType.YearQuarter }; } else if (dimension === TransactionExplorerDataDimension.DateTimeByYear) { - const unixTime = getYearFirstUnixTimeBySpecifiedUnixTime(transaction.time, transactionTimeUtfOffset).toString(10); + const dateTime = isDefined(transactionTimeUtfOffset) ? parseDateTimeFromUnixTimeWithTimezoneOffset(transaction.time, transactionTimeUtfOffset) : parseDateTimeFromUnixTime(transaction.time); return { - categoryName: unixTime, - categoryId: unixTime, - categoryIdType: TransactionExplorerDimensionType.Other + categoryName: dateTime.getGregorianCalendarYear().toString(10), + categoryId: dateTime.getGregorianCalendarYear().toString(10), + categoryIdType: TransactionExplorerDimensionType.Year }; } else if (dimension === TransactionExplorerDataDimension.DateTimeByFiscalYear) { - const unixTime = getFiscalYearStartUnixTime(transaction.time, userStore.currentUserFiscalYearStart, transactionTimeUtfOffset).toString(10); + const fiscalYear = getFiscalYearFromUnixTime(transaction.time, userStore.currentUserFiscalYearStart, transactionTimeUtfOffset).toString(10); return { - categoryName: unixTime, - categoryId: unixTime, - categoryIdType: TransactionExplorerDimensionType.Other + categoryName: fiscalYear, + categoryId: fiscalYear, + categoryIdType: TransactionExplorerDimensionType.Year }; } else if (dimension === TransactionExplorerDataDimension.DateTimeByDayOfWeek) { const dateTime = isDefined(transactionTimeUtfOffset) ? parseDateTimeFromUnixTimeWithTimezoneOffset(transaction.time, transactionTimeUtfOffset) : parseDateTimeFromUnixTime(transaction.time); @@ -336,8 +343,8 @@ export const useExplorersStore = defineStore('explorers', () => { } } - function addTransactionToCategoriedDataMap(categoriedDataMap: Record, categoryDimension: TransactionExplorerDataDimension, seriesDemension: TransactionExplorerDataDimension, queryName: string, queryIndex: number, transaction: TransactionInsightDataItem): void { - const categoriedInfo = getDataCategoryInfo(categoryDimension, queryName, queryIndex, transaction); + function addTransactionToCategoriedDataMap(timezoneUsedForDateRange: number, categoriedDataMap: Record, categoryDimension: TransactionExplorerDataDimension, seriesDemension: TransactionExplorerDataDimension, queryName: string, queryIndex: number, transaction: TransactionInsightDataItem): void { + const categoriedInfo = getDataCategoryInfo(timezoneUsedForDateRange, categoryDimension, queryName, queryIndex, transaction); let categoriedData = categoriedDataMap[categoriedInfo.categoryId]; if (!categoriedData) { @@ -352,7 +359,7 @@ export const useExplorersStore = defineStore('explorers', () => { categoriedDataMap[categoriedInfo.categoryId] = categoriedData; } - const seriesedInfo = getDataCategoryInfo(seriesDemension, queryName, queryIndex, transaction); + const seriesedInfo = getDataCategoryInfo(timezoneUsedForDateRange, seriesDemension, queryName, queryIndex, transaction); let seriesedData = categoriedData.trasactions[seriesedInfo.categoryId]; if (!seriesedData) { @@ -375,10 +382,11 @@ export const useExplorersStore = defineStore('explorers', () => { startTime: 0, endTime: 0, query: [], + timezoneUsedForDateRange: TimezoneTypeForStatistics.Default.type, + chartType: TransactionExplorerChartType.Default.value, categoryDimension: TransactionExplorerDataDimension.CategoryDimensionDefault.value, seriesDimension: TransactionExplorerDataDimension.SeriesDimensionDefault.value, - valueMetric: TransactionExplorerValueMetric.Default.value, - chartType: TransactionExplorerChartType.Default.value + valueMetric: TransactionExplorerValueMetric.Default.value }); const transactionExplorerAllData = ref([]); @@ -498,13 +506,13 @@ export const useExplorersStore = defineStore('explorers', () => { for (const transaction of allTransactions.value) { if (!transactionExplorerFilter.value.query || transactionExplorerFilter.value.query.length < 1) { - addTransactionToCategoriedDataMap(categoriedDataMap, categoryDimension, seriesDimension, '', 0, transaction); + addTransactionToCategoriedDataMap(transactionExplorerFilter.value.timezoneUsedForDateRange, categoriedDataMap, categoryDimension, seriesDimension, '', 0, transaction); continue; } for (const [query, index] of itemAndIndex(transactionExplorerFilter.value.query)) { if (query.match(transaction)) { - addTransactionToCategoriedDataMap(categoriedDataMap, categoryDimension, seriesDimension, query.name, index, transaction); + addTransactionToCategoriedDataMap(transactionExplorerFilter.value.timezoneUsedForDateRange, categoriedDataMap, categoryDimension, seriesDimension, query.name, index, transaction); if (categoryDimension !== TransactionExplorerDataDimension.Query) { break; @@ -640,6 +648,7 @@ export const useExplorersStore = defineStore('explorers', () => { transactionExplorerFilter.value.startTime = 0; transactionExplorerFilter.value.endTime = 0; transactionExplorerFilter.value.query = []; + transactionExplorerFilter.value.timezoneUsedForDateRange = TimezoneTypeForStatistics.Default.type; transactionExplorerFilter.value.chartType = TransactionExplorerChartType.Default.value; transactionExplorerFilter.value.categoryDimension = TransactionExplorerDataDimension.CategoryDimensionDefault.value; transactionExplorerFilter.value.seriesDimension = TransactionExplorerDataDimension.SeriesDimensionDefault.value; @@ -686,6 +695,7 @@ export const useExplorersStore = defineStore('explorers', () => { if (resetQuery) { transactionExplorerFilter.value.query = []; + transactionExplorerFilter.value.timezoneUsedForDateRange = TimezoneTypeForStatistics.Default.type; transactionExplorerFilter.value.chartType = TransactionExplorerChartType.Default.value; transactionExplorerFilter.value.categoryDimension = TransactionExplorerDataDimension.CategoryDimensionDefault.value; transactionExplorerFilter.value.seriesDimension = TransactionExplorerDataDimension.SeriesDimensionDefault.value; @@ -711,6 +721,11 @@ export const useExplorersStore = defineStore('explorers', () => { changed = true; } + if (filter && isDefined(filter.timezoneUsedForDateRange) && transactionExplorerFilter.value.timezoneUsedForDateRange !== filter.timezoneUsedForDateRange) { + transactionExplorerFilter.value.timezoneUsedForDateRange = filter.timezoneUsedForDateRange; + changed = true; + } + if (filter && isDefined(filter.chartType) && transactionExplorerFilter.value.chartType !== filter.chartType) { transactionExplorerFilter.value.chartType = filter.chartType; changed = true; diff --git a/src/stores/setting.ts b/src/stores/setting.ts index f81bc2b7..39ca56f1 100644 --- a/src/stores/setting.ts +++ b/src/stores/setting.ts @@ -252,12 +252,6 @@ export const useSettingsStore = defineStore('settings', () => { updateUserApplicationCloudSettingValue('insightsExplorerDefaultDateRangeType', value); } - function setTimezoneUsedForInsightsExplorerPage(value: number): void { - updateApplicationSettingsValue('timezoneUsedForInsightsExplorerPage', value); - appSettings.value.timezoneUsedForInsightsExplorerPage = value; - updateUserApplicationCloudSettingValue('timezoneUsedForInsightsExplorerPage', value); - } - // Account List Page function setTotalAmountExcludeAccountIds(value: Record): void { updateApplicationSettingsValue('totalAmountExcludeAccountIds', value); @@ -482,7 +476,6 @@ export const useSettingsStore = defineStore('settings', () => { setAlwaysShowTransactionPicturesInMobileTransactionEditPage, // -- Insights Explorer Page setInsightsExplorerDefaultDateRangeType, - setTimezoneUsedForInsightsExplorerPage, // -- 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 83f43583..69906537 100644 --- a/src/views/base/settings/AppCloudSyncPageBase.ts +++ b/src/views/base/settings/AppCloudSyncPageBase.ts @@ -53,14 +53,13 @@ export const ALL_APPLICATION_CLOUD_SETTINGS: CategorizedApplicationCloudSettingI { categoryName: 'Insights Explorer Page', items: [ - { settingKey: 'insightsExplorerDefaultDateRangeType', settingName: 'Default Date Range', mobile: false, desktop: true }, - { settingKey: 'timezoneUsedForInsightsExplorerPage', settingName: 'Timezone Used for Date Range', mobile: false, desktop: true }, + { settingKey: 'insightsExplorerDefaultDateRangeType', settingName: 'Default Date Range', mobile: false, desktop: true } ] }, { categoryName: 'Account List Page', items: [ - { settingKey: 'totalAmountExcludeAccountIds', settingName: 'Accounts Included in Total', mobile: true, desktop: true }, + { settingKey: 'totalAmountExcludeAccountIds', settingName: 'Accounts Included in Total', mobile: true, desktop: true } ] }, { diff --git a/src/views/desktop/app/settings/tabs/AppBasicSettingTab.vue b/src/views/desktop/app/settings/tabs/AppBasicSettingTab.vue index fd7e6ad0..9b43bcec 100644 --- a/src/views/desktop/app/settings/tabs/AppBasicSettingTab.vue +++ b/src/views/desktop/app/settings/tabs/AppBasicSettingTab.vue @@ -240,18 +240,6 @@ v-model="insightsExplorerDefaultDateRangeType" /> - - - - @@ -339,7 +327,6 @@ import { useAppSettingPageBase } from '@/views/base/settings/AppSettingsPageBase import { useSettingsStore } from '@/stores/setting.ts'; import { useAccountsStore } from '@/stores/account.ts'; import { useTransactionCategoriesStore } from '@/stores/transactionCategory.ts'; -import { useExplorersStore } from '@/stores/explorer.ts'; import type { LocalizedSwitchOption } from '@/core/base.ts'; import { ThemeType } from '@/core/theme.ts'; @@ -383,7 +370,6 @@ const { const settingsStore = useSettingsStore(); const accountsStore = useAccountsStore(); const transactionCategoriesStore = useTransactionCategoriesStore(); -const explorersStore = useExplorersStore(); const snackbar = useTemplateRef('snackbar'); @@ -419,14 +405,6 @@ const insightsExplorerDefaultDateRangeType = computed({ set: (value) => settingsStore.setInsightsExplorerDefaultDateRangeType(value) }); -const timezoneUsedForInsightsExplorerPage = computed({ - get: () => settingsStore.appSettings.timezoneUsedForInsightsExplorerPage, - set: (value: number) => { - settingsStore.setTimezoneUsedForInsightsExplorerPage(value); - explorersStore.updateTransactionExplorerInvalidState(true); - } -}); - function init(): void { loadingAccounts.value = true; diff --git a/src/views/desktop/insights/ExplorerPage.vue b/src/views/desktop/insights/ExplorerPage.vue index bec33cbd..cd94dd3e 100644 --- a/src/views/desktop/insights/ExplorerPage.vue +++ b/src/views/desktop/insights/ExplorerPage.vue @@ -77,15 +77,25 @@ + :disabled="loading" :icon="true"> + + + @click="exportResults" + v-if="activeTab === 'table' || activeTab === 'chart'"> @@ -144,9 +154,10 @@ import { useTransactionCategoriesStore } from '@/stores/transactionCategory.ts'; import { useTransactionTagsStore } from '@/stores/transactionTag.ts'; import { type TransactionExplorerPartialFilter, type TransactionExplorerFilter, useExplorersStore } from '@/stores/explorer.ts'; -import type { NameNumeralValue } from '@/core/base.ts'; +import type { NameNumeralValue, TypeAndDisplayName } from '@/core/base.ts'; import type { NumeralSystem } from '@/core/numeral.ts'; import { type WeekDayValue, type LocalizedDateRange, DateRangeScene, DateRange } from '@/core/datetime.ts'; +import { TimezoneTypeForStatistics } from '@/core/timezone.ts'; import { type TransactionInsightDataItem @@ -166,6 +177,8 @@ import { mdiCheck, mdiRefresh, mdiDotsVertical, + mdiHomeClockOutline, + mdiInvoiceTextClockOutline, mdiExport } from '@mdi/js'; @@ -191,6 +204,7 @@ const display = useDisplay(); const { tt, getAllDateRanges, + getAllTimezoneTypesUsedForStatistics, getCurrentNumeralSystemType, formatDateTimeToLongDateTime, formatDateRange @@ -202,6 +216,11 @@ const transactionCategoriesStore = useTransactionCategoriesStore(); const transactionTagsStore = useTransactionTagsStore(); const explorersStore = useExplorersStore(); +const timezoneTypeIconMap = { + [TimezoneTypeForStatistics.ApplicationTimezone.type]: mdiHomeClockOutline, + [TimezoneTypeForStatistics.TransactionTimezone.type]: mdiInvoiceTextClockOutline +}; + const snackbar = useTemplateRef('snackbar'); const explorerDataTableTab = useTemplateRef('explorerDataTableTab'); const explorerChartTab = useTemplateRef('explorerChartTab'); @@ -224,6 +243,7 @@ const query = computed(() => explorersStore.transacti const filteredTransactions = computed(() => explorersStore.filteredTransactions); const allDateRanges = computed(() => getAllDateRanges(DateRangeScene.InsightsExplorer, true)); +const allTimezoneTypesUsedForDateRange = computed(() => getAllTimezoneTypesUsedForStatistics()); const canShiftDateRange = computed(() => query.value.dateRangeType !== DateRange.All.type); const displayQueryDateRangeName = computed(() => formatDateRange(query.value.dateRangeType, query.value.startTime, query.value.endTime)); const displayQueryStartTime = computed(() => formatDateTimeToLongDateTime(parseDateTimeFromUnixTime(query.value.startTime))); @@ -337,6 +357,12 @@ function reload(force: boolean): Promise | null { }); } +function updateTimezoneUsedForDateRange(timezoneType: number): void { + explorersStore.updateTransactionExplorerFilter({ + timezoneUsedForDateRange: timezoneType + }); +} + function exportResults(): void { if (activeTab.value === 'table' && filteredTransactions.value) { const results = explorerDataTableTab.value?.buildExportResults(); diff --git a/src/views/desktop/insights/tabs/ExplorerChartTab.vue b/src/views/desktop/insights/tabs/ExplorerChartTab.vue index 71eb5466..f9fa35d6 100644 --- a/src/views/desktop/insights/tabs/ExplorerChartTab.vue +++ b/src/views/desktop/insights/tabs/ExplorerChartTab.vue @@ -80,7 +80,6 @@ /> | undefined = undefined; - let dimessionType: TransactionExplorerDataDimensionType = TransactionExplorerDataDimension.None.value; + let dimessionType: TransactionExplorerDimensionType = TransactionExplorerDimensionType.Other; + let dimession: TransactionExplorerDataDimensionType = TransactionExplorerDataDimension.None.value; if ('categoryName' in info) { name = info.categoryName; needI18n = info.categoryNameNeedI18n; i18nParameters = info.categoryNameI18nParameters; - dimessionType = explorersStore.transactionExplorerFilter.categoryDimension; + dimessionType = info.categoryIdType; + dimession = explorersStore.transactionExplorerFilter.categoryDimension; } else if ('seriesName' in info) { name = info.seriesName; needI18n = info.seriesNameNeedI18n; i18nParameters = info.seriesNameI18nParameters; - dimessionType = explorersStore.transactionExplorerFilter.seriesDimension; + dimessionType = info.seriesIdType; + dimession = explorersStore.transactionExplorerFilter.seriesDimension; } let displayName: string = name; @@ -262,32 +264,40 @@ function getCategoriedDataDisplayName(info: CategoriedInfo | SeriesedInfo): stri } // convert the name to formatted date time if needed - if (dimessionType === TransactionExplorerDataDimension.DateTime.value) { - displayName = formatDateTimeToShortDateTime(parseDateTimeFromUnixTime(parseInt(name))); - } else if (dimessionType === TransactionExplorerDataDimension.DateTimeByYearMonthDay.value) { - displayName = formatDateTimeToShortDate(parseDateTimeFromUnixTime(parseInt(name))); - } else if (dimessionType === TransactionExplorerDataDimension.DateTimeByYearMonth.value) { - displayName = formatDateTimeToGregorianLikeShortYearMonth(parseDateTimeFromUnixTime(parseInt(name))); - } else if (dimessionType === TransactionExplorerDataDimension.DateTimeByYearQuarter.value) { - displayName = formatDateTimeToGregorianLikeYearQuarter(parseDateTimeFromUnixTime(parseInt(name))); - } else if (dimessionType === TransactionExplorerDataDimension.DateTimeByYear.value) { - displayName = formatDateTimeToGregorianLikeShortYear(parseDateTimeFromUnixTime(parseInt(name))); - } else if (dimessionType === TransactionExplorerDataDimension.DateTimeByFiscalYear.value) { - displayName = formatDateTimeToGregorianLikeFiscalYear(parseDateTimeFromUnixTime(parseInt(name))); - } else if (dimessionType === TransactionExplorerDataDimension.DateTimeByDayOfWeek.value) { + if (dimession === TransactionExplorerDataDimension.DateTime.value) { + const dateTime = parseDateTimeFromString(name, dimessionType); + displayName = dateTime ? formatDateTimeToShortDateTime(dateTime) : tt('Unknown'); + } else if (dimession === TransactionExplorerDataDimension.DateTimeByYearMonthDay.value) { + const dateTime = parseDateTimeFromString(name, dimessionType); + displayName = dateTime ? formatDateTimeToShortDate(dateTime) : tt('Unknown'); + } else if (dimession === TransactionExplorerDataDimension.DateTimeByYearMonth.value) { + const dateTime = parseDateTimeFromString(name, dimessionType); + displayName = dateTime ? formatDateTimeToGregorianLikeShortYearMonth(dateTime) : tt('Unknown'); + } else if (dimession === TransactionExplorerDataDimension.DateTimeByYearQuarter.value) { + const parts = name.split('-'); + const year = parts.length === 2 ? parts[0] : ''; + const quarter = parts.length === 2 ? parseInt(parts[1] as string) : 0; + const dateTime = year && quarter ? parseDateTimeFromString(`${year}-${quarter * 3}`, TransactionExplorerDimensionType.YearMonth) : undefined; + displayName = dateTime ? formatDateTimeToGregorianLikeYearQuarter(dateTime) : tt('Unknown'); + } else if (dimession === TransactionExplorerDataDimension.DateTimeByYear.value) { + const dateTime = parseDateTimeFromString(name, dimessionType); + displayName = dateTime ? formatDateTimeToGregorianLikeShortYear(dateTime) : tt('Unknown'); + } else if (dimession === TransactionExplorerDataDimension.DateTimeByFiscalYear.value) { + displayName = formatGregorianYearToGregorianLikeFiscalYear(parseInt(name)); + } else if (dimession === TransactionExplorerDataDimension.DateTimeByDayOfWeek.value) { const weekDay = WeekDay.parse(name); displayName = weekDay ? getWeekdayLongName(weekDay) : tt('Unknown'); - } else if (dimessionType === TransactionExplorerDataDimension.DateTimeByDayOfMonth.value) { + } else if (dimession === TransactionExplorerDataDimension.DateTimeByDayOfMonth.value) { displayName = getMonthdayShortName(parseInt(name)); - } else if (dimessionType === TransactionExplorerDataDimension.DateTimeByMonthOfYear.value) { + } else if (dimession === TransactionExplorerDataDimension.DateTimeByMonthOfYear.value) { const month = Month.valueOf(parseInt(name)); displayName = month ? getMonthLongName(month.name) : tt('Unknown'); - } else if (dimessionType === TransactionExplorerDataDimension.DateTimeByQuarterOfYear.value) { + } else if (dimession === TransactionExplorerDataDimension.DateTimeByQuarterOfYear.value) { displayName = getQuarterName(parseInt(name)); } - if (dimessionType === TransactionExplorerDataDimension.SourceAmount.value - || dimessionType === TransactionExplorerDataDimension.DestinationAmount.value) { + if (dimession === TransactionExplorerDataDimension.SourceAmount.value + || dimession === TransactionExplorerDataDimension.DestinationAmount.value) { if (name !== '' && name !== 'none' && Number.isFinite(parseInt(name))) { displayName = formatAmountToLocalizedNumerals(parseInt(name)); } diff --git a/src/views/desktop/insights/tabs/ExplorerDataTableTab.vue b/src/views/desktop/insights/tabs/ExplorerDataTableTab.vue index e1dedc3f..e56ca7de 100644 --- a/src/views/desktop/insights/tabs/ExplorerDataTableTab.vue +++ b/src/views/desktop/insights/tabs/ExplorerDataTableTab.vue @@ -15,6 +15,7 @@ {{ getDisplayDateTime(item) }} {{ getDisplayTimezone(item) }} + {{ getDisplayTimeInDefaultTimezone(item) }}