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,24 @@
// @ts-nocheck
import React from 'react';
import intl from 'react-intl-universal';
import { Intent } from '@blueprintjs/core';
import { AppToaster } from '@/components';
export const transformErrors = (errors) => {
if (errors.find((error) => error.type === 'VENDOR.HAS.ASSOCIATED.BILLS')) {
AppToaster.show({
message: intl.get(
'cannot_delete_vendor_that_has_associated_purchase_bills',
),
intent: Intent.DANGER,
});
}
if (errors.find((error) => error.type === 'VENDOR_HAS_TRANSACTIONS')) {
AppToaster.show({
message: intl.get(
'this_vendor_cannot_be_deleted_as_it_is_associated_with_transactions',
),
intent: Intent.DANGER,
});
}
};