mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: uncategorize transaciton catch validation errors
This commit is contained in:
@@ -56,7 +56,21 @@ function AccountDeleteTransactionAlert({
|
||||
response: {
|
||||
data: { errors },
|
||||
},
|
||||
}) => {},
|
||||
}) => {
|
||||
if (
|
||||
errors.find(
|
||||
(e) =>
|
||||
e.type ===
|
||||
'CANNOT_DELETE_TRANSACTION_CONVERTED_FROM_UNCATEGORIZED',
|
||||
)
|
||||
) {
|
||||
AppToaster.show({
|
||||
message:
|
||||
'Cannot delete transaction converted from uncategorized transaction but you uncategorize it.',
|
||||
intent: Intent.DANGER,
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.finally(() => {
|
||||
closeAlert(name);
|
||||
|
||||
Reference in New Issue
Block a user