mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
accompanying course: add resource
This commit is contained in:
parent
44a09903a0
commit
5fab0ffe27
@ -47,7 +47,7 @@
|
||||
</participation-item>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div v-if="suggestedEntities.length > 0">
|
||||
<ul class="list-suggest add-items">
|
||||
<li v-for="p in suggestedEntities" @click="addSuggestedEntity(p)">
|
||||
<span class="badge bg-primary" style="cursor: pointer;">
|
||||
@ -102,7 +102,10 @@ export default {
|
||||
...mapState({
|
||||
courseId: state => state.accompanyingCourse.id,
|
||||
participations: state => state.accompanyingCourse.participations,
|
||||
suggestedEntities: state => [state.accompanyingCourse.requestor, ...state.accompanyingCourse.resources]
|
||||
suggestedEntities: state => [
|
||||
state.accompanyingCourse.requestor,
|
||||
...state.accompanyingCourse.resources.map(r => r.resource)
|
||||
].filter(e => e !== null)
|
||||
}),
|
||||
...mapGetters([
|
||||
'isParticipationValid'
|
||||
@ -118,7 +121,14 @@ export default {
|
||||
},
|
||||
getReturnPath() {
|
||||
return window.location.pathname + window.location.search + window.location.hash;
|
||||
}
|
||||
},
|
||||
addSuggestedPerson(person) { //TODO
|
||||
this.$store.dispatch('addPersonsInvolved', { result: person, type: 'person' });
|
||||
this.setPersonsInBloc();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.suggestedEntities)
|
||||
},
|
||||
methods: {
|
||||
removeParticipation(item) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user