Skip to content

Commit

Permalink
feat: CQDG-914 contact to access_authority (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulous authored Oct 22, 2024
1 parent bbc2164 commit 24e131b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const DownloadRequestAccessModal = ({
{intl.get('api.report.requestAccess.text')}
<br />
<br />
<ExternalMailToLink email={study.contact?.value} />
<ExternalMailToLink email={study.access_authority?.value} />
<br />
<br />
{intl.get('api.report.requestAccess.text2')}
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/participants/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const GET_PARTICIPANTS = gql`
access_limitations
access_requirements
}
contact {
access_authority {
type
value
}
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/studies/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface IStudyEntity {
family_data: boolean;
status: string;
study_version: string;
contact: { type: string; value: string };
access_authority: { type: string; value: string };
datasets: ArrangerResultsTree<IDataSet>;
security?: Security;
}
2 changes: 1 addition & 1 deletion src/graphql/studies/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const GET_STUDIES = gql`
file_count
family_count
security
contact {
access_authority {
value
type
}
Expand Down
10 changes: 5 additions & 5 deletions src/views/ParticipantEntity/utils/getDataAccessDescriptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ const getDataAccessDescriptions = (participant?: IParticipantEntity): IEntityDes
},
{
label: intl.get('entities.study.access_authority'),
value: participant?.study?.contact?.value ? (
value: participant?.study?.access_authority?.value ? (
<ExternalLink
href={
EMAIL_REGEX.test(participant.study.contact.value)
? `mailto:${participant.study.contact.value}`
: participant.study.contact.value
EMAIL_REGEX.test(participant.study.access_authority.value)
? `mailto:${participant.study.access_authority.value}`
: participant.study.access_authority.value
}
className={styles.link}
>
{participant.study.contact.value}
{participant.study.access_authority.value}
</ExternalLink>
) : (
TABLE_EMPTY_PLACE_HOLDER
Expand Down
10 changes: 5 additions & 5 deletions src/views/StudyEntity/utils/getDataAccessDescriptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ const getDataAccessDescriptions = (study?: IStudyEntity): IEntityDescriptionsIte
},
{
label: intl.get('entities.study.access_authority'),
value: study?.contact?.value ? (
value: study?.access_authority?.value ? (
<ExternalLink
href={
EMAIL_REGEX.test(study.contact.value)
? `mailto:${study.contact.value}`
: study.contact.value
EMAIL_REGEX.test(study.access_authority.value)
? `mailto:${study.access_authority.value}`
: study.access_authority.value
}
className={styles.link}
>
{study.contact.value}
{study.access_authority.value}
</ExternalLink>
) : (
TABLE_EMPTY_PLACE_HOLDER
Expand Down

0 comments on commit 24e131b

Please sign in to comment.