Fixes View Collection button not always getting proper url.

This commit is contained in:
Mateus Machado Luna 2018-08-02 11:15:12 -03:00
parent 06df10b8c1
commit fb63dc9c27
2 changed files with 92 additions and 92 deletions

View File

@ -141,7 +141,7 @@ export default {
},
methods: {
...mapActions('collection', [
'fetchCollectionName'
'fetchCollectionNameAndURL'
]),
...mapGetters('collection', [
'getCollectionName',
@ -172,8 +172,8 @@ export default {
switch(this.arrayRealPath[i-1]) {
case 'collections':
this.fetchCollectionName(this.arrayRealPath[i])
.then(collectionName => this.arrayViewPath.splice(i, 1, collectionName))
this.fetchCollectionNameAndURL(this.arrayRealPath[i])
.then(collection => this.arrayViewPath.splice(i, 1, collection.name))
.catch((error) => this.$console.error(error));
break;

View File

@ -46,7 +46,7 @@ export default {
},
methods: {
...mapActions('collection', [
'fetchCollectionName'
'fetchCollectionNameAndURL'
]),
...mapGetters('collection', [
'getCollectionName'
@ -79,8 +79,8 @@ export default {
switch(this.arrayRealPath[i-1]) {
case 'collections':
this.fetchCollectionName(this.arrayRealPath[i])
.then(collectionName => { this.arrayViewPath.splice(i, 1, collectionName); this.entityName = collectionName; })
this.fetchCollectionNameAndURL(this.arrayRealPath[i])
.then(collection => { this.arrayViewPath.splice(i, 1, collection.name); this.entityName = collection.name; })
.catch((error) => this.$console.error(error));
break;
case 'items':