Skip to content
Snippets Groups Projects
Commit 0c45ac86 authored by Muhammad Arsalan's avatar Muhammad Arsalan
Browse files

show all name records

parent f3c2e317
No related branches found
No related tags found
No related merge requests found
......@@ -8,14 +8,13 @@
<div class="vf-text-body vf-text-body--3">
<v-row>
<v-col cols="12">
<v-table hover density="comfortable" v-if="key.length < 15">
<v-table hover density="comfortable">
<thead v-if="data !== 'IUPAC NAME'">
<tr>
<th>Name</th>
<th>Source</th>
</tr>
</thead>
<tbody>
<tr v-for="i in key" :key="i">
<td>
......@@ -41,40 +40,6 @@
</tr>
</tbody>
</v-table>
<v-data-table
v-else
hover
v-model:items-per-page="itemsPerPage"
:headers="headers"
:items="key"
item-value="name"
class="elevation-1"
>
<template v-slot:item="{ item }">
<tr>
<td>
<span v-html="item.columns.name"></span>
<v-tooltip text="Deprecated">
<template v-slot:activator="{ props }">
<span v-if="item.raw.status === 'P'" v-bind="props"
><v-icon icon="mdi-alert"
/></span>
</template>
</v-tooltip>
</td>
<td>
{{ item.columns.source }}
<v-tooltip text="Adapted">
<template v-slot:activator="{ props }">
<span v-if="item.raw.adapted" v-bind="props"
><v-icon icon="mdi-sync"
/></span>
</template>
</v-tooltip>
</td>
</tr>
</template>
</v-data-table>
</v-col>
</v-row>
</div>
......@@ -84,14 +49,7 @@
<script setup lang="ts">
// Render IUPAC Names, Names, & Synonyms table based on data provided
// If a section contain mroe than 15 records, render v-data-table for paginated table
// For IUPAC Names, do not show table head & source column
const itemsPerPage = ref(10);
const headers = [
{ title: "Name", key: "name" },
{ title: "Source", key: "source" },
];
defineProps<{
names: {};
}>();
......
......@@ -41,7 +41,7 @@
>
<input
type="search"
placeholder="Enter your search terms"
placeholder="Enter your search term"
id="searchitem"
class="vf-form__input"
v-model="searchTerm"
......
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