refactoring: inventory adjustments list.

refactoring: items categories list.
This commit is contained in:
a.bouhuolia
2021-02-09 13:56:37 +02:00
parent 1a99584c9a
commit 6e10ed0721
32 changed files with 497 additions and 882 deletions

View File

@@ -67,7 +67,7 @@ function ItemCategoryForm({
const afterSubmit = () => {
closeDialog(dialogName);
};
// Handle the response success/
// Handle the response success.
const onSuccess = ({ response }) => {
AppToaster.show({
message: formatMessage({
@@ -80,7 +80,9 @@ function ItemCategoryForm({
afterSubmit(response);
};
// Handle the response error.
const onError = (errors) => {
const onError = (error) => {
const { response: { data: { errors } } } = error;
transformErrors(errors, { setErrors });
setSubmitting(false);
};