Checks if filter is inherited to get currentCollectionId instead of collectionId

This commit is contained in:
mateuswetah 2020-08-25 11:45:54 -03:00
parent 218fdfb535
commit b1b517c7b2
2 changed files with 3 additions and 1 deletions

View File

@ -33,6 +33,7 @@
<span class="collapse-label">{{ filter.name }}</span>
</button>
<div :id="'filter-input-id-' + filter.id">
<pre>{{ $eventBusSearch.collectionId }}</pre>
<component
:is="filter.filter_type_object ? filter.filter_type_object.component : null"
:filter="filter"

View File

@ -157,7 +157,8 @@
if (this.isRepositoryLevel)
route = `/facets/${this.metadatumId}?getSelected=1&order=asc&parent=0&number=${this.filter.max_options}&` + qs.stringify(query_items);
else {
if (this.collectionId == 'default' && this.currentCollectionId)
console.log(this.collectionId, this.currentCollectionId);
if ((this.collectionId == 'default' && this.currentCollectionId) || (this.filter.inherited && this.currentCollectionId))
route = `/collection/${this.currentCollectionId}/facets/${this.metadatumId}?getSelected=1&order=asc&parent=0&number=${this.filter.max_options}&` + qs.stringify(query_items);
else
route = `/collection/${this.collectionId}/facets/${this.metadatumId}?getSelected=1&order=asc&parent=0&number=${this.filter.max_options}&` + qs.stringify(query_items);