mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 00:12:11 +08:00
code refactor
This commit is contained in:
@@ -953,28 +953,10 @@ export default {
|
||||
return this.$locale.getDisplayCurrency(amount);
|
||||
},
|
||||
getPrimaryCategoryName(categoryId, allCategories) {
|
||||
for (let i = 0; i < allCategories.length; i++) {
|
||||
for (let j = 0; j < allCategories[i].subCategories.length; j++) {
|
||||
const subCategory = allCategories[i].subCategories[j];
|
||||
if (subCategory.id === categoryId) {
|
||||
return allCategories[i].name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
return this.$utilities.getTransactionPrimaryCategoryName(categoryId, allCategories);
|
||||
},
|
||||
getSecondaryCategoryName(categoryId, allCategories) {
|
||||
for (let i = 0; i < allCategories.length; i++) {
|
||||
for (let j = 0; j < allCategories[i].subCategories.length; j++) {
|
||||
const subCategory = allCategories[i].subCategories[j];
|
||||
if (subCategory.id === categoryId) {
|
||||
return subCategory.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
return this.$utilities.getTransactionSecondaryCategoryName(categoryId, allCategories);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user