diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue index a10c5b4ca..2595ab552 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/App.vue @@ -28,17 +28,18 @@ import Confirm from './components/Confirm.vue'; export default { name: 'App', components: { - Banner, - PersonsAssociated, - Requestor, + //Banner, + //StickyNav, + //PersonsAssociated, + //Requestor, SocialIssue, - Referrer, - Resources, - Comment, - Confirm, + //Referrer, // fait foirer socialissues + //Resources, + //Comment, + //Confirm, }, computed: mapState([ - 'accompanyingCourse' + 'accompanyingCourse', 'socialIssueOptions' ]) }; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/api.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/api.js index 8b7a4ad6b..4acff73f6 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/api.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/api.js @@ -146,6 +146,25 @@ const postResource = (id, payload, method) => { }); }; +/* +* +*/ +const postSocialIssue = (id, body, method) => { + console.log('body + method', body, method); + const url = `/api/1.0/person/accompanying-course/${id}/socialissue.json`; + return fetch(url, { + method: method, + headers: { + 'Content-Type': 'application/json;charset=utf-8' + }, + body: JSON.stringify(body) + }) + .then(response => { + if (response.ok) { return response.json(); } + throw Error('Error with request resource response'); + }); +}; + export { getAccompanyingCourse, patchAccompanyingCourse, @@ -154,4 +173,5 @@ export { postParticipation, postRequestor, postResource, + postSocialIssue }; 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 a756727d8..a0982b059 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/SocialIssue.vue @@ -3,19 +3,22 @@