summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/GroupModule.vue
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/components/GroupModule.vue')
-rw-r--r--webapp/src/components/GroupModule.vue17
1 files changed, 8 insertions, 9 deletions
diff --git a/webapp/src/components/GroupModule.vue b/webapp/src/components/GroupModule.vue
index 4630824..f351a6b 100644
--- a/webapp/src/components/GroupModule.vue
+++ b/webapp/src/components/GroupModule.vue
@@ -93,18 +93,17 @@ export default {
}
},
created () {
- if (this.tabChain.length === 0) {
+ this.$store.dispatch('groups/loadLists')
+ if (this.$route.params.id > 0 || this.$route.params.id === 'create') {
this.$store.dispatch('groups/loadGroup', { id: 0, tabIndex: 0 })
- this.$store.dispatch('groups/loadConfigs')
- this.$store.dispatch('groups/loadLists')
+ this.loadItem(this.$route.name, this.$route.params.id)
} else {
- this.reload()
+ const tabType = this.tabChain.length ? this.tabChain[this.activeTab].tabType : 'group'
+ const id = this.tabChain.length ? this.tabChain[this.activeTab].id : 0
+ this.$router.replace({ name: 'GroupModule.' + tabType, params: { id, noReload: true } })
+ if (this.tabChain.length) this.reload()
+ else this.$store.dispatch('groups/loadGroup', { id: 0, tabIndex: 0 })
}
- if (this.$route.params.id !== '0') this.loadItem(this.$route.name, this.$route.params.id)
- this.$router.replace({
- name: 'GroupModule.' + this.tabChain[this.activeTab].tabType,
- params: { id: this.tabChain[this.activeTab].id, noReload: true }
- })
},
beforeRouteUpdate (to, from, next) {
if (!to.params.noReload) {