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

no more column in datatable slots

parent 52094d13
No related branches found
No related tags found
No related merge requests found
Pipeline #112584 passed
......@@ -22,8 +22,8 @@ const sections = ref([
href: runtimeConfig.public.defenseFinderWebservice,
},
{ id: "wiki", label: "Wiki", to: '/', },
{ id: "refseq", label: "REFSEQ", to: '/refseq' },
{ id: "help", label: "Help", to: '/help' },
{ id: "refseq", label: "REFSEQ", to: '/refseq/' },
{ id: "help", label: "Help", to: '/help/' },
]);
......
......@@ -41,57 +41,29 @@ initPfam();
<v-toolbar color="primary">
<v-toolbar-title>Defense Systems</v-toolbar-title>
<v-text-field
v-model="search"
density="compact"
variant="underlined"
prepend-inner-icon="mdi-magnify"
label="Search for defense systems"
single-line
hide-details
class="mx-2"
clearable
></v-text-field>
<v-text-field v-model="search" density="compact" variant="underlined" prepend-inner-icon="mdi-magnify"
label="Search for defense systems" single-line hide-details class="mx-2" clearable></v-text-field>
</v-toolbar>
<v-data-table-virtual
:height="height"
:items-per-page="itemsPerParge"
v-model:sort-by="sortBy"
:headers="props.headers"
density="compact"
:custom-filter="filterOnlyCapsText"
:items="props.systems"
:search="search"
item-value="system"
>
<v-data-table-virtual :height="height" :items-per-page="itemsPerParge" v-model:sort-by="sortBy"
:headers="props.headers" density="compact" :custom-filter="filterOnlyCapsText" :items="props.systems"
:search="search" item-value="system.name">
<template #[`item.system`]="{ item }">
<v-chip variant="text" link :to="`${item.columns.system.path}`">{{
item.columns.system.name
<v-chip variant="text" link :to="item?.system?.path ? `${item?.system?.path}` : null">{{
item?.system?.name ?? 'None'
}}</v-chip>
</template>
<template #[`item.article`]="{ item }">
<ArticleDoi
v-if="item.columns?.article"
:doi="item.columns.article.doi"
:title="item.columns.article?.title"
:abstract="item.columns.article?.abstract"
:divider="false"
:enumerate="false"
/>
<ArticleDoi v-if="item?.article" :doi="item.article.doi" :title="item.article?.title"
:abstract="item.article?.abstract" :divider="false" :enumerate="false" />
</template>
<template #[`item.PFAM`]="{ item }">
<pfam-chips :pfam-string="item.columns.PFAM"></pfam-chips>
<pfam-chips v-if="item.columns?.PFAM" :pfam-string="item.columns.PFAM"></pfam-chips>
</template>
<template #expanded-row="{ columns, item }">
<tr>
<td
:colspan="columns.length"
class="v-data-table__td v-data-table-column--align-start"
>
<pfam-chips
:pfam-string="item.columns.PFAM"
:items-to-display="-1"
></pfam-chips>
<td :colspan="columns.length" class="v-data-table__td v-data-table-column--align-start">
<pfam-chips :pfam-string="item.columns.PFAM" :items-to-display="-1"></pfam-chips>
</td>
</tr>
</template>
......
import { join } from "path";
import { withTrailingSlash, withLeadingSlash, joinURL } from "ufo";
......
......@@ -5,7 +5,7 @@ const { height } = useDisplay();
const { data, error, pending } = await useAsyncData(
"list-defense-systems",
() => queryContent("/defense-systems").find()
() => queryContent("/defense-systems").where({ _partial: false }).find()
);
const defaultHeaders = ref([{ title: "System", key: "system" }]);
const tableKey = "tableColumns";
......@@ -42,6 +42,7 @@ const headers = computed(() => {
});
const systems = computed(() => {
return sanitizedData.value.map((content) => {
console.log(content)
return {
system: { name: content.title, path: content._path },
...content[tableKey],
......
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