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

fix bug structure

parent 52d4672b
Branches
No related tags found
No related merge requests found
......@@ -130,8 +130,7 @@ const dataTableServerProps = computed(() => {
function toFolseekUrl(item: Item) {
const url = joinURL("/" + item.system, item.pdb.replace(/\.pdb$/i, ".html"))
console.log(url)
const url = joinURL("/" + item.system.toLocaleLowerCase(), item.pdb.replace(/\.pdb$/i, ".html"))
const { refinedUrl } = useRefinedUrl(url)
return toValue(refinedUrl)
}
......@@ -162,12 +161,15 @@ function pdbNameToCif(pdbPath: string) {
function buildStructureUrl(item: StructureItem) {
const lowercaseSystem = item.system.toLocaleLowerCase()
if (item?.pdb && item?.pdb !== 'na') {
return [
`/${lowercaseSystem}/${pdbNameToCif(item.pdb)}`,
`/${lowercaseSystem}/${item.pdb}`].map(url => {
return toValue(useRefinedUrl(url).refinedUrl)
})
}
}
function displayStructure(item: StructureItem) {
const structureUrls = buildStructureUrl(item)
......@@ -258,7 +260,7 @@ const { refinedUrl: downloadAllCifUrl } = useRefinedUrl("/df-all-cifs.tar.gz")
</CollapsibleChips>
</template>
<template #[`item.structure`]="{ item }">
<v-row justify="space-between" dense no-gutters align="center">
<v-row v-if="item?.pdb !== 'na'" justify="space-between" dense no-gutters align="center">
<v-col>
<v-btn size="x-small" variant="text" icon="md:visibility"
@click="displayStructure(item)"></v-btn>
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment