Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EUbOPEN Web
Manage
Activity
Members
Labels
Plan
Issues
15
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChEMBL
EUbOPEN
EUbOPEN Web
Commits
18dc0516
Commit
18dc0516
authored
8 months ago
by
David Mendez
Browse files
Options
Downloads
Patches
Plain Diff
Sets mockup: create links to the corresponging compound and targets page
parent
ae5c1c81
Branches
staging
Branches containing commit
No related tags found
1 merge request
!100
Add alternative forms and Sets page
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/mockups/OneSet.vue
+76
-9
76 additions, 9 deletions
components/mockups/OneSet.vue
with
76 additions
and
9 deletions
components/mockups/OneSet.vue
+
76
−
9
View file @
18dc0516
...
...
@@ -18,15 +18,54 @@
:items=
"setItems"
:items-per-page=
"10"
:search=
"search"
></v-data-table>
>
<template
#
[`
item.target_pref_name
`
]=
"
{ item }">
<a
v-if=
"showItemLinkToTarget(item)"
:href=
"getItemLinkToTarget(item)"
>
{{
getItemTargetIDText
(
item
)
}}
</a>
<template
v-else
>
{{
getItemTargetIDText
(
item
)
}}
</
template
>
</template>
<
template
#
[`
item.COMPOUND_NAME
`
]=
"{ item }"
>
<div
v-if=
"showItemLinkToCompound(item)"
class=
"d-flex flex-column justify-center align-center"
>
<MoleculeImage
:molecule-chembl-id=
"item['Molecule ChEMBL ID']"
:aspect-ratio=
"String(16 / 9)"
max-width=
"250px"
contain
/>
<a
:href=
"getItemLinkToCompound(item)"
>
{{
getItemCompoundIDText
(
item
)
}}
</a>
</div>
<template
v-else
>
{{
getItemCompoundIDText
(
item
)
}}
</
template
>
</template>
</v-data-table>
</template>
</div>
</template>
<
script
>
import
ESProxyService
from
'
~/web-components-submodule/services/ESProxyService.js
'
import
LinksToEntities
from
'
~/web-components-submodule/standardisation/LinksToEntities.js
'
import
EntityNames
from
'
~/web-components-submodule/standardisation/EntityNames.js
'
import
MoleculeImage
from
'
~/web-components-submodule/components/common/ReportCards/Shared/MoleculeImage.vue
'
export
default
{
components
:
{
MoleculeImage
,
},
props
:
{
setID
:
{
type
:
String
,
...
...
@@ -40,11 +79,8 @@ export default {
errorMsg
:
undefined
,
setItems
:
[],
search
:
''
,
nullTextValue
:
'
---
'
,
headers
:
[
{
text
:
'
Compound CHEMBL ID
'
,
value
:
'
Molecule ChEMBL ID
'
,
},
{
text
:
'
Compound Name
'
,
value
:
'
COMPOUND_NAME
'
,
...
...
@@ -53,10 +89,6 @@ export default {
text
:
'
Protein Family
'
,
value
:
'
Protein Family
'
,
},
{
text
:
'
Target ChEMBL ID
'
,
value
:
'
target_id
'
,
},
{
text
:
'
Target Name
'
,
value
:
'
target_pref_name
'
,
...
...
@@ -89,6 +121,41 @@ export default {
this
.
loading
=
false
}
},
methods
:
{
showItemLinkToTarget
(
item
)
{
return
item
.
target_id
!=
null
&&
item
.
target_id
!==
this
.
nullTextValue
},
getItemTargetIDText
(
item
)
{
const
targetPrefName
=
item
.
target_pref_name
const
targetID
=
item
.
target_id
return
targetPrefName
==
null
||
targetPrefName
===
this
.
nullTextValue
?
targetID
:
targetPrefName
},
getItemLinkToTarget
(
item
)
{
return
LinksToEntities
[
EntityNames
.
EubopenTarget
.
entityID
].
getLinkToReportCard
(
item
.
target_id
)
},
showItemLinkToCompound
(
item
)
{
return
(
item
[
'
Molecule ChEMBL ID
'
]
!=
null
&&
item
[
'
Molecule ChEMBL ID
'
]
!==
this
.
nullTextValue
)
},
getItemCompoundIDText
(
item
)
{
const
compoundPrefName
=
item
.
COMPOUND_NAME
const
compoundID
=
item
[
'
Molecule ChEMBL ID
'
]
return
compoundPrefName
==
null
||
compoundPrefName
===
this
.
nullTextValue
?
compoundID
:
compoundPrefName
},
getItemLinkToCompound
(
item
)
{
return
LinksToEntities
[
EntityNames
.
EubopenCompound
.
entityID
].
getLinkToReportCard
(
item
[
'
Molecule ChEMBL ID
'
])
},
},
}
</
script
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment