mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat(branches & warehouses): handle errors.
This commit is contained in:
@@ -12,4 +12,10 @@ export const handleDeleteErrors = (errors) => {
|
||||
intent: Intent.DANGER,
|
||||
});
|
||||
}
|
||||
if (errors.some((e) => e.type === 'BRANCH_HAS_ASSOCIATED_TRANSACTIONS')) {
|
||||
AppToaster.show({
|
||||
message: intl.get('branche.error.branch_has_associated_transactions'),
|
||||
intent: Intent.DANGER,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,4 +14,12 @@ export const handleDeleteErrors = (errors) => {
|
||||
intent: Intent.DANGER,
|
||||
});
|
||||
}
|
||||
if (errors.some((e) => e.type === 'WAREHOUSE_HAS_ASSOCIATED_TRANSACTIONS')) {
|
||||
AppToaster.show({
|
||||
message: intl.get(
|
||||
'warehouse.error.warehouse_has_associated_transactions',
|
||||
),
|
||||
intent: Intent.DANGER,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ import ReceiptItemsEntriesEditor from './ReceiptItemsEntriesEditor';
|
||||
import ReceiptFormFloatingActions from './ReceiptFormFloatingActions';
|
||||
import ReceiptFormFooter from './ReceiptFormFooter';
|
||||
import ReceiptFormDialogs from './ReceiptFormDialogs';
|
||||
import ReceiptFormTopBar from './ReceiptFormTopBar';
|
||||
import ReceiptFormTopBar from './ReceiptFormTopbar';
|
||||
|
||||
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
||||
import withSettings from 'containers/Settings/withSettings';
|
||||
|
||||
@@ -1898,6 +1898,8 @@
|
||||
"vendor_opening_balance.label.opening_balance_at": "Opening balance at",
|
||||
"customer.label.opening_branch": "Opening Balance Branch",
|
||||
"vendor.label.opening_branch": "Opening Balance Branch",
|
||||
"warehouse.error.warehouse_code_not_unique":"Warehouse code not unique",
|
||||
"branche.error.warehouse_code_not_unique":"Branch code not unique"
|
||||
"warehouse.error.warehouse_code_not_unique": "Warehouse code not unique",
|
||||
"warehouse.error.warehouse_has_associated_transactions": "You could not delete the warehouse that has associated transactions.",
|
||||
"branche.error.warehouse_code_not_unique": "Branch code not unique",
|
||||
"branche.error.branch_has_associated_transactions": "You could not delete the branch that has associated transactions."
|
||||
}
|
||||
Reference in New Issue
Block a user