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
...@@ -8,19 +8,6 @@ const dbName = ref("systems") ...@@ -8,19 +8,6 @@ const dbName = ref("systems")
const client = useMeiliSearchRef() 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 () => { onMounted(async () => {
try { try {
const data = await client const data = await client
...@@ -114,6 +101,11 @@ const dataTableServerProps = computed(() => { ...@@ -114,6 +101,11 @@ const dataTableServerProps = computed(() => {
const columnsToDownload = ref(['title', 'doi', 'Sensor', 'Activator', 'Effector', 'PFAM', 'contributors',]) const columnsToDownload = ref(['title', 'doi', 'Sensor', 'Activator', 'Effector', 'PFAM', 'contributors',])
function titleToSystemName(title:string) {
if (title === "CRISPR-Cas") return "cas"
return title.toLowerCase()
}
</script> </script>
<template> <template>
<ServerDbTable title="List Systems" :db="dbName" :sortBy="sortBy" <ServerDbTable title="List Systems" :db="dbName" :sortBy="sortBy"
...@@ -122,7 +114,7 @@ const columnsToDownload = ref(['title', 'doi', 'Sensor', 'Activator', 'Effector' ...@@ -122,7 +114,7 @@ const columnsToDownload = ref(['title', 'doi', 'Sensor', 'Activator', 'Effector'
<template #[`item.title`]="{ item }"> <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 item.title
}}</v-chip> }}</v-chip>
</template> </template>
......
...@@ -82,18 +82,19 @@ const sanitizedHits = computed<StructureOperonGeneWithImg[]>(() => { ...@@ -82,18 +82,19 @@ const sanitizedHits = computed<StructureOperonGeneWithImg[]>(() => {
const sanitizedSystem = computed(() => { const sanitizedSystem = computed(() => {
const pageVal = toValue(page) const pageVal = toValue(page)
return pageVal?.systemModel || pageVal.title return pageVal.title
}) })
const sanitizedSubsystem = computed(() => { const sanitizedSubsystem = computed(() => {
const pageVal = toValue(page) // const pageVal = toValue(page)
const systemModel = pageVal?.systemModel // const systemModel = pageVal?.systemModel
if (systemModel) { // if (systemModel) {
return subsystem.replace(pageVal.title, systemModel) // return subsystem.replace(pageVal.title, systemModel)
} // }
else { // else {
return subsystem // return subsystem
} // }
return subsystem
}) })
const contentWidth = computed(() => { const contentWidth = computed(() => {
......
--- ---
title: CRISPR-Cas title: CRISPR-Cas
systemModel: Cas
layout: article layout: article
tableColumns: tableColumns:
article: article:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment