mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 10:22:46 +00:00
repair group-settings show bug (#4052)
* repair group-settings show bug * optimized code
This commit is contained in:
@@ -392,7 +392,16 @@ class GroupView extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
let { errMessage, emptyTip, currentGroup, isDepartmentGroup, isStaff } = this.state;
|
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;
|
let useRate = 0;
|
||||||
if (isDepartmentGroup && currentGroup.group_quota) {
|
if (isDepartmentGroup && currentGroup.group_quota) {
|
||||||
useRate = currentGroup.group_quota_usage / currentGroup.group_quota * 100 + '%';
|
useRate = currentGroup.group_quota_usage / currentGroup.group_quota * 100 + '%';
|
||||||
|
Reference in New Issue
Block a user