Skip to content

Commit

Permalink
Merge pull request #171 from SpeciesFileGroup/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
jlpereira authored Oct 7, 2023
2 parents 9004b6f + 28d0a7a commit d932b3d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/modules/otus/components/Panel/PanelGallery/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { SPECIES_GROUP } from '@/modules/otus/constants'
import { SPECIES_GROUP, SPECIES_AND_INFRASPECIES_GROUP } from '@/modules/otus/constants'
import PanelGallery from './PanelGallery.vue'

export default {
id: 'panel:gallery',
component: PanelGallery,
available: [SPECIES_GROUP]
available: [SPECIES_GROUP, SPECIES_AND_INFRASPECIES_GROUP]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<li class="border-b border-base-muted p-3 px-5">
<span
class="break-all block"
class="[&>a]:break-all block"
:title="reference"
v-html="reference"
/>
Expand Down
43 changes: 27 additions & 16 deletions src/modules/otus/components/Panel/PanelStats/PanelStats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@
/>
<VCardHeader class="flex justify-between">
<h2 class="text-md">Stats</h2>
<PanelDropdown panel-key="taxonomy" />
<PanelDropdown
panel-key="taxonomy"
:menu-options="menuOptions"
/>
</VCardHeader>
<VCardContent class="text-sm">
<VTable>
<VTableHeader>
<VTableHeaderRow>
<VTableHeaderCell class="bg-base-foreground" />
<VTableHeaderCell title="OTUs linked to valid protonyms">
<VTableHeaderCell
v-if="isAdvancedView"
title="OTUs linked to valid protonyms"
>
Taxa
</VTableHeaderCell>
<VTableHeaderCell
Expand All @@ -30,7 +36,9 @@
</VTableHeaderRow>
<VTableHeaderRow>
<VTableHeaderCell>Rank</VTableHeaderCell>
<VTableHeaderCell title="OTUs linked to valid protonyms"
<VTableHeaderCell
v-if="isAdvancedView"
title="OTUs linked to valid protonyms"
>Total</VTableHeaderCell
>
<VTableHeaderCell
Expand All @@ -45,22 +53,16 @@
</VTableHeader>
<VTableBody>
<VTableBodyRow
v-for="(value, rank) in store.catalog.stats.taxa"
v-for="{ rank, taxa, names } in store.catalog.stats"
:key="rank"
>
<VTableBodyCell class="capitalize">{{ rank }}</VTableBodyCell>
<VTableBodyCell>{{ value }}</VTableBodyCell>

<VTableBodyCell class="border-l border-base-border">{{
store.catalog.stats.names[rank].invalid +
store.catalog.stats.names[rank].valid
}}</VTableBodyCell>
<VTableBodyCell>{{
store.catalog.stats.names[rank].valid
}}</VTableBodyCell>
<VTableBodyCell>{{
store.catalog.stats.names[rank].invalid
}}</VTableBodyCell>
<VTableBodyCell v-if="isAdvancedView">{{ taxa }}</VTableBodyCell>
<VTableBodyCell class="border-l border-base-border">
{{ names.invalid + names.valid }}
</VTableBodyCell>
<VTableBodyCell>{{ names.valid }}</VTableBodyCell>
<VTableBodyCell>{{ names.invalid }}</VTableBodyCell>
</VTableBodyRow>
</VTableBody>
</VTable>
Expand All @@ -69,6 +71,7 @@
</template>

<script setup>
import { computed, ref } from 'vue'
import { useOtuStore } from '@/modules/otus/store/store'
import PanelDropdown from '../PanelDropdown.vue'
Expand All @@ -95,4 +98,12 @@ const props = defineProps({
})
const store = useOtuStore()
const isAdvancedView = ref(false)
const menuOptions = computed(() => [
{
label: isAdvancedView.value ? 'Hide taxa' : 'Show taxa',
action: () => (isAdvancedView.value = !isAdvancedView.value)
}
])
</script>
4 changes: 2 additions & 2 deletions src/modules/otus/components/Panel/PanelTypeSpecimen/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { SPECIES_GROUP } from '../../../constants'
import { SPECIES_GROUP, SPECIES_AND_INFRASPECIES_GROUP } from '../../../constants'
import PanelTypeSpecimen from './PanelTypeSpecimen.vue'

export default {
id: 'panel:type-specimen',
component: PanelTypeSpecimen,
available: [SPECIES_GROUP]
available: [SPECIES_GROUP, SPECIES_AND_INFRASPECIES_GROUP]
}
1 change: 1 addition & 0 deletions src/modules/otus/constants/rankGroups.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export const HIGHER_CLASSIFICATION_GROUP = 'HigherClassificationGroup'
export const FAMILY_GROUP = 'FamilyGroup'
export const GENUS_GROUP = 'GenusGroup'
export const SPECIES_GROUP = 'SpeciesGroup'
export const SPECIES_AND_INFRASPECIES_GROUP = 'SpeciesAndInfraspeciesGroup'

0 comments on commit d932b3d

Please sign in to comment.