Skip to content

Commit

Permalink
feat(study): SJIP-1170 update guid in summary
Browse files Browse the repository at this point in the history
  • Loading branch information
GaelleA committed Jan 20, 2025
1 parent 4ca25cd commit 61f1ea1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 23 deletions.
1 change: 1 addition & 0 deletions src/graphql/studies/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export interface IStudyEntity {
guid?: string;
institutions?: string[];
investigator_names?: string[];
is_guid_mapped?: boolean;
is_harmonized?: boolean;
part_lifespan_stages?: string[];
participant_count: number;
Expand Down
1 change: 1 addition & 0 deletions src/graphql/studies/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export const GET_STUDY = gql`
guid
institutions
investigator_names
is_guid_mapped
is_harmonized
part_lifespan_stages
participant_count
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,7 @@ const en = {
expected_data_categories: 'Data Category',
file: 'File',
files: 'Files',
guid: 'GUID Type',
guid: 'GUID Available',
guidAbrv: 'G',
guidTooltip: 'NDA GUIDs',
guidEntityTooltip1:
Expand Down
43 changes: 21 additions & 22 deletions src/views/StudyEntity/utils/summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,28 +64,27 @@ const getSummaryDescriptions = (study?: IStudyEntity): IEntityDescriptionsItem[]
},
{
label: intl.get('entities.study.guid'),
value:
study?.guid === 'NDAR' ? (
<Tooltip
title={
<>
{intl.get('entities.study.guidEntityTooltip1')}
<Link
to={STATIC_ROUTES.STUDIES}
style={{ textDecoration: 'underline' }}
target="_blank"
>
{intl.get('entities.study.guidEntityTooltip2')}
</Link>
.
</>
}
>
<Tag color="volcano">{study.guid}</Tag>
</Tooltip>
) : (
TABLE_EMPTY_PLACE_HOLDER
),
value: study?.is_guid_mapped ? (
<Tooltip
title={
<>
{intl.get('entities.study.guidEntityTooltip1')}
<Link
to={STATIC_ROUTES.STUDIES}
style={{ textDecoration: 'underline' }}
target="_blank"
>
{intl.get('entities.study.guidEntityTooltip2')}
</Link>
.
</>
}
>
<Tag color="green">True</Tag>
</Tooltip>
) : (
<Tag color="default">False</Tag>
),
},
{
label: intl.get('entities.study.participant_life_span'),
Expand Down

0 comments on commit 61f1ea1

Please sign in to comment.