Skip to content
Snippets Groups Projects

Automatic systems list

Merged Remi PLANEL requested to merge automatic-systems-list into dev
3 files
+ 48
19
Compare changes
  • Side-by-side
  • Inline
Files
3
<script setup lang="ts">
const props = defineProps<{
systems: any;
headers: Array<Object>
systems: Array<Object>
}>();
const itemsPerParge = ref(25)
const search = ref('')
const sortBy = ref([{ key: 'system', order: 'asc' }])
const headers = ref([{
title: "Systems",
key: "system"
}, { title: "Articles", key: "dois" }
])
// const headers = ref([{
// title: "Systems",
// key: "system"
// }, { title: "Articles", key: "doi" }
// ])
</script>
<template>
@@ -21,14 +22,14 @@ const headers = ref([{
<v-text-field v-model="search" density="compact" variant="underlined" append-inner-icon="mdi-magnify"
label="Search" single-line hide-details class="mx-2"></v-text-field>
</v-toolbar>
<v-data-table :items-per-page="itemsPerParge" v-model:sort-by="sortBy" :headers="headers" :items="props.systems"
<v-data-table :items-per-page="itemsPerParge" v-model:sort-by="sortBy" :headers="props.headers" :items="props.systems"
:search="search">
<template #[`item.system`]="{ item }">
<v-chip variant="text" link :to="`/defense-systems/${item.columns.system.toLowerCase()}`">{{
item.columns.system }}</v-chip>
</template>
<template #[`item.dois`]="{ item }">
<ArticleDoiList :items="item.columns.dois" :divider="false" />
<template #[`item.doi`]="{ item }">
<ArticleDoiList v-if="item.columns?.doi" :items="[item.columns.doi]" :divider="false" />
</template>
</v-data-table>
</v-card>
Loading