mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 07:57:33 +08:00
code refactor
This commit is contained in:
@@ -358,25 +358,6 @@ function getCategoryInfo(categoryId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function getPlainAccounts(allAccounts) {
|
||||
const ret = [];
|
||||
|
||||
for (let i = 0; i < allAccounts.length; i++) {
|
||||
const account = allAccounts[i];
|
||||
|
||||
if (account.type === accountConstants.allAccountTypes.SingleAccount) {
|
||||
ret.push(account);
|
||||
} else if (account.type === accountConstants.allAccountTypes.MultiSubAccounts) {
|
||||
for (let j = 0; j < account.subAccounts.length; j++) {
|
||||
const subAccount = account.subAccounts[j];
|
||||
ret.push(subAccount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
function getCategorizedAccounts(allAccounts) {
|
||||
const ret = {};
|
||||
|
||||
@@ -490,7 +471,6 @@ export default {
|
||||
generateRandomString,
|
||||
parseUserAgent,
|
||||
getCategoryInfo,
|
||||
getPlainAccounts,
|
||||
getCategorizedAccounts,
|
||||
getAllFilteredAccountsBalance,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user