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

Tweak compound report card structure generation

parent ccfff503
No related branches found
No related tags found
1 merge request!58Fix report card structure and link texts when value is empty text
......@@ -37,7 +37,11 @@ export default {
},
}),
mounted() {
const docSource = ['pref_name', '_metadata.eubopen.is_probe']
const docSource = [
'pref_name',
'_metadata.eubopen.is_probe',
'_metadata.eubopen.is_control',
]
const entityID = EntityNames.EubopenCompound.entityID
const indexName = IndexNames.getIndexNameFromEntityID(entityID)
......@@ -57,7 +61,11 @@ export default {
false
)
const isNegativeControl = !isChemicalProbe
const isNegativeControl = ObjectPropertyAccess.getPropertyPalue(
sourceObtained,
'_metadata.eubopen.is_control',
false
)
const reportCardStructure = CompoundReportCardGenerator.generateReportCardStructure(
this.itemID,
......
......@@ -27,7 +27,7 @@ const methods = {
},
{
id: 'ProbeMechanism',
title: 'Probe Mechanism',
title: 'Mechanism of Action',
component: ProbeMechanism,
index: 1,
},
......@@ -39,7 +39,56 @@ const methods = {
},
{
id: 'ProbeProfile',
title: 'Probe Profile',
title: 'Activity Profile',
component: ProbeProfile,
index: 3,
},
{
id: 'CalculatedProperties',
title: 'Calculated Properties',
component: CalculatedProperties,
componentParams: {
entityID: EntityNames.EubopenCompound.entityID,
},
index: 4,
},
{
id: 'CrystalStructures',
title: 'PBD Ligand Codes',
component: CompoundCrystalStructures,
index: 5,
},
],
}
}
if (isNegativeControl) {
return {
title: prefName,
entityName: EntityNames.EubopenCompound.singularEntityName,
sections: [
{
id: 'Summary',
title: 'Summary',
component: Summary,
index: 0,
},
{
id: 'ProbeMechanism',
title: 'Mechanism of Action',
component: ProbeMechanism,
index: 1,
},
{
id: 'ProbesForThisCompound',
title: 'Related Probes',
component: ProbesForThisCompound,
index: 2,
},
{
id: 'ProbeProfile',
title: 'Activity Profile',
component: ProbeProfile,
index: 3,
},
......@@ -75,22 +124,16 @@ const methods = {
},
{
id: 'ProbeMechanism',
title: 'Probe Mechanism',
title: 'Mechanism of Action',
component: ProbeMechanism,
index: 1,
},
{
id: 'ControlStructuresAndUse',
title: 'Negative Controls',
component: ControlStructuresAndUse,
id: 'ProbeProfile',
title: 'Activity Profile',
component: ProbeProfile,
index: 2,
},
{
id: 'ProbesForThisCompound',
title: 'Probes',
component: ProbesForThisCompound,
index: 3,
},
{
id: 'CalculatedProperties',
title: 'Calculated Properties',
......@@ -99,13 +142,13 @@ const methods = {
entityID: EntityNames.EubopenCompound.entityID,
},
index: 4,
index: 3,
},
{
id: 'CrystalStructures',
title: 'PBD Ligand Codes',
component: CompoundCrystalStructures,
index: 5,
index: 4,
},
],
}
......
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