Skip to content

Commit

Permalink
feat: changes study attribute of Collection entity to be ref_array an…
Browse files Browse the repository at this point in the history
…d changed the frontend accordingly
  • Loading branch information
svituz committed Oct 4, 2024
1 parent 42d7695 commit 7547367
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,28 @@
</li>
</ul>
</template>
<template v-if="info.study">
<h5>Study</h5>
<template v-if="info.studies && info.studies.length > 0">
<h5>Studies</h5>
<ul class="right-content-list">
<li>
<span class="font-weight-bold mr-2">Name:</span>
<span>{{ info.study.title }}</span>
<div>
<span
class="fa fa-fw fa-address-card mr-2"
aria-hidden="true"
/>
<router-link :to="info.study.report">
<span>
{{ uiText["view"] }} {{ info.study.title }} study
</span>
</router-link>
<div
class="info-list"
v-for="(study, index) in info.studies"
:key="`${study.name}-${index}`"
>
<span class="font-weight-bold mr-2">Name:</span>
<span>{{ study.title }}</span>
<div>
<span
class="fa fa-fw fa-address-card mr-2"
aria-hidden="true"
/>
<router-link :to="study.report">
<span>
{{ uiText["view"] }} {{ study.title }} study
</span>
</router-link>
</div>
</div>
</li>
</ul>
Expand Down
12 changes: 7 additions & 5 deletions apps/directory/src/functions/viewmodelMapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,13 @@ export const collectionReportInformation = (collection) => {
}

if (collection.study) {
collectionReport.study = {
id: collection.study.id,
title: collection.study.title,
report: `/study/${collection.study.id}`,
};
collectionReport.studies = collection.study.map((study) => {
return {
id: study.id,
title: study.title,
report: `/study/${study.id}`,
};
});
}

collectionReport.collaboration = [];
Expand Down
2 changes: 1 addition & 1 deletion data/biobank-directory/molgenis.csv
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Collections,,biobank_label,Biobank Label,string,,true,,"Name of the biobank, to
Collections,,network,Network,ref_array,,false,,"Reference to a network ID, to which the collection belongs to.",,Networks,,${name},,,,,
Collections,,combined_network,Combined Network,ref_array,,false,,"Reference to one or more network IDs, to which the collection belongs directly or indirectly (i.e., either the collection is explicitly marked as part of the network or its biobank is).",,Networks,,${name},,,,,
Collections,,also_known,Also Known In,ref_array,,false,,The collection also exists in …,,AlsoKnownIn,,${name_system},,,,,
Collections,,study,Study,ref,,false,,A link to a Study during which the collection was generated,,Studies,,${title},,,,,
Collections,,study,Study,ref_array,,false,,A link to studies during which the collection was generated,,Studies,,${title},,,,,
Collections,,characteristics,Characteristics,heading,,false,,Collection Characteristics,,,,,,,,,
Collections,,type,Collection Types,ontology_array,,true,,Type(s) of the collection - MIABIS-2.0-19.,DirectoryOntologies,CollectionTypes,,${label},,,,,
Collections,,data_categories,Data Categories,ontology_array,,true,,Denotes which types of data are available (MIABIS-2.0-13).,DirectoryOntologies,DataCategories,,${label},,,,,
Expand Down

0 comments on commit 7547367

Please sign in to comment.