diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue index bc7aa9ccf..20d21e1c0 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue @@ -56,7 +56,13 @@ export default { }, updateSocialIssues(value) { console.log('@@@ CHANGE value', value); - this.$store.dispatch('updateSocialIssues', value); + this.$store.dispatch('updateSocialIssues', this.transformValue(value)); + }, + transformValue(value) { + let payload = value; + let body = {}; //{ type: "social_issue", id: 5 }; + let method = ''; //'POST' : 'DELETE'; + return { payload, body, method }; } } } diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js index 1ba89a126..3990f8c84 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js @@ -178,8 +178,8 @@ let initPromise = getAccompanyingCourse(id) resolve(); })).catch((error) => { commit('catchError', error) }); }, - updateSocialIssues({ commit }, payload) { - console.log('## action: payload', payload); + updateSocialIssues({ commit }, { payload, body, method }) { + console.log('## action: payload', { payload, body, method }); //postSocialIssue(id, body, method) //.then(response => new Promise((resolve, reject) => {