From 7f1035adc16ca80bad81fab4614dcb2876527bb2 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Mon, 15 Jun 2020 17:36:30 -0300 Subject: [PATCH] Avoids requesting repository filters on terms items page. --- src/views/admin/components/search/filters-items-list.vue | 2 +- src/views/admin/js/store/modules/filter/actions.js | 2 +- src/views/admin/pages/lists/items-page.vue | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/views/admin/components/search/filters-items-list.vue b/src/views/admin/components/search/filters-items-list.vue index b69b8f24a..9a8b5f9f9 100644 --- a/src/views/admin/components/search/filters-items-list.vue +++ b/src/views/admin/components/search/filters-items-list.vue @@ -451,7 +451,7 @@ } // On repository level we also fetch collection filters - if (this.isRepositoryLevel) { + if (!this.taxonomy && this.isRepositoryLevel) { // Cancels previous Request if (this.repositoryFiltersSearchCancel != undefined) diff --git a/src/views/admin/js/store/modules/filter/actions.js b/src/views/admin/js/store/modules/filter/actions.js index 71e89efdd..10ac2f9aa 100644 --- a/src/views/admin/js/store/modules/filter/actions.js +++ b/src/views/admin/js/store/modules/filter/actions.js @@ -231,7 +231,7 @@ export const fetchTaxonomyFilters = ({ dispatch, commit }, taxonomyId ) => { if (taxonomy.collections_ids != undefined && taxonomy.collections_ids.length != undefined) { let amountOfCollectionsLoaded = 0; - + console.log(taxonomy.collections_ids) for (let collectionId of taxonomy.collections_ids ) { let endpoint = ''; diff --git a/src/views/admin/pages/lists/items-page.vue b/src/views/admin/pages/lists/items-page.vue index a99793935..1747e2863 100644 --- a/src/views/admin/pages/lists/items-page.vue +++ b/src/views/admin/pages/lists/items-page.vue @@ -848,8 +848,7 @@ 'getMetadata' ]), ...mapActions('filter', [ - 'fetchFilters', - 'fetchRepositoryCollectionFilters' + 'fetchFilters' ]), ...mapGetters('filter', [ 'getFilters',