From 5fab0ffe27582fcd48493ea0701491ca695d11d8 Mon Sep 17 00:00:00 2001 From: nobohan Date: Sun, 28 Nov 2021 21:16:48 +0100 Subject: [PATCH] accompanying course: add resource --- .../components/PersonsAssociated.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue index b1bb1e25d..69f16358f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/PersonsAssociated.vue @@ -47,7 +47,7 @@ -
+
  • @@ -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) {