1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 10:26:17 +00:00

fix-org-member

This commit is contained in:
Michael An
2019-04-30 10:28:32 +08:00
parent 9fbd04e74c
commit 7c2fb46e31
5 changed files with 70 additions and 58 deletions

View File

@@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { seafileAPI } from '../../utils/seafile-api';
import { siteRoot, serviceURL, gettext, orgID, lang } from '../../utils/constants';
import { serviceURL, gettext, orgID, lang } from '../../utils/constants';
import { Utils } from '../../utils/utils.js';
import ModalPortal from '../../components/modal-portal';
import AddDepartDialog from '../../components/dialog/org-add-department-dialog';
@@ -28,15 +28,11 @@ class OrgDepartmentsList extends React.Component {
listDepartGroups = () => {
if (this.props.groupID) {
seafileAPI.orgAdminListGroupInfo(orgID, this.props.groupID, true).then(res => {
this.setState({
groups: res.data.groups
});
this.setState({ groups: res.data.groups });
});
} else {
seafileAPI.orgAdminListDepartGroups(orgID).then(res => {
this.setState({
groups: res.data.data
});
this.setState({ groups: res.data.data });
});
}
}
@@ -141,6 +137,14 @@ class OrgDepartmentsList extends React.Component {
}
}
const OrgDepartmentsListPropTypes = {
isShowAddDepartDialog: PropTypes.bool.isRequired,
toggleAddDepartDialog: PropTypes.func.isRequired,
};
OrgDepartmentsList.propTypes = OrgDepartmentsListPropTypes;
class GroupItem extends React.Component {
constructor(props) {