refactoring: migrating to react-query to manage service-side state.

This commit is contained in:
a.bouhuolia
2021-02-07 08:10:21 +02:00
parent e093be0663
commit adac2386bb
284 changed files with 8255 additions and 6610 deletions

View File

@@ -157,7 +157,7 @@ export default class ExpensesService implements IExpensesService {
const invalidExpenseAccounts: number[] = [];
expensesAccounts.forEach((expenseAccount) => {
if (expenseAccount.isRootType(ACCOUNT_ROOT_TYPE.EXPENSE)) {
if (!expenseAccount.isRootType(ACCOUNT_ROOT_TYPE.EXPENSE)) {
invalidExpenseAccounts.push(expenseAccount.id);
}
});
@@ -181,7 +181,7 @@ export default class ExpensesService implements IExpensesService {
paymentAccount,
});
if (paymentAccount.isParentType(ACCOUNT_PARENT_TYPE.CURRENT_ASSET)) {
if (!paymentAccount.isParentType(ACCOUNT_PARENT_TYPE.CURRENT_ASSET)) {
this.logger.info(
'[expenses] the given payment account has invalid type',
{ tenantId, paymentAccount }