Skip to content

Commit 74b586a

Browse files
committed
fix: add properties to section activity
1 parent 454686d commit 74b586a

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/components/Section/Section.vue

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
v-on:setData="setResponse"
2525
:responses="responses"
2626
:selected_language="selected_language"
27-
:showPassOptions="showPassOptions"
27+
:showPassOptions="findPassOptions"
28+
:individualPassList="individualPassList"
2829
:reprotermsUrl="reprotermsUrl"
2930
/>
3031
</transition>
@@ -99,7 +100,8 @@ export default {
99100
visibility: {},
100101
scores: {},
101102
currentIndex: 0,
102-
showModal: false
103+
showModal: false,
104+
individualPassList: [],
103105
};
104106
},
105107
components: {
@@ -117,6 +119,7 @@ export default {
117119
// this.$store.dispatch('getActivityData');
118120
jsonld.expand(this.srcUrl).then((resp) => {
119121
this.activity = resp[0];
122+
this.findIndividualPassOptions();
120123
this.listShow = [0];
121124
this.$nextTick(() => {
122125
const answered = _.filter(this.context, c =>
@@ -151,6 +154,17 @@ export default {
151154
return i;
152155
// });
153156
},
157+
findIndividualPassOptions() {
158+
if (this.activity['http://schema.repronim.org/addProperties']) {
159+
this.individualPassList = _.filter(this.activity['http://schema.repronim.org/addProperties'], ap => {
160+
// eslint-disable-next-line no-prototype-builtins
161+
if (ap.hasOwnProperty('http://schema.repronim.org/allow')) {
162+
return ap;
163+
}
164+
});
165+
// console.log(138, a);
166+
}
167+
},
154168
getVisibility(responses) {
155169
const responseMapper = this.responseMapper(responses);
156170
if (!_.isEmpty(this.activity['http://schema.repronim.org/addProperties'])) {

0 commit comments

Comments
 (0)