Fixes View Collection button not always getting proper url.
This commit is contained in:
parent
06df10b8c1
commit
fb63dc9c27
|
@ -141,7 +141,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions('collection', [
|
...mapActions('collection', [
|
||||||
'fetchCollectionName'
|
'fetchCollectionNameAndURL'
|
||||||
]),
|
]),
|
||||||
...mapGetters('collection', [
|
...mapGetters('collection', [
|
||||||
'getCollectionName',
|
'getCollectionName',
|
||||||
|
@ -172,8 +172,8 @@ export default {
|
||||||
|
|
||||||
switch(this.arrayRealPath[i-1]) {
|
switch(this.arrayRealPath[i-1]) {
|
||||||
case 'collections':
|
case 'collections':
|
||||||
this.fetchCollectionName(this.arrayRealPath[i])
|
this.fetchCollectionNameAndURL(this.arrayRealPath[i])
|
||||||
.then(collectionName => this.arrayViewPath.splice(i, 1, collectionName))
|
.then(collection => this.arrayViewPath.splice(i, 1, collection.name))
|
||||||
.catch((error) => this.$console.error(error));
|
.catch((error) => this.$console.error(error));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -46,7 +46,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions('collection', [
|
...mapActions('collection', [
|
||||||
'fetchCollectionName'
|
'fetchCollectionNameAndURL'
|
||||||
]),
|
]),
|
||||||
...mapGetters('collection', [
|
...mapGetters('collection', [
|
||||||
'getCollectionName'
|
'getCollectionName'
|
||||||
|
@ -79,8 +79,8 @@ export default {
|
||||||
|
|
||||||
switch(this.arrayRealPath[i-1]) {
|
switch(this.arrayRealPath[i-1]) {
|
||||||
case 'collections':
|
case 'collections':
|
||||||
this.fetchCollectionName(this.arrayRealPath[i])
|
this.fetchCollectionNameAndURL(this.arrayRealPath[i])
|
||||||
.then(collectionName => { this.arrayViewPath.splice(i, 1, collectionName); this.entityName = collectionName; })
|
.then(collection => { this.arrayViewPath.splice(i, 1, collection.name); this.entityName = collection.name; })
|
||||||
.catch((error) => this.$console.error(error));
|
.catch((error) => this.$console.error(error));
|
||||||
break;
|
break;
|
||||||
case 'items':
|
case 'items':
|
||||||
|
|
Loading…
Reference in New Issue