feat(warehouseTransfer): handle error.

This commit is contained in:
elforjani13
2022-02-03 01:03:00 +02:00
parent e7024955dd
commit 9d5440961b
2 changed files with 24 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ import { compose, orderingLinesIndexes, transactionNumber } from 'utils';
import {
defaultWarehouseTransfer,
transformValueToRequest,
transformErrors,
transformToEditForm,
} from './utils';
@@ -97,6 +98,9 @@ function WarehouseTransferForm({
data: { errors },
},
}) => {
if (errors) {
transformErrors(errors, { setErrors });
}
setSubmitting(false);
};