fix: loading spinner style in dialog/alert component.

feat: add sell and purchase description fields.
This commit is contained in:
a.bouhuolia
2021-02-08 14:44:17 +02:00
parent 9422fb2b86
commit 01aaa9de25
6 changed files with 72 additions and 15 deletions

View File

@@ -94,8 +94,10 @@ function ItemForm({
);
// Transform API errors.
const transformApiErrors = (errors) => {
const transformApiErrors = (error) => {
const { response: { data: { errors } } } = error;
const fields = {};
if (errors.find((e) => e.type === 'ITEM.NAME.ALREADY.EXISTS')) {
fields.name = formatMessage({ id: 'the_name_used_before' });
}