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

fix bug structure

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