mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
get options and display selected
This commit is contained in:
@@ -5,7 +5,8 @@ import { getAccompanyingCourse,
|
||||
confirmAccompanyingCourse,
|
||||
postParticipation,
|
||||
postRequestor,
|
||||
postResource } from '../api';
|
||||
postResource,
|
||||
postSocialIssue } from '../api';
|
||||
|
||||
const debug = process.env.NODE_ENV !== 'production';
|
||||
const id = window.accompanyingCourseId;
|
||||
@@ -19,6 +20,7 @@ let initPromise = getAccompanyingCourse(id)
|
||||
},
|
||||
state: {
|
||||
accompanyingCourse: accompanying_course,
|
||||
socialIssueOptions: [],
|
||||
errorMsg: []
|
||||
},
|
||||
getters: {
|
||||
@@ -76,6 +78,13 @@ let initPromise = getAccompanyingCourse(id)
|
||||
postFirstComment(state, comment) {
|
||||
console.log('### mutation: postFirstComment', comment);
|
||||
state.accompanyingCourse.initialComment = comment;
|
||||
},
|
||||
updateSocialIssues(state, value) {
|
||||
state.accompanyingCourse.socialIssues = value;
|
||||
},
|
||||
setSocialIssueOptions(state, value) {
|
||||
console.log('## mutation: setSocialIssueOptions', value);
|
||||
state.socialIssueOptions = value;
|
||||
},
|
||||
confirmAccompanyingCourse(state, response) {
|
||||
//console.log('### mutation: confirmAccompanyingCourse: response', response);
|
||||
@@ -174,7 +183,14 @@ let initPromise = getAccompanyingCourse(id)
|
||||
resolve();
|
||||
})).catch((error) => { commit('catchError', error) });
|
||||
},
|
||||
|
||||
updateSocialIssues({ commit }, payload) {
|
||||
//postSocialIssue(id, { type: "social_issue", id: payload.id }, payload.method)
|
||||
//.then(response => new Promise((resolve, reject) => {
|
||||
// console.log('response', response);
|
||||
commit('updateSocialIssues', payload);
|
||||
// resolve();
|
||||
//})).catch((error) => { commit('catchError', error) });
|
||||
},
|
||||
confirmAccompanyingCourse({ commit }) {
|
||||
console.log('## action: confirmAccompanyingCourse');
|
||||
confirmAccompanyingCourse(id)
|
||||
|
Reference in New Issue
Block a user