From af7fb9092148cbddb4ec7ec1f57626078a264aff Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Thu, 25 Apr 2024 18:29:55 +0200 Subject: [PATCH] try to fix some name inconsistency --- components/content/SystemDb.vue | 20 ++++++-------------- components/content/SystemOperonStructure.vue | 19 ++++++++++--------- content/3.defense-systems/cas.md | 1 + 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/components/content/SystemDb.vue b/components/content/SystemDb.vue index 700214dc..c223db26 100644 --- a/components/content/SystemDb.vue +++ b/components/content/SystemDb.vue @@ -8,19 +8,6 @@ const dbName = ref("systems") const client = useMeiliSearchRef() -// onBeforeMount(async () => { -// const { data } = await useAsyncMeiliSearch({ -// index: toValue(dbName), query: "", params: { -// facets: ["*"], -// filter: [], -// page: 1, -// hitsPerPage: 25, -// } -// }) - -// autocompleteMeiliFacetsProps.value.facetDistribution = toValue(data)?.facetDistribution - -// }) onMounted(async () => { try { const data = await client @@ -114,6 +101,11 @@ const dataTableServerProps = computed(() => { const columnsToDownload = ref(['title', 'doi', 'Sensor', 'Activator', 'Effector', 'PFAM', 'contributors',]) +function titleToSystemName(title:string) { + if (title === "CRISPR-Cas") return "cas" + return title.toLowerCase() +} + </script> <template> <ServerDbTable title="List Systems" :db="dbName" :sortBy="sortBy" @@ -122,7 +114,7 @@ const columnsToDownload = ref(['title', 'doi', 'Sensor', 'Activator', 'Effector' <template #[`item.title`]="{ item }"> - <v-chip color="info" link :to="`/defense-systems/${item.title.toLowerCase()}`">{{ + <v-chip color="info" link :to="`/defense-systems/${titleToSystemName(item.title)}`">{{ item.title }}</v-chip> </template> diff --git a/components/content/SystemOperonStructure.vue b/components/content/SystemOperonStructure.vue index 1a149736..092c3dc6 100644 --- a/components/content/SystemOperonStructure.vue +++ b/components/content/SystemOperonStructure.vue @@ -82,18 +82,19 @@ const sanitizedHits = computed<StructureOperonGeneWithImg[]>(() => { const sanitizedSystem = computed(() => { const pageVal = toValue(page) - return pageVal?.systemModel || pageVal.title + return pageVal.title }) const sanitizedSubsystem = computed(() => { - const pageVal = toValue(page) - const systemModel = pageVal?.systemModel - if (systemModel) { - return subsystem.replace(pageVal.title, systemModel) - } - else { - return subsystem - } + // const pageVal = toValue(page) + // const systemModel = pageVal?.systemModel + // if (systemModel) { + // return subsystem.replace(pageVal.title, systemModel) + // } + // else { + // return subsystem + // } + return subsystem }) const contentWidth = computed(() => { diff --git a/content/3.defense-systems/cas.md b/content/3.defense-systems/cas.md index 67a297f2..ee52ec40 100644 --- a/content/3.defense-systems/cas.md +++ b/content/3.defense-systems/cas.md @@ -1,5 +1,6 @@ --- title: CRISPR-Cas +systemModel: Cas layout: article tableColumns: article: -- GitLab