fix: invalidate account cache on bulk uncategorizing

This commit is contained in:
Ahmed Bouhuolia
2024-08-12 10:11:40 +02:00
parent faa81abee4
commit 9a34f3e283
3 changed files with 10 additions and 8 deletions

View File

@@ -47,16 +47,17 @@ export function useUncategorizeTransactionsBulkAction(
t.CASHFLOW_ACCOUNT_UNCATEGORIZED_TRANSACTIONS_INFINITY,
);
// Invalidate the account transactions.
queryClient.invalidateQueries(
t.CASHFLOW_ACCOUNT_TRANSACTIONS_INFINITY
);
// invalidate bank account summary.
queryClient.invalidateQueries(t.CASHFLOW_ACCOUNT_TRANSACTIONS_INFINITY);
// Invalidate bank account summary.
queryClient.invalidateQueries(BANK_QUERY_KEY.BANK_ACCOUNT_SUMMARY_META);
// Invalidate the recognized transactions.
queryClient.invalidateQueries([
BANK_QUERY_KEY.RECOGNIZED_BANK_TRANSACTIONS_INFINITY,
]);
// Invalidate the account.
queryClient.invalidateQueries(t.ACCOUNT);
},
...options,
},