mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 01:41:39 +00:00
Fix eslint warnings (#5635)
* 01 fix eslint warnings * fix code warnings * fix code warnings * fix code warnings * fix code warnings * fix code warnings
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import { Button, Form, FormGroup, Input, Col } from 'reactstrap';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Form, FormGroup, Input, Col } from 'reactstrap';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import { gettext, orgID } from '../../utils/constants';
|
||||
@@ -18,11 +19,11 @@ class OrgUsersSearchUsersResult extends React.Component {
|
||||
|
||||
onFreezedItem = () => {
|
||||
this.setState({isItemFreezed: true});
|
||||
}
|
||||
};
|
||||
|
||||
onUnfreezedItem = () => {
|
||||
this.setState({isItemFreezed: false});
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
let { orgUsers } = this.props;
|
||||
@@ -60,6 +61,11 @@ class OrgUsersSearchUsersResult extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
OrgUsersSearchUsersResult.propTypes = {
|
||||
toggleDelete: PropTypes.func.isRequired,
|
||||
orgUsers: PropTypes.array.isRequired,
|
||||
};
|
||||
|
||||
class OrgUsersSearchUsers extends Component {
|
||||
|
||||
constructor(props) {
|
||||
@@ -96,7 +102,7 @@ class OrgUsersSearchUsers extends Component {
|
||||
errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
deleteUser = (email) => {
|
||||
seafileAPI.orgAdminDeleteOrgUser(orgID, email).then(res => {
|
||||
@@ -109,7 +115,7 @@ class OrgUsersSearchUsers extends Component {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
updateUser = (email, key, value) => {
|
||||
seafileAPI.sysAdminUpdateUser(email, key, value).then(res => {
|
||||
@@ -127,20 +133,20 @@ class OrgUsersSearchUsers extends Component {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
handleInputChange = (e) => {
|
||||
this.setState({
|
||||
query: e.target.value
|
||||
}, this.checkSubmitBtnActive);
|
||||
}
|
||||
};
|
||||
|
||||
checkSubmitBtnActive = () => {
|
||||
const { query } = this.state;
|
||||
this.setState({
|
||||
isSubmitBtnActive: query.trim()
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { query, isSubmitBtnActive } = this.state;
|
||||
|
Reference in New Issue
Block a user