Fix errors in admin panel departments. (#808)

This commit is contained in:
LautaroCesso 2020-06-16 12:49:30 -03:00 committed by GitHub
parent 1e7a3e2f4a
commit 978a988035
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ class AdminPanelDepartments extends React.Component {
errors: {},
defaultDepartmentError: null,
form: {
title: '',
name: '',
language: 'en',
private: 0,
},
@ -279,7 +279,7 @@ class AdminPanelDepartments extends React.Component {
private: form.private ? 1 : 0
}
}).then(() => {
this.setState({formLoading: false,errorMessage: false, defaultDepartmentError: null});
this.setState({formLoading: false, errorMessage: false, defaultDepartmentError: null});
this.retrieveDepartments();
}).catch(result => this.setState({formLoading: false, errorMessage: result.message, defaultDepartmentError: null}));
} else {
@ -295,7 +295,7 @@ class AdminPanelDepartments extends React.Component {
this.onItemChange(-1);
}).catch(() => {
this.onItemChange.bind(this, -1)
this.setState({defaultDepartmentError: null});
this.setState({formLoading: false, defaultDepartmentError: null});
});
}
}