mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
LOOK..
This commit is contained in:
@@ -9,10 +9,10 @@ import { transformToForm } from 'utils';
|
|||||||
import {
|
import {
|
||||||
CreateItemCategoryFormSchema,
|
CreateItemCategoryFormSchema,
|
||||||
EditItemCategoryFormSchema,
|
EditItemCategoryFormSchema,
|
||||||
} from './ItemCategoryForm.schema';
|
} from './itemCategoryForm.schema';
|
||||||
|
|
||||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||||
import ItemCategoryFormContent from './ItemCategoryFormContent'
|
import ItemCategoryFormContent from './ItemCategoryFormContent';
|
||||||
import { compose } from 'utils';
|
import { compose } from 'utils';
|
||||||
|
|
||||||
const defaultInitialValues = {
|
const defaultInitialValues = {
|
||||||
@@ -30,7 +30,6 @@ function ItemCategoryForm({
|
|||||||
// #withDialogActions
|
// #withDialogActions
|
||||||
closeDialog,
|
closeDialog,
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
isNewMode,
|
isNewMode,
|
||||||
itemCategory,
|
itemCategory,
|
||||||
@@ -81,7 +80,11 @@ function ItemCategoryForm({
|
|||||||
};
|
};
|
||||||
// Handle the response error.
|
// Handle the response error.
|
||||||
const onError = (error) => {
|
const onError = (error) => {
|
||||||
const { response: { data: { errors } } } = error;
|
const {
|
||||||
|
response: {
|
||||||
|
data: { errors },
|
||||||
|
},
|
||||||
|
} = error;
|
||||||
|
|
||||||
transformErrors(errors, { setErrors });
|
transformErrors(errors, { setErrors });
|
||||||
setSubmitting(false);
|
setSubmitting(false);
|
||||||
@@ -108,6 +111,4 @@ function ItemCategoryForm({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default compose(
|
export default compose(withDialogActions)(ItemCategoryForm);
|
||||||
withDialogActions,
|
|
||||||
)(ItemCategoryForm);
|
|
||||||
|
|||||||
Reference in New Issue
Block a user