mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
vue accompanyingCourse, adding an origin sub-component
This commit is contained in:
@@ -81,6 +81,10 @@ let initPromise = getAccompanyingCourse(id)
|
||||
updateSocialIssues(state, value) {
|
||||
state.accompanyingCourse.socialIssues = value;
|
||||
},
|
||||
updateOrigin(state, value) {
|
||||
console.log('value', value);
|
||||
state.accompanyingCourse.origin = value;
|
||||
},
|
||||
updateReferrer(state, value) {
|
||||
console.log('value', value);
|
||||
state.accompanyingCourse.user = value;
|
||||
@@ -191,6 +195,13 @@ let initPromise = getAccompanyingCourse(id)
|
||||
resolve();
|
||||
})).catch((error) => { commit('catchError', error) });
|
||||
},
|
||||
updateOrigin({ commit }, payload) {
|
||||
patchAccompanyingCourse(id, { type: "accompanying_period", origin: { id: payload.id, type: payload.type } })
|
||||
.then(course => new Promise((resolve, reject) => {
|
||||
commit('updateOrigin', course.origin);
|
||||
resolve();
|
||||
})).catch((error) => { commit('catchError', error) });
|
||||
},
|
||||
updateReferrer({ commit }, payload) {
|
||||
patchAccompanyingCourse(id, { type: "accompanying_period", user: { id: payload.id, type: payload.type } })
|
||||
.then(course => new Promise((resolve, reject) => {
|
||||
|
Reference in New Issue
Block a user