From 1d8d2ebcd7be48599f30025feeffcbd1a68ce28e Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Tue, 23 Apr 2024 11:37:58 +0200 Subject: [PATCH] add info model version --- components/OperonStructure.vue | 14 ++++++++++++++ components/content/ArticleStructure.vue | 2 +- types/structure.ts | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/components/OperonStructure.vue b/components/OperonStructure.vue index b1745a77..e97d44c7 100644 --- a/components/OperonStructure.vue +++ b/components/OperonStructure.vue @@ -64,6 +64,19 @@ const computedGenes = computed(() => { } else { return [] } }) + + +const structureVersion = computed(() => { + + const genesVal = toValue(computedGenes) + if (genesVal?.length > 0) { + return genesVal[0].version + } + else { + return undefined + } +}) + watch(computedGenes, () => { const genes = toValue(computedGenes) const domain = genes?.map(d => { return d.gene }) @@ -196,6 +209,7 @@ function drawGene({ width, height }) { <template> <div ref="gbContainer"> <v-card flat color="transparent"> + <v-card-subtitle>model version : {{ structureVersion }}</v-card-subtitle> <!-- <v-img :href=""></v-img> --> <svg ref="svgRef" :width="computedContainerWidth" :height="plotHeight"> <g class="x-axis" /> diff --git a/components/content/ArticleStructure.vue b/components/content/ArticleStructure.vue index 5cf16951..29b36c31 100644 --- a/components/content/ArticleStructure.vue +++ b/components/content/ArticleStructure.vue @@ -110,7 +110,7 @@ async function fetchStructures() { <template> <v-card flat> <template v-for="[subsystem, structures] in perSubsystemStructures" :key="subsystem[0]"> - <ProseH3>{{ computedSystem }} - {{ subsystem }}</ProseH3> + <ProseH3>{{ subsystem }}</ProseH3> <v-row align="end"> <v-col cols="6" class="ml-0 "> <SystemOperonStructure :system="computedSystem" :subsystem="subsystem" :structures="structures" /> diff --git a/types/structure.ts b/types/structure.ts index 51fa0067..ef0f6bad 100644 --- a/types/structure.ts +++ b/types/structure.ts @@ -2,6 +2,7 @@ export interface StructureOperonGene { gene: string id: number subsystem: string + version: string system: string } -- GitLab