1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 00:43:53 +00:00

repair group-settings show bug (#4052)

* repair group-settings show bug

* optimized code
This commit is contained in:
杨顺强
2019-09-04 15:52:24 +08:00
committed by Daniel Pan
parent 0975fc064f
commit bce32fb11d

View File

@@ -392,7 +392,16 @@ class GroupView extends React.Component {
render() {
let { errMessage, emptyTip, currentGroup, isDepartmentGroup, isStaff } = this.state;
let isShowSettingIcon = !(currentGroup && currentGroup.parent_group_id !== 0 && currentGroup.admins.indexOf(username) === -1);
let isShowSettingIcon = false;
if (currentGroup) { // group message is loaded
if (currentGroup.parent_group_id === 0) {
isShowSettingIcon = true;
} else {
if (currentGroup.admins.indexOf(username) > -1) {
isShowSettingIcon = true;
}
}
}
let useRate = 0;
if (isDepartmentGroup && currentGroup.group_quota) {
useRate = currentGroup.group_quota_usage / currentGroup.group_quota * 100 + '%';