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

fix bugs on structure table

parent 5358a8e8
No related branches found
No related tags found
No related merge requests found
Pipeline #133789 waiting for manual action with stages
in 8 minutes and 38 seconds
......@@ -6,9 +6,6 @@ import { useSlots } from 'vue'
import { useDisplay } from "vuetify";
import { toValue, useThrottleFn } from '@vueuse/core'
import type { FacetInputItem, FilterItem } from '@/components/AutocompleteMeiliFacets.vue'
import { useMeiliSearch } from "#imports"
import type { SearchResponse } from 'meilisearch'
// import { saveAs } from "file-saver";
export interface SortItem {
key: string,
order: boolean | 'asc' | 'desc'
......@@ -79,8 +76,6 @@ const computedTableHeight = computed(() => {
})
const pendingDownloadData = ref(false)
const toRefNumericalFilters = toRef(props.numericalFilters)
// const meiliFilters = ref<string | undefined>(undefined)
const filterInputValues = computed(() => {
if (filterOrSearch.value != null) {
......
......@@ -443,6 +443,7 @@ const scaleType = ref("linear")
const systemsDistributionPlot = ref<ComponentPublicInstance | null>(null)
const taxonomicDistributionPlot = ref<ComponentPublicInstance | null>(null)
const heatmapPlot = ref<ComponentPublicInstance | null>(null)
function downloadSvg(component: ComponentPublicInstance | null, filename: string) {
const blob = toValue(serialize(toValue(component)))
if (blob !== undefined) {
......@@ -454,7 +455,6 @@ async function downloadPng(component: ComponentPublicInstance | null, filename:
const blob = await rasterize(toValue(component), filename)?.then((blob) => {
download(blob, filename)
})
}
</script>
......
......@@ -10,7 +10,8 @@ import type { StructureItem } from "~/types/structure"
interface Item {
Foldseek_name: string
system: string
system: string,
pdb: string
}
......@@ -129,7 +130,8 @@ const dataTableServerProps = computed(() => {
function toFolseekUrl(item: Item) {
const url = joinURL("/" + item.system, item.Foldseek_name)
const url = joinURL("/" + item.system, item.pdb.replace(/\.pdb$/i, ".html"))
console.log(url)
const { refinedUrl } = useRefinedUrl(url)
return toValue(refinedUrl)
}
......@@ -164,6 +166,7 @@ function buildStructureUrl(item: StructureItem) {
function displayStructure(item: StructureItem) {
const structureUrls = buildStructureUrl(item)
console.log(structureUrls)
structureBasket.set(structureUrls.map(url => {
const refinedUrl = useRefinedUrl(url).refinedUrl
return toValue(refinedUrl)
......@@ -241,7 +244,7 @@ const { refinedUrl: downloadAllCifUrl } = useRefinedUrl("/df-all-cifs.tar.gz")
</v-card-text>
</template>
<template #[`item.Foldseek_name`]="{ item }">
<FoldseekDialog v-if="item.Foldseek_name !== 'na'" :foldseek-path="toFolseekUrl(item)"></FoldseekDialog>
<FoldseekDialog :foldseek-path="toFolseekUrl(item)"></FoldseekDialog>
</template>
<template #[`item.proteins_in_the_prediction`]="{ item }">
......@@ -266,7 +269,7 @@ const { refinedUrl: downloadAllCifUrl } = useRefinedUrl("/df-all-cifs.tar.gz")
icon="md:download" class="ml-1" v-bind="props"></v-btn>
</template>
<v-list>
<v-list-item v-for="(url, index) in item.structuresUrls" :key="index" :value="index"
<v-list-item v-for="(url, index) in buildStructureUrl(item)" :key="index" :value="index"
:href="url">
<v-list-item-title>{{ url.split('.').slice(-1)[0] }}</v-list-item-title>
</v-list-item>
......
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