Skip to content

Commit

Permalink
♻️ Change col name
Browse files Browse the repository at this point in the history
  • Loading branch information
evans-g-crsj committed Oct 25, 2023
1 parent 1313d09 commit 1fbb614
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ const en = {
trio: 'Trio',
trio_plus: ' Trio+',
trisomy: 'T21: "Trisomy 21"',
age_at_outcome_tooltip: 'Age at Vital Status',
age_at_vital_status: 'Age at Vital Status',
},
study: {
count: '{count, plural, =0 {Study} =1 {Study} other {Studies}}',
Expand Down
20 changes: 2 additions & 18 deletions src/views/ParticipantEntity/utils/getProfileItems.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import intl from 'react-intl-universal';
import { IEntityDescriptionsItem } from '@ferlab/ui/core/pages/EntityPage';
import { Tag, Tooltip } from 'antd';
import { Tag } from 'antd';
import { IParticipantEntity, Sex } from 'graphql/participants/models';
import { capitalize } from 'lodash';

Expand All @@ -20,18 +20,6 @@ const getVitalStatus = (participant?: IParticipantEntity) => {
return vitalStatuses.size ? vitalStatuses : TABLE_EMPTY_PLACE_HOLDER;
};

const getAgeAtVitalStatus = (participant?: IParticipantEntity) => {
const vitalStatuses = new Set();
participant?.outcomes?.hits?.edges?.forEach((o) => {
const vitalStatus = o.node.age_at_event_days.value;
if (vitalStatus) {
vitalStatuses.add(vitalStatus);
}
});

return vitalStatuses.size ? vitalStatuses : TABLE_EMPTY_PLACE_HOLDER;
};

const getProfileItems = (participant?: IParticipantEntity): IEntityDescriptionsItem[] => [
{
label: intl.get('entities.participant.race'),
Expand Down Expand Up @@ -62,11 +50,7 @@ const getProfileItems = (participant?: IParticipantEntity): IEntityDescriptionsI
value: getVitalStatus(participant),
},
{
label: (
<Tooltip title={intl.get('entities.participant.age_at_outcome_tooltip')}>
{intl.get('entities.participant.age')}
</Tooltip>
),
label: intl.get('entities.participant.age_at_vital_status'),
value: <OutcomesAgeCells outcomes={participant?.outcomes} />,
},
];
Expand Down

0 comments on commit 1fbb614

Please sign in to comment.