mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 16:31:13 +00:00
Improve response catch module (#3848)
* add err hanlder for dialog ajax request * add error handler for component ajax request * repair code bug * repair code bug * add handler for page ajax module
This commit is contained in:
@@ -3,6 +3,8 @@ import PropTypes from 'prop-types';
|
||||
import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Input, InputGroupAddon, InputGroup } from 'reactstrap';
|
||||
import { gettext, orgID } from '../../utils/constants';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import toaster from '../toast';
|
||||
|
||||
const propTypes = {
|
||||
toggle: PropTypes.func.isRequired,
|
||||
@@ -35,6 +37,9 @@ class SetGroupQuotaDialog extends React.Component {
|
||||
seafileAPI.orgAdminSetGroupQuota(orgID, this.props.groupID, newQuota).then((res) => {
|
||||
this.props.toggle();
|
||||
this.props.onDepartChanged();
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
});
|
||||
} else {
|
||||
const err = gettext('Quota is invalid.');
|
||||
|
Reference in New Issue
Block a user