v-for loop on add-evaluation subcomponent

This commit is contained in:
2021-08-11 20:57:48 +02:00
committed by Marc Ducobu
parent 436d583f65
commit f5c5038fda
3 changed files with 24 additions and 21 deletions

View File

@@ -85,7 +85,11 @@
</div>
<!-- list evaluations -->
<add-evaluation v-if="hasEvaluationsForAction"></add-evaluation>
<add-evaluation
v-for="e in pickedEvaluations"
v-bind:key="e.id"
v-bind:evaluation="e">
</add-evaluation>
<!-- box to add new evaluation -->
<div class="add_evaluation">
@@ -309,7 +313,6 @@ export default {
]),
...mapGetters([
'hasResultsForAction',
'hasEvaluationsForAction',
'hasHandlingThirdParty',
'hasThirdParties',
]),
@@ -352,6 +355,9 @@ export default {
let pickedIds = this.$store.state.evaluationsPicked.map(e => e.evaluation.id);
return this.$store.state.evaluationsForAction.filter(e => !pickedIds.includes(e.id));
},
pickedEvaluations() {
return this.$store.state.evaluationsPicked;
},
personsPicked: {
get() {
let s = this.$store.state.personsPicked.map(p => p.id);