feat: handle error message.

This commit is contained in:
elforjani13
2021-12-07 20:56:54 +02:00
parent 78c42acb17
commit 14f33c667b
3 changed files with 45 additions and 1 deletions

View File

@@ -99,6 +99,18 @@ export const handleDeleteErrors = (errors) => {
intent: Intent.DANGER,
});
}
if (
errors.find(
(error) => error.type === 'SALE_INVOICE_HAS_APPLIED_TO_CREDIT_NOTES',
)
) {
AppToaster.show({
message: intl.get(
'invoices.error.you_couldn_t_delete_sale_invoice_that_has_reconciled',
),
intent: Intent.DANGER,
});
}
};
export function ActionsMenu({