fix the incorrect display type name of transaction categories

This commit is contained in:
MaysWind
2025-11-13 23:59:56 +08:00
parent 32cb2b2354
commit 8b34750426
8 changed files with 24 additions and 26 deletions
+4 -4
View File
@@ -2,7 +2,7 @@ import { useI18n as useVueI18n } from 'vue-i18n';
import moment from 'moment-timezone';
import 'moment-timezone/moment-timezone-utils';
import type { PartialRecord, NameValue, TypeAndName, TypeAndDisplayName, LocalizedSwitchOption } from '@/core/base.ts';
import type { NameValue, TypeAndName, TypeAndDisplayName, LocalizedSwitchOption } from '@/core/base.ts';
import {
type LanguageInfo,
@@ -1341,8 +1341,8 @@ export function useI18n() {
return ret;
}
function getAllTransactionDefaultCategories(categoryType: 0 | CategoryType, locale: string): PartialRecord<CategoryType, LocalizedPresetCategory[]> {
const allCategories: PartialRecord<CategoryType, LocalizedPresetCategory[]> = {};
function getAllTransactionDefaultCategories(categoryType: 0 | CategoryType, locale: string): Record<string, LocalizedPresetCategory[]> {
const allCategories: Record<string, LocalizedPresetCategory[]> = {};
const categoryTypes: CategoryType[] = [];
if (categoryType === 0) {
@@ -1386,7 +1386,7 @@ export function useI18n() {
categories.push(submitCategory);
}
allCategories[categoryType] = categories;
allCategories[`${categoryType}`] = categories;
}
return allCategories;