add transaction template

This commit is contained in:
MaysWind
2024-07-29 00:53:19 +08:00
parent 4c69243bef
commit de086aa29e
25 changed files with 2109 additions and 44 deletions
+8
View File
@@ -37,6 +37,10 @@ export function categoryTypeToTransactionType(categoryType) {
}
export function getTransactionPrimaryCategoryName(categoryId, allCategories) {
if (!allCategories) {
return '';
}
for (let i = 0; i < allCategories.length; i++) {
for (let j = 0; j < allCategories[i].subCategories.length; j++) {
const subCategory = allCategories[i].subCategories[j];
@@ -50,6 +54,10 @@ export function getTransactionPrimaryCategoryName(categoryId, allCategories) {
}
export function getTransactionSecondaryCategoryName(categoryId, allCategories) {
if (!allCategories) {
return '';
}
for (let i = 0; i < allCategories.length; i++) {
for (let j = 0; j < allCategories[i].subCategories.length; j++) {
const subCategory = allCategories[i].subCategories[j];