Fixes scope of metadata in advanced search

This commit is contained in:
weryques 2018-09-06 11:32:10 -03:00
parent 5227f150fe
commit e88d4f48d7
2 changed files with 8 additions and 14 deletions

View File

@ -214,7 +214,7 @@
<script> <script>
import { mapActions, mapGetters } from 'vuex'; import { mapActions } from 'vuex';
import { dateInter } from '../../js/mixins.js'; import { dateInter } from '../../js/mixins.js';
import moment from 'moment'; import moment from 'moment';
@ -233,21 +233,17 @@
this.searchAdvanced(); this.searchAdvanced();
} }
}, },
computed: {
metadata() {
return this.getMetadata();
}
},
created(){ created(){
this.metadataIsLoading = true; this.metadataIsLoading = true;
this.fetchMetadata({ this.fetchMetadata({
collectionId: this.isRepositoryLevel ? undefined : this.$route.params.collectionId, collectionId: this.isRepositoryLevel ? false : this.$route.params.collectionId,
isRepositoryLevel: this.isRepositoryLevel, isRepositoryLevel: this.isRepositoryLevel,
isContextEdit: true, isContextEdit: false,
includeDisabled: true, includeDisabled: false,
}).then(() => { }).then((metadata) => {
this.metadata = metadata;
this.metadataIsLoading = false; this.metadataIsLoading = false;
}); });
@ -340,6 +336,7 @@
dateMask: this.getDateLocaleMask(), dateMask: this.getDateLocaleMask(),
dateFormat: '', dateFormat: '',
metadataIsLoading: false, metadataIsLoading: false,
metadata: [],
} }
}, },
methods: { methods: {
@ -349,9 +346,6 @@
...mapActions('metadata', [ ...mapActions('metadata', [
'fetchMetadata' 'fetchMetadata'
]), ]),
...mapGetters('metadata', [
'getMetadata'
]),
autoCompleteTerm: _.debounce( function(value, searchCriterion){ autoCompleteTerm: _.debounce( function(value, searchCriterion){
this.termList = []; this.termList = [];
this.terms = []; this.terms = [];

View File

@ -289,7 +289,7 @@
collectionId: this.collectionID, collectionId: this.collectionID,
isRepositoryLevel: false, isRepositoryLevel: false,
isContextEdit: true, isContextEdit: true,
includeDisabled: true, includeDisabled: false,
}).then(() => { }).then(() => {
this.metadataIsLoading = false; this.metadataIsLoading = false;
}); });