Skip to content

Commit

Permalink
fix: add properties to section activity
Browse files Browse the repository at this point in the history
  • Loading branch information
satra committed Nov 5, 2024
1 parent 454686d commit 74b586a
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/components/Section/Section.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
v-on:setData="setResponse"
:responses="responses"
:selected_language="selected_language"
:showPassOptions="showPassOptions"
:showPassOptions="findPassOptions"
:individualPassList="individualPassList"
:reprotermsUrl="reprotermsUrl"
/>
</transition>
Expand Down Expand Up @@ -99,7 +100,8 @@ export default {
visibility: {},
scores: {},
currentIndex: 0,
showModal: false
showModal: false,
individualPassList: [],
};
},
components: {
Expand All @@ -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 =>
Expand Down Expand Up @@ -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'])) {
Expand Down

0 comments on commit 74b586a

Please sign in to comment.