feat: Bad Debt.

This commit is contained in:
elforjani13
2021-11-01 20:24:01 +02:00
parent 613454a862
commit 91b848f158
25 changed files with 734 additions and 12 deletions

View File

@@ -0,0 +1,17 @@
import React from 'react';
import { Intent } from '@blueprintjs/core';
import { AppToaster } from 'components';
/**
* Transformes the response errors types.
*/
export const transformErrors = (errors, { setErrors }) => {
if (errors.some(({ type }) => type === 'SALE_INVOICE_ALREADY_WRITTEN_OFF')) {
AppToaster.show({
message: 'SALE_INVOICE_ALREADY_WRITTEN_OFF',
// message: intl.get(''),
intent: Intent.DANGER,
});
}
};