Skip to content

Commit b6486f5

Browse files
authored
Merge pull request #986 from include-dcc/feat/sjip-1506
feat: SJIP-1506 use split websites
2 parents 097139f + 20deb60 commit b6486f5

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

cypress/fixtures/ResponseBody/StudyEntity.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,9 @@
366366
"longitudinal"
367367
],
368368
"study_meta_categories": [],
369+
"study_websites": [
370+
"https://www.trisome.org/"
371+
],
369372
"website": "https://www.trisome.org/",
370373
"data_category": [
371374
"Transcriptomics"

src/graphql/studies/models.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,6 @@ export interface IStudyEntity {
119119
selection_criteria?: string[];
120120
study_designs?: string[];
121121
study_meta_categories?: string[];
122+
study_websites?: string[];
122123
website: string;
123124
}

src/graphql/studies/queries.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const GET_STUDIES = gql`
4747
publications
4848
participant_count
4949
study_designs
50+
study_websites
5051
selection_criteria
5152
website
5253
}
@@ -166,6 +167,7 @@ export const GET_STUDY = gql`
166167
study_designs
167168
study_meta_categories
168169
study_name
170+
study_websites
169171
website
170172
data_category
171173
data_sources
@@ -258,6 +260,7 @@ export const SEARCH_STUDIES_QUERY = gql`
258260
attribution
259261
data_category
260262
website
263+
study_websites
261264
}
262265
}
263266
}

src/views/PublicStudyEntity/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export interface IPublicStudyEntity {
6060
study_designs?: string[];
6161
study_id?: string;
6262
study_meta_categories?: string[];
63+
study_websites?: string[];
6364
study_name?: string;
6465
version?: string;
6566
website?: string;

src/views/StudyEntity/utils/summary.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,14 @@ const getSummaryDescriptions = ({
203203
});
204204
}
205205

206-
if (study?.website) {
206+
if (study?.study_websites?.length) {
207207
result.push({
208208
label: intl.get('entities.study.study_website'),
209-
value: <ExternalLink href={study.website}>{study.website}</ExternalLink>,
209+
value: study.study_websites.map((website, index) => (
210+
<div key={index}>
211+
<ExternalLink href={website}>{website}</ExternalLink>
212+
</div>
213+
)),
210214
});
211215
}
212216

0 commit comments

Comments
 (0)