|
@@ -5,8 +5,11 @@ import qs from 'querystring-es3'
|
|
|
|
|
|
import materiauGQL from 'vuejs/api/gql/materiauflaglist.fragment.gql'
|
|
|
|
|
|
+// import router from 'vuejs/route' // this is not working
|
|
|
+
|
|
|
export default {
|
|
|
namespaced: true,
|
|
|
+ // router,
|
|
|
|
|
|
// initial state
|
|
|
state: {
|
|
@@ -78,12 +81,24 @@ export default {
|
|
|
state.csrf_token = null
|
|
|
state.isloggedin = false
|
|
|
state.logout_token = null
|
|
|
- if (state.isAdmin) {
|
|
|
- // TODO: what if on a page where login is needed (as commerce checkout and cart)
|
|
|
- window.location.reload(true)
|
|
|
- }
|
|
|
state.asAdmin = false
|
|
|
state.canSearch = false
|
|
|
+ // if (state.isAdmin) {
|
|
|
+ // // TODO: what if on a page where login is needed (as commerce checkout and cart)
|
|
|
+ // window.location.reload(true)
|
|
|
+ // } else {
|
|
|
+ //
|
|
|
+ // // return systematically to home page
|
|
|
+ // this.$router.push({
|
|
|
+ // name:`home`
|
|
|
+ // // params: { alias:this.alias }
|
|
|
+ // // query: { nid: this.item.nid }
|
|
|
+ // // meta: { uuid:this.item.uuid },
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+
|
|
|
+ // redirect to home page in every case
|
|
|
+ window.location = window.location.origin
|
|
|
},
|
|
|
setFlagColls (state, flagcolls) {
|
|
|
console.log('User pre setFlagColls', state.flagcolls)
|