feat: handle item error.

This commit is contained in:
elforjani13
2022-03-24 15:03:25 +02:00
parent 8404fee10a
commit 86cab7988c
3 changed files with 11 additions and 4 deletions

View File

@@ -104,6 +104,14 @@ export const handleDeleteErrors = (errors) => {
intent: Intent.DANGER,
});
}
if (
errors.find((error) => error.type === 'ITEM_HAS_ASSOCIATED_TRANSACTIONS')
) {
AppToaster.show({
message: intl.get('item.error.you_could_not_delete_item_has_associated'),
intent: Intent.DANGER,
});
}
};
/**