fix(server): Handle the delete error when the matched transaction

This commit is contained in:
Ahmed Bouhuolia
2024-06-29 10:30:03 +02:00
parent 978ce6c441
commit cb1f587637
9 changed files with 92 additions and 14 deletions

View File

@@ -0,0 +1,11 @@
import { AppToaster } from '@/components';
import { Intent } from '@blueprintjs/core';
export const handleDeleteErrors = (errors: any) => {
if (errors.find((e: any) => e.type === 'CANNOT_DELETE_TRANSACTION_MATCHED')) {
AppToaster.show({
intent: Intent.DANGER,
message: 'Cannot delete a transaction matched with a bank transaction.',
});
}
};