diff --git a/babex-vue/src/components/participants/ParticipantDemographics.vue b/babex-vue/src/components/participants/ParticipantDemographics.vue index ff4415ca..77316cd5 100644 --- a/babex-vue/src/components/participants/ParticipantDemographics.vue +++ b/babex-vue/src/components/participants/ParticipantDemographics.vue @@ -17,6 +17,9 @@ premature_no: true, }); + + let criteriaSnippet = ref(''); + defineProps(['experiments']); let request = null; @@ -127,6 +130,15 @@ d3.select('.graph svg').remove(); loading.value = true; makeGraph('.graph'); + + if (experiment) { + fetch(`/experiments/${experiment.value}/criteria/`, { + credentials: 'include', + method: 'GET', + }).then(async (response) => { + criteriaSnippet.value = await response.text() + }); + } }, {deep: true}); @@ -145,7 +157,8 @@