Skip to content
Snippets Groups Projects
Commit a8649245 authored by David Mendez's avatar David Mendez
Browse files

Eubopen report cards: just show links to pdbe or uniprot instead of visualisation

parent 4ef58b8c
No related branches found
No related tags found
1 merge request!24Improve report cards layout and remove some properties for now
...@@ -5,12 +5,23 @@ ...@@ -5,12 +5,23 @@
<v-card-text> No entires found in PDB for {{ itemID }} </v-card-text> <v-card-text> No entires found in PDB for {{ itemID }} </v-card-text>
</template> </template>
<template v-if="!loading && thereAreRefs"> <template v-if="!loading && thereAreRefs">
<v-tabs show-arrows :vertical="makeTabsVertical"> <v-card-title> Ligand codes found in PDB </v-card-title>
<v-tab v-for="ref in pdbeRefs" :key="ref.id"> {{ ref.id }} </v-tab> <v-divider />
<v-tab-item v-for="ref in pdbeRefs" :key="`${ref.id}-item`"> <v-card-text>
<PDBeVisualisations :ligand-code="ref.id" :ref-link="ref.link" /> <v-btn
</v-tab-item> v-for="ref in pdbeRefs"
</v-tabs> :key="ref.id"
depressed
color="primary"
:href="ref.link"
target="_blank"
class="a-button"
>
{{ ref.id }}
<v-icon> mdi-open-in-new </v-icon>
</v-btn>
</v-card-text>
</template> </template>
</v-card> </v-card>
</template> </template>
...@@ -21,12 +32,9 @@ import ESProxyService from '~/web-components-submodule/services/ESProxyService.j ...@@ -21,12 +32,9 @@ import ESProxyService from '~/web-components-submodule/services/ESProxyService.j
import EntityNames from '~/web-components-submodule/standardisation/EntityNames.js' import EntityNames from '~/web-components-submodule/standardisation/EntityNames.js'
import IndexNames from '~/web-components-submodule/standardisation/IndexNames.js' import IndexNames from '~/web-components-submodule/standardisation/IndexNames.js'
import ObjectPropertyAccess from '~/web-components-submodule/utils/ObjectPropertyAccess.js' import ObjectPropertyAccess from '~/web-components-submodule/utils/ObjectPropertyAccess.js'
import PDBeVisualisations from '~/components/report_cards/shared/CrystalStructures/PDBeVisualisations.vue'
export default { export default {
components: { components: {},
PDBeVisualisations,
},
props: { props: {
itemID: { itemID: {
type: String, type: String,
...@@ -41,16 +49,6 @@ export default { ...@@ -41,16 +49,6 @@ export default {
} }
}, },
computed: { computed: {
makeTabsVertical() {
switch (this.$vuetify.breakpoint.name) {
case 'xs':
return false
case 'sm':
return false
default:
return true
}
},
thereAreRefs() { thereAreRefs() {
return this.pdbeRefs.length > 0 return this.pdbeRefs.length > 0
}, },
...@@ -90,4 +88,8 @@ export default { ...@@ -90,4 +88,8 @@ export default {
} }
</script> </script>
<style></style> <style lang="scss" scoped>
.a-button {
margin-right: 5px;
}
</style>
...@@ -5,17 +5,21 @@ ...@@ -5,17 +5,21 @@
<v-card-text> No entires found in PDB for {{ itemID }} </v-card-text> <v-card-text> No entires found in PDB for {{ itemID }} </v-card-text>
</template> </template>
<template v-if="!loading && thereAreAccessions"> <template v-if="!loading && thereAreAccessions">
<v-tabs show-arrows :vertical="makeTabsVertical"> <v-card-text>
<v-tab v-for="accession in uniProtAccessions" :key="accession"> <v-btn
{{ accession }}
</v-tab>
<v-tab-item
v-for="accession in uniProtAccessions" v-for="accession in uniProtAccessions"
:key="`${accession}-item`" :key="accession"
depressed
color="primary"
:href="`https://www.uniprot.org/uniprot/${accession}`"
target="_blank"
class="a-button"
> >
<PDBeRepresentativeStructure :uni-prot-accession="accession" /> {{ accession }}
</v-tab-item>
</v-tabs> <v-icon> mdi-open-in-new </v-icon>
</v-btn>
</v-card-text>
</template> </template>
</v-card> </v-card>
</template> </template>
...@@ -26,12 +30,8 @@ import ESProxyService from '~/web-components-submodule/services/ESProxyService.j ...@@ -26,12 +30,8 @@ import ESProxyService from '~/web-components-submodule/services/ESProxyService.j
import EntityNames from '~/web-components-submodule/standardisation/EntityNames.js' import EntityNames from '~/web-components-submodule/standardisation/EntityNames.js'
import IndexNames from '~/web-components-submodule/standardisation/IndexNames.js' import IndexNames from '~/web-components-submodule/standardisation/IndexNames.js'
import ObjectPropertyAccess from '~/web-components-submodule/utils/ObjectPropertyAccess.js' import ObjectPropertyAccess from '~/web-components-submodule/utils/ObjectPropertyAccess.js'
import PDBeRepresentativeStructure from '~/components/report_cards/shared/CrystalStructures/PDBeRepresentativeStructure.vue'
export default { export default {
components: {
PDBeRepresentativeStructure,
},
props: { props: {
itemID: { itemID: {
type: String, type: String,
...@@ -41,7 +41,6 @@ export default { ...@@ -41,7 +41,6 @@ export default {
data() { data() {
return { return {
loading: true, loading: true,
ligandCode: 'VIA',
uniProtAccessions: [], uniProtAccessions: [],
} }
}, },
...@@ -96,4 +95,8 @@ export default { ...@@ -96,4 +95,8 @@ export default {
} }
</script> </script>
<style></style> <style lang="scss" scoped>
.a-button {
margin-right: 5px;
}
</style>
...@@ -51,7 +51,7 @@ const methods = { ...@@ -51,7 +51,7 @@ const methods = {
}, },
{ {
id: 'CrystalStructures', id: 'CrystalStructures',
title: 'Crystal Structures', title: 'PBD Ligand Codes',
component: CompoundCrystalStructures, component: CompoundCrystalStructures,
index: 6, index: 6,
}, },
......
...@@ -23,7 +23,7 @@ const methods = { ...@@ -23,7 +23,7 @@ const methods = {
}, },
{ {
id: 'CrystalStructures', id: 'CrystalStructures',
title: 'Crystal Structures', title: 'Uniprot Accessions',
component: TargetCrystalStructures, component: TargetCrystalStructures,
index: 2, index: 2,
}, },
......
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