migrate transaction store to composition API and typescript

This commit is contained in:
MaysWind
2025-01-28 11:58:42 +08:00
parent 50c3fee7dc
commit 782bc11950
25 changed files with 1948 additions and 1496 deletions
+1 -2
View File
@@ -8,8 +8,7 @@ import { useTransactionCategoriesStore } from './transactionCategory.ts';
import { useTransactionTagsStore } from './transactionTag.ts';
// @ts-expect-error the above file is migrating to ts
import { useTransactionTemplatesStore } from './transactionTemplate.js';
// @ts-expect-error the above file is migrating to ts
import { useTransactionsStore } from './transaction.js';
import { useTransactionsStore } from './transaction.ts';
import { useOverviewStore } from './overview.ts';
import { useStatisticsStore } from './statistics.ts';
import { useExchangeRatesStore } from './exchangeRates.ts';
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -238,11 +238,11 @@ export const useTransactionTemplatesStore = defineStore('transactionTemplates',
}
if (template.type === TransactionType.Expense) {
submitTemplate.categoryId = template.expenseCategory;
submitTemplate.categoryId = template.expenseCategoryId;
} else if (template.type === TransactionType.Income) {
submitTemplate.categoryId = template.incomeCategory;
submitTemplate.categoryId = template.incomeCategoryId;
} else if (template.type === TransactionType.Transfer) {
submitTemplate.categoryId = template.transferCategory;
submitTemplate.categoryId = template.transferCategoryId;
submitTemplate.destinationAccountId = template.destinationAccountId;
submitTemplate.destinationAmount = template.destinationAmount;
} else {