re-structure to monorepo.

This commit is contained in:
a.bouhuolia
2023-02-03 01:02:31 +02:00
parent 8242ec64ba
commit 7a0a13f9d5
10400 changed files with 46966 additions and 17223 deletions

View File

@@ -0,0 +1,26 @@
// @ts-nocheck
import intl from 'react-intl-universal';
import { Intent } from '@blueprintjs/core';
import { AppToaster } from '@/components';
/**
* Handle delete errors.
*/
export const handleDeleteErrors = (errors) => {
if (
errors.find((error) => error.type === 'COULD_NOT_DELETE_ONLY_WAERHOUSE')
) {
AppToaster.show({
message: intl.get('warehouse.error.could_not_delete_only_waerhouse'),
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,
});
}
};