Skip to content
Snippets Groups Projects

Refactor facet autocomplete

Merged Remi PLANEL requested to merge refactor-facet-autocomplete into dev
Compare and Show latest version
10 files
+ 72
62
Compare changes
  • Side-by-side
  • Inline
Files
10
@@ -23,19 +23,22 @@ const autocompleteMeiliFacetsProps = ref<AutocompleteMeiliFacetProps>({
db: toValue(dbName),
facets: [
{ title: "Defense System", type: "subheader" },
{ title: 'System', value: "title", type: "facet", icon: "" },
{ title: 'System', value: "title", type: "facet", icon: "mdi-virus-outline" },
{ type: "divider" },
{ title: "Mechanism", type: "subheader" },
{ title: 'Sensor', value: "Sensor", type: "facet", icon: "" },
{ title: 'Effector', value: "Effector", type: "facet", icon: "" },
{ title: 'Activator', value: "Activator", type: "facet", icon: "" },
{ title: 'Sensor', value: "Sensor", type: "facet", icon: "mdi-cog" },
{ title: 'Effector', value: "Effector", type: "facet", icon: "mdi-cog" },
{ title: 'Activator', value: "Activator", type: "facet", icon: "mdi-cog" },
{ type: "divider" },
{ title: "PFAM", type: "subheader" },
{ title: 'Acession', value: "PFAM.AC", type: "facet", icon: "" },
{ title: 'Description', value: "PFAM.DE", type: "facet", icon: "" }
{ title: 'Acession', value: "PFAM.AC", type: "facet", icon: "mdi-key" },
{ title: 'Description', value: "PFAM.DE", type: "facet", icon: "md:description" },
{ type: "divider" },
{ title: 'Contributor', value: "contributors", type: "facet", icon: "md:person" },
],
facetDistribution: undefined
})
@@ -94,7 +97,8 @@ const columnsToDownload = ref(['title', 'doi', 'Sensor', 'Activator', 'Effector'
</script>
<template>
<ServerDbTable title="List Systems" :db="dbName" :sortBy="sortBy" :autocomplete-meili-facets-props="computedAutocompleteMeiliFacetsProps"
<ServerDbTable title="List Systems" :db="dbName" :sortBy="sortBy"
:autocomplete-meili-facets-props="computedAutocompleteMeiliFacetsProps"
:data-table-server-props="dataTableServerProps" :columns-to-download="columnsToDownload">
@@ -108,8 +112,10 @@ const columnsToDownload = ref(['title', 'doi', 'Sensor', 'Activator', 'Effector'
<ArticleDoi v-if="item?.doi" :doi="item.doi" :abstract="item?.abstract" :divider="false" :enumerate="false" />
</template>
<template #[`item.PFAM`]="{ item }">
<pfam-chips v-if="item?.PFAM" :pfams="item.PFAM"></pfam-chips>
</template>
</ServerDbTable>
</template>
\ No newline at end of file
<template #[`item.contributors`]="{ item }">
<CollapsibleChips v-if="item?.contributors" :items="item.contributors.map(it => ({ title: it }))">
</CollapsibleChips>
</template>
</ServerDbTable></template>
\ No newline at end of file