diff --git a/app/javascript/vue/tasks/nomenclature/new_combination/app.vue b/app/javascript/vue/tasks/nomenclature/new_combination/app.vue index 0f3c4c81bd..0131fb0c6d 100644 --- a/app/javascript/vue/tasks/nomenclature/new_combination/app.vue +++ b/app/javascript/vue/tasks/nomenclature/new_combination/app.vue @@ -63,6 +63,7 @@ export default { }, methods: { setTaxon (event) { + this.accept_taxon_name_ids = [] this.taxon = event }, resetInput () { @@ -70,6 +71,8 @@ export default { this.$refs.inputSearch.focusInput() }, editCombination (combination) { + let keys = Object.keys(combination.protonyms) + this.accept_taxon_name_ids = keys.map(key => { return combination.protonyms[key].id }) this.$refs.combination.editCombination(combination.name_string, combination) this.$refs.inputSearch.disabledButton(true) }, @@ -102,7 +105,8 @@ export default { if (/^\d+$/.test(combinationId)) { this.loading = true GetCombination(combinationId).then(response => { - console.log(response) + let keys = Object.keys(response.protonyms) + this.accept_taxon_name_ids = keys.map(key => { return response.protonyms[key].id }) this.editCombination(response) this.loading = false }, () => { diff --git a/app/javascript/vue/tasks/nomenclature/new_combination/components/listGroup.vue b/app/javascript/vue/tasks/nomenclature/new_combination/components/listGroup.vue index 9423a7613c..f040f98379 100644 --- a/app/javascript/vue/tasks/nomenclature/new_combination/components/listGroup.vue +++ b/app/javascript/vue/tasks/nomenclature/new_combination/components/listGroup.vue @@ -151,9 +151,11 @@ export default { this.expanded = false } else { this.rankChoose = newVal.find(item => { - return this.acceptTaxonIds.includes(item.id) || (this.selected && this.selected.id) + return this.acceptTaxonIds.includes(item.id) || (!this.acceptTaxonIds.length && (this.selected && this.selected.id)) }) - this.expanded = true + if(!this.rankChoose) { + this.expanded = true + } } this.displaySearch = false } diff --git a/app/javascript/vue/tasks/nomenclature/new_combination/components/newCombination.vue b/app/javascript/vue/tasks/nomenclature/new_combination/components/newCombination.vue index dc088aeb73..a353e7b67e 100644 --- a/app/javascript/vue/tasks/nomenclature/new_combination/components/newCombination.vue +++ b/app/javascript/vue/tasks/nomenclature/new_combination/components/newCombination.vue @@ -174,7 +174,6 @@ export default { this.rankLists = response.data.protonyms this.parseRanks = response.data.parse this.searching = false - console.log(response); this.otherMatches = response.other_matches this.$nextTick(() => { if (response.data.unambiguous) {