Fix filters inherited from repository with wrong facets.
This commit is contained in:
parent
0c6cc40d31
commit
e765c0fb14
|
@ -154,13 +154,13 @@
|
|||
|
||||
let route = '';
|
||||
|
||||
if (this.isRepositoryLevel || this.filter.collection_id == 'default')
|
||||
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.filter.inherited) && this.currentCollectionId)
|
||||
if (this.filter.collection_id == 'default' && 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);
|
||||
route = `/collection/${this.filter.collection_id}/facets/${this.metadatumId}?getSelected=1&order=asc&parent=0&number=${this.filter.max_options}&` + qs.stringify(query_items);
|
||||
}
|
||||
|
||||
this.options = [];
|
||||
|
|
|
@ -114,13 +114,13 @@
|
|||
|
||||
let endpoint = '';
|
||||
|
||||
if (this.isRepositoryLevel || this.filter.collection_id == 'default')
|
||||
if (this.isRepositoryLevel)
|
||||
endpoint += '/facets/' + this.metadatumId;
|
||||
else {
|
||||
if (this.collectionId == 'default' && this.currentCollectionId)
|
||||
if (this.filter.collection_id == 'default' && this.currentCollectionId)
|
||||
endpoint += '/collection/' + this.currentCollectionId +'/facets/' + this.metadatumId;
|
||||
else
|
||||
endpoint += '/collection/' + this.collectionId +'/facets/' + this.metadatumId;
|
||||
endpoint += '/collection/' + this.filter.collection_id + '/facets/' + this.metadatumId;
|
||||
}
|
||||
|
||||
endpoint += '?order=asc&' + qs.stringify(query_items);
|
||||
|
|
|
@ -77,7 +77,7 @@ export const dynamicFilterTypeMixin = {
|
|||
|
||||
let url = '';
|
||||
|
||||
if (isRepositoryLevel || this.filter.collection_id == 'default')
|
||||
if (isRepositoryLevel)
|
||||
url = `/facets/${metadatumId}?getSelected=${getSelected}&`;
|
||||
else {
|
||||
if (this.filter.collection_id == 'default' && this.currentCollectionId)
|
||||
|
@ -161,7 +161,7 @@ export const dynamicFilterTypeMixin = {
|
|||
|
||||
let url = '';
|
||||
|
||||
if (isRepositoryLevel || this.filter.collection_id == 'default')
|
||||
if (isRepositoryLevel)
|
||||
url = `/facets/${this.filter.metadatum.metadatum_id}?getSelected=${getSelected}&`;
|
||||
else {
|
||||
if (this.filter.collection_id == 'default' && this.currentCollectionId)
|
||||
|
|
Loading…
Reference in New Issue