mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 01:04:25 +08:00
fix the incorrect display type name of transaction categories
This commit is contained in:
@@ -139,7 +139,7 @@
|
||||
<div class="overflow-y-auto px-3" :class="{ 'disabled': !usePresetCategories || submitting || navigateToHomePage }" style="max-height: 323px">
|
||||
<v-row :key="categoryType" v-for="(categories, categoryType) in allPresetCategories">
|
||||
<v-col cols="12" md="12">
|
||||
<h4 class="mb-3">{{ getCategoryTypeName(categoryType) }}</h4>
|
||||
<h4 class="mb-3">{{ getCategoryTypeName(parseInt(categoryType)) }}</h4>
|
||||
|
||||
<v-expansion-panels class="border rounded" variant="accordion" multiple>
|
||||
<v-expansion-panel :key="idx" v-for="(category, idx) in categories">
|
||||
@@ -220,8 +220,8 @@ import { useSignupPageBase } from '@/views/base/SignupPageBase.ts';
|
||||
|
||||
import { useRootStore } from '@/stores/index.ts';
|
||||
|
||||
import type { PartialRecord, TypeAndDisplayName } from '@/core/base.ts';
|
||||
import { type LocalizedPresetCategory, CategoryType } from '@/core/category.ts';
|
||||
import type { TypeAndDisplayName } from '@/core/base.ts';
|
||||
import { type LocalizedPresetCategory } from '@/core/category.ts';
|
||||
import { ThemeType } from '@/core/theme.ts';
|
||||
import { APPLICATION_LOGO_PATH } from '@/consts/asset.ts';
|
||||
|
||||
@@ -262,7 +262,7 @@ const finalResultMessage = ref<string | null>(null);
|
||||
const navigateToHomePage = ref<boolean>(false);
|
||||
|
||||
const allWeekDays = computed<TypeAndDisplayName[]>(() => getAllWeekDays());
|
||||
const allPresetCategories = computed<PartialRecord<CategoryType, LocalizedPresetCategory[]>>(() => getAllTransactionDefaultCategories(0, currentLocale.value));
|
||||
const allPresetCategories = computed<Record<string, LocalizedPresetCategory[]>>(() => getAllTransactionDefaultCategories(0, currentLocale.value));
|
||||
const isDarkMode = computed<boolean>(() => theme.global.name.value === ThemeType.Dark);
|
||||
|
||||
const allSteps = computed<StepBarItem[]>(() => {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<v-card-text class="preset-transaction-categories mt-sm-2 mt-md-4 pt-0">
|
||||
<template :key="categoryType" v-for="(categories, categoryType) in allPresetCategories">
|
||||
<div class="d-flex align-center mb-1">
|
||||
<h4>{{ getCategoryTypeName(categoryType) }}</h4>
|
||||
<h4>{{ getCategoryTypeName(parseInt(categoryType)) }}</h4>
|
||||
<v-spacer/>
|
||||
<language-select-button :disabled="submitting"
|
||||
:use-model-value="true" v-model="currentLocale" />
|
||||
@@ -64,7 +64,6 @@ import { useI18n } from '@/locales/helpers.ts';
|
||||
|
||||
import { useTransactionCategoriesStore } from '@/stores/transactionCategory.ts';
|
||||
|
||||
import type { PartialRecord } from '@/core/base.ts';
|
||||
import { type LocalizedPresetCategory, CategoryType } from '@/core/category.ts';
|
||||
import { categorizedArrayToPlainArray } from '@/lib/common.ts';
|
||||
import { localizedPresetCategoriesToTransactionCategoryCreateWithSubCategories } from '@/lib/category.ts';
|
||||
@@ -90,14 +89,14 @@ const snackbar = useTemplateRef<SnackBarType>('snackbar');
|
||||
const currentLocale = ref<string>(getCurrentLanguageTag());
|
||||
const submitting = ref<boolean>(false);
|
||||
|
||||
const allPresetCategories = computed<PartialRecord<CategoryType, LocalizedPresetCategory[]>>(() => getAllTransactionDefaultCategories(props.categoryType, currentLocale.value));
|
||||
const allPresetCategories = computed<Record<string, LocalizedPresetCategory[]>>(() => getAllTransactionDefaultCategories(props.categoryType, currentLocale.value));
|
||||
|
||||
const showState = computed<boolean>({
|
||||
get: () => props.show,
|
||||
set: (value) => emit('update:show', value)
|
||||
});
|
||||
|
||||
function getCategoryTypeName(categoryType: CategoryType): string {
|
||||
function getCategoryTypeName(categoryType: number): string {
|
||||
switch (categoryType) {
|
||||
case CategoryType.Income:
|
||||
return tt('Income Categories');
|
||||
|
||||
Reference in New Issue
Block a user