Skip to content

Commit

Permalink
feat(studies): SJIP-1169 facet and column update for guid
Browse files Browse the repository at this point in the history
  • Loading branch information
GaelleA committed Jan 20, 2025
1 parent 4ca25cd commit 6ff016b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 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 @@ -41,6 +41,7 @@ export const GET_STUDIES = gql`
guid
institutions
investigator_names
is_guid_mapped
is_harmonized
program
publications
Expand Down
1 change: 1 addition & 0 deletions src/hooks/graphql/useGetExtendedMappings.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ExtendedMappingResults } from 'graphql/models';
import { INDEX_EXTENDED_MAPPING } from 'graphql/queries';

import { useLazyResultQueryOnLoadOnly } from 'hooks/graphql/useLazyResultQuery';

const useGetExtendedMappings = (index: string): ExtendedMappingResults => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/translation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ export const getFacetsDictionary = () => ({
transmissions: 'Transmission',
controlled_access: 'Access',
is_harmonized: 'Harmonized Data',
is_guid_mapped: 'GUID Available',
data_sources: 'Data Source',
is_proband: 'Proband',
variant_class: 'Variant Type',
Expand Down Expand Up @@ -398,7 +399,6 @@ export const getFacetsDictionary = () => ({
},
},
age_at_biospecimen_collection: 'Age at Biospecimen Collection (days)',
guid: 'GUID Type',
tooltips: {
genes: {
consequences: {
Expand Down
6 changes: 3 additions & 3 deletions src/views/Studies/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const filterInfo: FilterInfo = {
'data_sources',
'study_designs',
'is_harmonized',
'guid',
'is_guid_mapped',
'controlled_access',
],
groups: [
Expand All @@ -63,7 +63,7 @@ const filterInfo: FilterInfo = {
'data_sources',
'study_designs',
'is_harmonized',
'guid',
'is_guid_mapped',
'controlled_access',
],
},
Expand Down Expand Up @@ -91,7 +91,7 @@ const getColumns = (): ProColumnType<any>[] => [
<Tag>{intl.get('entities.study.unharmonizedAbrv')}</Tag>
</Tooltip>
);
const guidTag = record.guid === 'NDAR' && (
const guidTag = record.is_guid_mapped && (
<Tooltip title={intl.get('entities.study.guidTooltip')}>
<Tag color="volcano">{intl.get('entities.study.guidAbrv')}</Tag>
</Tooltip>
Expand Down

0 comments on commit 6ff016b

Please sign in to comment.