Loading gms-ui/src/components/GroupsBreadcrumb.vue +1 −11 Original line number Original line Diff line number Diff line Loading @@ -20,7 +20,6 @@ <script> <script> import { mapState } from 'vuex'; import { mapState } from 'vuex'; import client from 'api-client'; function buildItems(values) { function buildItems(values) { let groups = []; let groups = []; Loading Loading @@ -50,16 +49,7 @@ export default { }), }), methods: { methods: { changeBreadcrumb: function(groupId) { changeBreadcrumb: function(groupId) { this.input.selectedGroupId = groupId; this.$store.dispatch('changeBreadcrumb', groupId); this.input.searchFilter = null; if (this.input.tabIndex === 0) { client.fetchGroupsTab(this.input) .then(model => { this.$store.commit('updateGroups', model); }); } else { this.$store.dispatch('changeTab', 0); } }, }, openEditGroupModal: function(group) { openEditGroupModal: function(group) { group.leaf = this.model.leaf; group.leaf = this.model.leaf; Loading gms-ui/src/components/TopMenu.vue +5 −1 Original line number Original line Diff line number Diff line Loading @@ -36,7 +36,11 @@ export default { }), }), methods: { methods: { showMainPage() { showMainPage() { if (this.$router.currentRoute.path === '/') { this.$store.dispatch('changeBreadcrumb', 'ROOT'); } else { this.$router.push('/', () => {}); this.$router.push('/', () => {}); } }, }, genericSearch() { genericSearch() { this.$router.push({ path: '/search', query: { q: this.input.genericSearch.filter } }, () => {}); this.$router.push({ path: '/search', query: { q: this.input.genericSearch.filter } }, () => {}); Loading gms-ui/src/store.js +12 −0 Original line number Original line Diff line number Diff line Loading @@ -148,6 +148,18 @@ export default new Vuex.Store({ break; break; } } }, }, changeBreadcrumb({ state, commit, dispatch }, groupId) { state.input.selectedGroupId = groupId; state.input.searchFilter = null; if (state.input.tabIndex === 0) { client.fetchGroupsTab(state.input) .then(model => { commit('updateGroups', model); }); } else { dispatch('changeTab', 0); } }, updateCurrentGroup({ dispatch, state }, data) { updateCurrentGroup({ dispatch, state }, data) { state.model.breadcrumbs[state.model.breadcrumbs.length - 1].groupName = data.newGroupName; state.model.breadcrumbs[state.model.breadcrumbs.length - 1].groupName = data.newGroupName; state.model.leaf = data.leaf; state.model.leaf = data.leaf; Loading Loading
gms-ui/src/components/GroupsBreadcrumb.vue +1 −11 Original line number Original line Diff line number Diff line Loading @@ -20,7 +20,6 @@ <script> <script> import { mapState } from 'vuex'; import { mapState } from 'vuex'; import client from 'api-client'; function buildItems(values) { function buildItems(values) { let groups = []; let groups = []; Loading Loading @@ -50,16 +49,7 @@ export default { }), }), methods: { methods: { changeBreadcrumb: function(groupId) { changeBreadcrumb: function(groupId) { this.input.selectedGroupId = groupId; this.$store.dispatch('changeBreadcrumb', groupId); this.input.searchFilter = null; if (this.input.tabIndex === 0) { client.fetchGroupsTab(this.input) .then(model => { this.$store.commit('updateGroups', model); }); } else { this.$store.dispatch('changeTab', 0); } }, }, openEditGroupModal: function(group) { openEditGroupModal: function(group) { group.leaf = this.model.leaf; group.leaf = this.model.leaf; Loading
gms-ui/src/components/TopMenu.vue +5 −1 Original line number Original line Diff line number Diff line Loading @@ -36,7 +36,11 @@ export default { }), }), methods: { methods: { showMainPage() { showMainPage() { if (this.$router.currentRoute.path === '/') { this.$store.dispatch('changeBreadcrumb', 'ROOT'); } else { this.$router.push('/', () => {}); this.$router.push('/', () => {}); } }, }, genericSearch() { genericSearch() { this.$router.push({ path: '/search', query: { q: this.input.genericSearch.filter } }, () => {}); this.$router.push({ path: '/search', query: { q: this.input.genericSearch.filter } }, () => {}); Loading
gms-ui/src/store.js +12 −0 Original line number Original line Diff line number Diff line Loading @@ -148,6 +148,18 @@ export default new Vuex.Store({ break; break; } } }, }, changeBreadcrumb({ state, commit, dispatch }, groupId) { state.input.selectedGroupId = groupId; state.input.searchFilter = null; if (state.input.tabIndex === 0) { client.fetchGroupsTab(state.input) .then(model => { commit('updateGroups', model); }); } else { dispatch('changeTab', 0); } }, updateCurrentGroup({ dispatch, state }, data) { updateCurrentGroup({ dispatch, state }, data) { state.model.breadcrumbs[state.model.breadcrumbs.length - 1].groupName = data.newGroupName; state.model.breadcrumbs[state.model.breadcrumbs.length - 1].groupName = data.newGroupName; state.model.leaf = data.leaf; state.model.leaf = data.leaf; Loading