diff --git a/packages/sections/src/drug/Pharmacogenomics/Body.jsx b/packages/sections/src/drug/Pharmacogenomics/Body.jsx index de3440737..9a5a20010 100644 --- a/packages/sections/src/drug/Pharmacogenomics/Body.jsx +++ b/packages/sections/src/drug/Pharmacogenomics/Body.jsx @@ -148,20 +148,24 @@ function Body({ id: chemblId, label: name, entity }) { { id: "drugResponse", label: "Drug Response Phenotype", - renderCell: ({ phenotypeText = naLabel, phenotypeFromSourceId, genotypeAnnotationText }) => { + renderCell: ({ phenotypeText, phenotypeFromSourceId, genotypeAnnotationText }) => { let phenotypeTextElement; if (phenotypeText) { - phenotypeTextElement = phenotypeFromSourceId ? ( - - {phenotypeText} - - ) : ( + phenotypeTextElement = phenotypeText; + } else phenotypeTextElement = naLabel; + + if (phenotypeFromSourceId) + phenotypeTextElement = ( + {phenotypeTextElement} + ); + + if (genotypeAnnotationText) + phenotypeTextElement = ( - {phenotypeText} + {phenotypeTextElement} ); - } else phenotypeTextElement = naLabel; return phenotypeTextElement; }, @@ -174,6 +178,7 @@ function Body({ id: chemblId, label: name, entity }) { { id: "confidenceLevel", label: "Confidence Level", + sortable: true, tooltip: ( <> As defined by diff --git a/packages/sections/src/target/Pharmacogenomics/PharmacogenomicsTable.jsx b/packages/sections/src/target/Pharmacogenomics/PharmacogenomicsTable.jsx index 9714633c0..2980d84fb 100644 --- a/packages/sections/src/target/Pharmacogenomics/PharmacogenomicsTable.jsx +++ b/packages/sections/src/target/Pharmacogenomics/PharmacogenomicsTable.jsx @@ -133,16 +133,20 @@ function OverviewTab({ pharmacogenomics, query, variables }) { let phenotypeTextElement; if (phenotypeText) { - phenotypeTextElement = phenotypeFromSourceId ? ( - - {phenotypeText} - - ) : ( + phenotypeTextElement = phenotypeText; + } else phenotypeTextElement = naLabel; + + if (phenotypeFromSourceId) + phenotypeTextElement = ( + {phenotypeTextElement} + ); + + if (genotypeAnnotationText) + phenotypeTextElement = ( - {phenotypeText} + {phenotypeTextElement} ); - } else phenotypeTextElement = naLabel; return phenotypeTextElement; }, @@ -155,6 +159,7 @@ function OverviewTab({ pharmacogenomics, query, variables }) { { id: "confidenceLevel", label: "Confidence Level", + sortable: true, tooltip: ( <> As defined by