mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat:(item) : catch error message.
This commit is contained in:
@@ -107,6 +107,14 @@ function ItemForm({
|
||||
if (errors.find((e) => e.type === 'ITEM.NAME.ALREADY.EXISTS')) {
|
||||
fields.name = formatMessage({ id: 'the_name_used_before' });
|
||||
}
|
||||
if (errors.find((e) => e.type === 'INVENTORY_ACCOUNT_CANNOT_MODIFIED')) {
|
||||
AppToaster.show({
|
||||
message: formatMessage({
|
||||
id: 'cannot_change_item_inventory_account',
|
||||
}),
|
||||
intent: Intent.DANGER,
|
||||
});
|
||||
}
|
||||
return fields;
|
||||
};
|
||||
|
||||
|
||||
@@ -1034,6 +1034,7 @@ export default {
|
||||
'This customer cannot be deleted as it is associated with transactions.',
|
||||
this_vendor_cannot_be_deleted_as_it_is_associated_with_transactions:
|
||||
'This vendor cannot be deleted as it is associated with transactions.',
|
||||
|
||||
currency_sign: 'Currency sign',
|
||||
cannot_change_item_inventory_account:
|
||||
'Cannot change item inventory account while the item has transactions.',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user