converted blabla listing into vuex store to avoid reloading the whole list

This commit is contained in:
2019-07-14 16:29:17 +02:00
parent cdd3bf1ea3
commit ddffd26c77
6 changed files with 134 additions and 156 deletions
@@ -70,17 +70,22 @@ export default {
methods: {
getArticle(){
console.log(this.$route);
// get the article uuid
if(this.$route.query.uuid){
// we come from internal link with vuejs
// directly record uuid
this.uuid = this.$route.query.uuid
this.loadArticle()
}else if(drupalDecoupled.entity_type == 'node' && drupalDecoupled.entity_bundle == 'article'){
// get the uuid from drupalDeclouped
// provided by materio_decoupled.module
// console.log(drupalDecoupled);
// we landed in an internal page
// get the uuid from drupalDeclouped, provided by materio_decoupled.module
this.uuid = drupalDecoupled.entity_uuid
}
if(this.uuid){
this.loadArticle()
}else{
// if for any reason we dont have the uuid
// redirect to home
this.$route.replace('home')
}
},