summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/GroupModuleGroupView.vue
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/components/GroupModuleGroupView.vue')
-rw-r--r--webapp/src/components/GroupModuleGroupView.vue18
1 files changed, 10 insertions, 8 deletions
diff --git a/webapp/src/components/GroupModuleGroupView.vue b/webapp/src/components/GroupModuleGroupView.vue
index a793d8a..04b0be0 100644
--- a/webapp/src/components/GroupModuleGroupView.vue
+++ b/webapp/src/components/GroupModuleGroupView.vue
@@ -64,7 +64,7 @@
></v-switch>
<v-tabs-items touchless>
- <v-tab-item v-if="group.id !== 0" :transition="false" :reverse-transition="false">
+ <v-tab-item v-if="group.id !== 0" lazy :transition="false" :reverse-transition="false">
<v-divider></v-divider>
<v-card-text>
<v-layout wrap>
@@ -217,6 +217,7 @@ export default {
return {
activeTab: 0,
editMode: false,
+ showAllClicked: false,
info: {
name: '',
description: '',
@@ -239,18 +240,19 @@ export default {
},
watch: {
group (newValue, oldValue) {
- if (newValue.id === 'create') {
- this.editInfo()
- this.activeTab = 0
- } else if (newValue.id !== oldValue.id) {
- this.editMode = false
- this.activeTab = 0
- }
+ if (newValue.id === 'create') this.editInfo()
+ else if (newValue.id !== oldValue.id) this.editMode = false
+ else if (!oldValue.isPlaceholder) return
+
+ if (newValue.subgroups.length) this.activeTab = (this.group.id === 0 ? 0 : 1)
+ else if (newValue.clients.length) this.activeTab = (this.group.id === 0 ? 1 : 2)
+ else this.activeTab = 0
}
},
methods: {
...mapMutations('groups', ['setDialog', 'setActiveTab', 'adjustTabSlider', 'deleteFromTabChain']),
setShowAll (value) {
+ this.showAllClicked = true
this.$store.commit('groups/setShowAll', { index: this.tabIndex, value })
this.$store.dispatch('groups/loadGroup', { id: this.group.id, tabIndex: this.tabIndex })
},