Skip to content

Commit

Permalink
Show only current name citations for invalid names
Browse files Browse the repository at this point in the history
  • Loading branch information
José Luis Pereira committed Nov 8, 2022
1 parent 5083505 commit 4970ed3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
20 changes: 13 additions & 7 deletions src/modules/otus/components/Panel/PanelCitation/PanelCitation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<CitationRow
v-for="citation in citationList.first"
:key="citation.id"
:citation="citation"
ref="rowRefs"
:citation="citation"
/>

<CitationRowShowMore
Expand All @@ -31,17 +31,17 @@
<CitationRow
v-for="citation in citationList.middle"
:key="citation.id"
:citation="citation"
ref="rowRefs"
:citation="citation"
/>
</div>
</AnimationOpacity>

<CitationRow
v-for="citation in citationList.last"
:key="citation.id"
:citation="citation"
ref="rowRefs"
:citation="citation"
class="last:border-b-0"
/>
</div>
Expand All @@ -60,6 +60,11 @@ const props = defineProps({
otuId: {
type: [Number, String],
required: true
},
taxon: {
type: Object,
required: true
}
})
Expand Down Expand Up @@ -100,12 +105,13 @@ watch(
() => props.otuId,
async () => {
if (!props.otuId) { return }
const list = (await TaxonWorks.getTaxonNameCitations(props.otuId)).data
citations.value = (await TaxonWorks.getTaxonNameCitations(props.otuId)).data
citations.value = !props.taxon.is_valid
? list.filter(c => c.names.includes(props.taxon.full_name_tag))
: list
},
{
immediate: true
}
{ immediate: true }
)
const changeRowExpandedState = value => {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/otus/constants/overviewLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import PanelStatus from '../components/Panel/PanelStatus/PanelStatus.vue'

export const overviewLayout = {
left: [
{ component: PanelGallery },
{ component: PanelStatus },
{ component: PanelGallery },
{
component: PanelTypeSpecimen,
available: [SPECIES_GROUP]
Expand Down
1 change: 1 addition & 0 deletions src/modules/otus/views/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
v-if="taxon.id && otu.id"
:key="route.fullPath"
:taxon-id="taxon.id"
:taxon="taxon"
:taxon-rank="taxon.rank_string"
:otu-id="otu.id"
/>
Expand Down
7 changes: 7 additions & 0 deletions src/modules/otus/views/Overview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
v-if="!available || isComponentForRank(available, taxonRank)"
:otu-id="otuId"
:taxon-id="taxonId"
:taxon="taxon"
/>
</template>
</div>
Expand All @@ -24,6 +25,7 @@
v-if="!available || isComponentForRank(available, taxonRank)"
:otu-id="otuId"
:taxon-id="taxonId"
:taxon="taxon"
/>
</template>
</div>
Expand All @@ -48,6 +50,11 @@ defineProps({
otuId: {
type: [Number, String],
required: true
},
taxon: {
type: Object,
required: true
}
})
Expand Down

0 comments on commit 4970ed3

Please sign in to comment.