Commit d15521c7 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Do not allow to expand a row if group doesn’t have subgroups

parent fb1e7eae
...@@ -14,7 +14,7 @@ export default { ...@@ -14,7 +14,7 @@ export default {
}, },
methods: { methods: {
toggleSubGroups(e) { toggleSubGroups(e) {
if (e.target.tagName === 'A' || !this.hasSubgroups) { if (e.target.tagName === 'A' || !this.group.hasSubgroups) {
return false; return false;
} }
...@@ -39,14 +39,10 @@ export default { ...@@ -39,14 +39,10 @@ export default {
return { return {
'group-row': true, 'group-row': true,
'is-open': this.group.isOpen, 'is-open': this.group.isOpen,
'has-subgroups': this.hasSubgroups, 'has-subgroups': this.group.hasSubgroups,
'no-description': !this.group.description, 'no-description': !this.group.description,
}; };
}, },
hasSubgroups() {
// TODO: Server should send a flag to indicate group will have subgroups
return true;
},
fullPath() { fullPath() {
let fullPath = ''; let fullPath = '';
......
...@@ -117,6 +117,7 @@ export default class GroupsStore { ...@@ -117,6 +117,7 @@ export default class GroupsStore {
fullName: rawGroup.full_name, fullName: rawGroup.full_name,
fullPath: rawGroup.full_path, fullPath: rawGroup.full_path,
name: rawGroup.name, name: rawGroup.name,
hasSubgroups: rawGroup.has_subgroups,
canEdit: rawGroup.can_edit, canEdit: rawGroup.can_edit,
description: rawGroup.description, description: rawGroup.description,
webUrl: rawGroup.web_url, webUrl: rawGroup.web_url,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment