Skip to content

Commit

Permalink
feat: remove displayName column for rapid report
Browse files Browse the repository at this point in the history
  - Add early return logic in rendering of 'genomic events' column, if displayName exists
DEVSU-2094
  • Loading branch information
kttkjl committed Oct 16, 2023
1 parent f33912f commit db24632
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions app/views/ReportView/components/RapidSummary/columnDefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
*/
const getGenomicEvent = ({ data }) => {
const {
gene, proteinChange, variantType, kbCategory,
gene, proteinChange, variantType, kbCategory, displayName,
} = data;
if (displayName) {
return displayName;
}

if (variantType === 'cnv') {
const { cnvState } = data;
return `${gene.name} ${cnvState}`;
Expand Down Expand Up @@ -48,11 +52,6 @@ const ACTIONS_COLDEF = {
};

const therapeuticAssociationColDefs = [
{
headerName: 'Display Name',
field: 'displayName',
hide: false,
},
{
headerName: 'Genomic Events',
colId: 'genomicEvents',
Expand Down Expand Up @@ -115,11 +114,6 @@ const therapeuticAssociationColDefs = [
];

const cancerRelevanceColDefs = [
{
headerName: 'Display Name',
field: 'displayName',
hide: false,
},
{
headerName: 'Genomic Events',
colId: 'genomicEvents',
Expand Down Expand Up @@ -181,6 +175,13 @@ const sampleColumnDefs = [
field: 'displayName',
hide: false,
},
{
headerName: 'Genomic Events',
colId: 'genomicEvents',
field: 'genomicEvents',
valueGetter: getGenomicEvent,
hide: false,
},
{
headerName: 'Sample',
colId: 'Sample',
Expand Down

0 comments on commit db24632

Please sign in to comment.