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.vue22
1 files changed, 14 insertions, 8 deletions
diff --git a/webapp/src/components/GroupModule.vue b/webapp/src/components/GroupModule.vue
index f351a6b..ccd98cf 100644
--- a/webapp/src/components/GroupModule.vue
+++ b/webapp/src/components/GroupModule.vue
@@ -68,14 +68,10 @@ export default {
},
watch: {
activeTab (index) {
- const item = this.tabChain[index]
- if (item === undefined) return
- if (item.tabType !== this.$route.name.replace('GroupModule.', '') || String(item.id) !== this.$route.params.id) {
- this.$router.push({
- name: 'GroupModule.' + item.tabType,
- params: { id: item.id !== undefined ? item.id : 'create', noReload: true }
- })
- }
+ this.updateUrl()
+ },
+ tabChain (value) {
+ this.updateUrl()
}
},
methods: {
@@ -90,6 +86,16 @@ export default {
const action = type === 'group' ? 'loadGroup' : type === 'client' ? 'loadClient' : null
if (action) this.$store.dispatch('groups/' + action, { id, tabIndex: id === 0 ? 0 : 1, switchTab: true })
}
+ },
+ updateUrl () {
+ const item = this.tabChain[this.activeTab]
+ if (item === undefined) return
+ if (item.tabType !== this.$route.name.replace('GroupModule.', '') || String(item.id) !== this.$route.params.id) {
+ this.$router.push({
+ name: 'GroupModule.' + item.tabType,
+ params: { id: item.id !== undefined ? item.id : 'create', noReload: true }
+ })
+ }
}
},
created () {