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

fix bug structure

parent 52d4672b
No related branches found
No related tags found
No related merge requests found
Pipeline #133846 waiting for manual action with stages
in 8 minutes and 41 seconds
......@@ -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,11 +161,14 @@ function pdbNameToCif(pdbPath: string) {
function buildStructureUrl(item: StructureItem) {
const lowercaseSystem = item.system.toLocaleLowerCase()
return [
`/${lowercaseSystem}/${pdbNameToCif(item.pdb)}`,
`/${lowercaseSystem}/${item.pdb}`].map(url => {
return toValue(useRefinedUrl(url).refinedUrl)
})
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) {
......@@ -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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment