diff --git a/src/components/Section/Section.vue b/src/components/Section/Section.vue index 135d41d..438a053 100644 --- a/src/components/Section/Section.vue +++ b/src/components/Section/Section.vue @@ -24,7 +24,8 @@ v-on:setData="setResponse" :responses="responses" :selected_language="selected_language" - :showPassOptions="showPassOptions" + :showPassOptions="findPassOptions" + :individualPassList="individualPassList" :reprotermsUrl="reprotermsUrl" /> @@ -99,7 +100,8 @@ export default { visibility: {}, scores: {}, currentIndex: 0, - showModal: false + showModal: false, + individualPassList: [], }; }, components: { @@ -117,6 +119,7 @@ export default { // this.$store.dispatch('getActivityData'); jsonld.expand(this.srcUrl).then((resp) => { this.activity = resp[0]; + this.findIndividualPassOptions(); this.listShow = [0]; this.$nextTick(() => { const answered = _.filter(this.context, c => @@ -151,6 +154,17 @@ export default { return i; // }); }, + findIndividualPassOptions() { + if (this.activity['http://schema.repronim.org/addProperties']) { + this.individualPassList = _.filter(this.activity['http://schema.repronim.org/addProperties'], ap => { + // eslint-disable-next-line no-prototype-builtins + if (ap.hasOwnProperty('http://schema.repronim.org/allow')) { + return ap; + } + }); + // console.log(138, a); + } + }, getVisibility(responses) { const responseMapper = this.responseMapper(responses); if (!_.isEmpty(this.activity['http://schema.repronim.org/addProperties'])) {