mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-16 07:08:55 +00:00
fix org page warnings
This commit is contained in:
@@ -5,6 +5,8 @@ import { gettext, orgID } from '../../utils/constants';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
|
||||
const propTypes = {
|
||||
groupID: PropTypes.string,
|
||||
parentGroupID: PropTypes.string,
|
||||
toggle: PropTypes.func.isRequired,
|
||||
onDepartChanged: PropTypes.func.isRequired,
|
||||
};
|
||||
|
@@ -7,6 +7,7 @@ import UserSelect from '../user-select.js';
|
||||
|
||||
const propTypes = {
|
||||
toggle: PropTypes.func.isRequired,
|
||||
groupID: PropTypes.string.isRequired,
|
||||
onMemberChanged: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
@@ -6,6 +6,7 @@ import { seafileAPI } from '../../utils/seafile-api';
|
||||
|
||||
const propTypes = {
|
||||
toggle: PropTypes.func.isRequired,
|
||||
groupID: PropTypes.string.isRequired,
|
||||
onRepoChanged: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
|
@@ -7,6 +7,7 @@ import { Utils } from '../../utils/utils';
|
||||
|
||||
const propTypes = {
|
||||
groupName: PropTypes.string,
|
||||
groupID: PropTypes.number.isRequired,
|
||||
toggle: PropTypes.func.isRequired,
|
||||
onDepartChanged: PropTypes.func.isRequired
|
||||
};
|
||||
|
@@ -7,6 +7,7 @@ import { Utils } from '../../utils/utils';
|
||||
|
||||
const propTypes = {
|
||||
member: PropTypes.object.isRequired,
|
||||
groupID: PropTypes.string.isRequired,
|
||||
toggle: PropTypes.func.isRequired,
|
||||
onMemberChanged: PropTypes.func.isRequired
|
||||
};
|
||||
|
@@ -41,6 +41,7 @@ class DeleteRepoDialog extends React.Component {
|
||||
const propTypes = {
|
||||
repo: PropTypes.object.isRequired,
|
||||
toggle: PropTypes.func.isRequired,
|
||||
groupID: PropTypes.string.isRequired,
|
||||
onRepoChanged: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
@@ -420,6 +420,7 @@ class MemberItem extends React.Component {
|
||||
}
|
||||
|
||||
const MemberItemPropTypes = {
|
||||
groupID: PropTypes.string.isRequired,
|
||||
member: PropTypes.object.isRequired,
|
||||
isItemFreezed: PropTypes.bool.isRequired,
|
||||
onMemberChanged: PropTypes.func.isRequired,
|
||||
@@ -509,6 +510,7 @@ class GroupItem extends React.Component {
|
||||
|
||||
const GroupItemPropTypes = {
|
||||
group: PropTypes.object.isRequired,
|
||||
groupID: PropTypes.string,
|
||||
showSetGroupQuotaDialog: PropTypes.func.isRequired,
|
||||
showDeleteDepartDialog: PropTypes.func.isRequired,
|
||||
isSubdepartChanged: PropTypes.bool,
|
||||
@@ -516,4 +518,11 @@ const GroupItemPropTypes = {
|
||||
|
||||
GroupItem.propTypes = GroupItemPropTypes;
|
||||
|
||||
|
||||
const OrgDepartmentItemPropTypes = {
|
||||
groupID: PropTypes.string,
|
||||
};
|
||||
|
||||
OrgDepartmentItem.propTypes = OrgDepartmentItemPropTypes;
|
||||
|
||||
export default OrgDepartmentItem;
|
@@ -20,7 +20,7 @@ class OrgDepartmentsList extends React.Component {
|
||||
super(props);
|
||||
this.state = {
|
||||
groups: null,
|
||||
groupID: -1,
|
||||
groupID: '',
|
||||
groupName: '',
|
||||
showDeleteDepartDialog: false,
|
||||
showSetGroupQuotaDialog: false,
|
||||
@@ -71,7 +71,6 @@ class OrgDepartmentsList extends React.Component {
|
||||
<ModalPortal>
|
||||
<AddDepartDialog
|
||||
onDepartChanged={this.onDepartChanged}
|
||||
parentGroupID={this.props.groupID}
|
||||
groupID={this.state.groupID}
|
||||
toggle={this.toggleAddDepartDialog}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user