Now metadata select list is updated in advanced search shortcut after a repository metadata is updated or created

This commit is contained in:
weryques 2018-09-06 15:28:49 -03:00
parent ec8b1056c3
commit 7aab768b6d
2 changed files with 22 additions and 0 deletions

View File

@ -238,6 +238,24 @@
this.searchAdvanced();
}
},
mounted(){
this.$root.$on('metadatumUpdated', (isRepositoryLevel) => {
if(isRepositoryLevel) {
this.metadataIsLoading = true;
this.fetchMetadata({
collectionId: this.isRepositoryLevel ? false : this.$route.params.collectionId,
isRepositoryLevel: this.isRepositoryLevel,
isContextEdit: false,
includeDisabled: false,
isAdvancedSearch: true
}).then((metadata) => {
this.metadata = metadata;
this.metadataIsLoading = false;
});
}
});
},
created(){
this.metadataIsLoading = true;

View File

@ -319,6 +319,8 @@
this.formErrors = {};
this.formErrorMessage = '';
this.closedByForm = true;
this.$root.$emit('metadatumUpdated', this.isRepositoryLevel);
this.$emit('onEditionFinished');
})
.catch((errors) => {
@ -353,6 +355,8 @@
this.formErrors = {};
this.formErrorMessage = '';
this.closedByForm = true;
this.$root.$emit('metadatumUpdated', this.isRepositoryLevel);
this.$emit('onEditionFinished');
})
.catch((errors) => {