Skip to content

Commit

Permalink
#468 Add OTU by match cites to left side. Next remove automatic OTUs
Browse files Browse the repository at this point in the history
from source from match/proxy list.
  • Loading branch information
jrflood committed Sep 14, 2018
1 parent b75216a commit 670e9fb
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 12 deletions.
7 changes: 7 additions & 0 deletions app/javascript/vue/tasks/nomenclature/by_source/app.vue
Expand Up @@ -12,6 +12,9 @@
<div class="flexbox">
<div class="flexbox">
<div class="first-column">
<otus-by-match
:sourceID="sourceID"
/>
<cite-taxon-name
:sourceID="sourceID"
@foundTaxon="newTaxonNameCitation=$event"
Expand Down Expand Up @@ -41,6 +44,7 @@
<div class="second-column">
<otus-match-proxy
:sourceID="sourceID"
:otu_names_cites="otu_names_cites"
:taxon_names_cites="taxon_names_cites"
:taxon_relationship_cites="taxon_relationship_cites"
:taxon_classification_cites="taxon_classification_cites"
Expand All @@ -57,6 +61,7 @@
import SmartSelector from './components/smartSelector'
import NomenSource from './components/nomen_source'
import CiteTaxonName from './components/cite_taxon_name'
import OtusByMatch from './components/otus_by_match'
import TaxonNames from './components/taxon_names'
import TaxonNameRelationships from './components/taxon_name_relationships'
import TaxonNameClassifications from './components/taxon_name_classifications'
Expand All @@ -71,6 +76,7 @@
SmartSelector,
NomenSource,
CiteTaxonName,
OtusByMatch,
TaxonNames,
TaxonNameRelationships,
TaxonNameClassifications,
Expand All @@ -84,6 +90,7 @@
sourceID: undefined,
isLoading: false,
newTaxonNameCitation: {},
otu_names_cites: [],
taxon_names_cites: [],
taxon_relationship_cites: [],
taxon_classification_cites: [],
Expand Down
@@ -0,0 +1,59 @@
<template>
<div>
<h2>OTU Names</h2>
<table-component
:list="otu_names_cites_list"/>
</div>
</template>
<script>
import RadialAnnotator from '../../../../components/annotator/annotator.vue'
import OtuRadial from '../../../../components/otu/otu.vue'
import TableComponent from './tables/table.vue'
export default {
components: {
RadialAnnotator,
TableComponent,
OtuRadial
},
props: {
value: {
type: String
},
sourceID: {
type: String,
default: "0"
},
newTaxon: {
type: Object,
default: {}
}
},
data() {
return {
otu_names_cites_list: []
}
},
watch: {
sourceID() {
this.getCites();
},
newTaxon() {
this.addToList(this.newTaxon)
}
},
methods: {
getCites() {
this.$http.get('/citations.json?citation_object_type=Otu&source_id=' + this.sourceID).then(response => {
// build the tabular list, extracting the
this.otu_names_cites_list = response.body;
this.$emit("otu_names_cites", this.otu_names_cites_list)
})
},
addToList(citation) {
this.otu_names_cites_list.push(citation);
}
},
}
</script>

This file was deleted.

Expand Up @@ -43,7 +43,6 @@
this.addToList(this.newTaxon)
}
},
// TODO: method for receiving new citation from cite_taxon_name (addToList( ?))
methods: {
getCites() {
this.$http.get('/citations.json?citation_object_type=TaxonName&source_id=' + this.sourceID).then(response => {
Expand All @@ -56,11 +55,5 @@
this.taxon_names_cites_list.push(citation);
}
},
// mounted: function() {
// // let pieces = window.location.href.split('/')
// // this.source_id = pieces[pieces.length - 1];
//
// }
}
</script>

0 comments on commit 670e9fb

Please sign in to comment.