Skip to content
Snippets Groups Projects
Commit cea68e9f authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Merge branch 'operon-struct-type' into operon-struct-type-article

parents ea879e0f af7fb909
No related branches found
No related tags found
No related merge requests found
Pipeline #129390 waiting for manual action with stages
in 8 minutes and 2 seconds
......@@ -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>
......
......@@ -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(() => {
......
---
title: CRISPR-Cas
systemModel: Cas
layout: article
tableColumns:
article:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment