mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
add intensity in teleported toggleFlags
This commit is contained in:
@@ -62,6 +62,9 @@ let initPromise = getAccompanyingCourse(id)
|
||||
//console.log('### mutation: addResource', resource);
|
||||
state.accompanyingCourse.resources.push(resource);
|
||||
},
|
||||
toggleIntensity(state, value) {
|
||||
state.accompanyingCourse.intensity = value;
|
||||
},
|
||||
toggleEmergency(state, value) {
|
||||
//console.log('### mutation: toggleEmergency');
|
||||
state.accompanyingCourse.emergency = value;
|
||||
@@ -136,6 +139,14 @@ let initPromise = getAccompanyingCourse(id)
|
||||
resolve();
|
||||
})).catch((error) => { commit('catchError', error) });
|
||||
},
|
||||
toggleIntensity({ commit }, payload) {
|
||||
console.log(payload);
|
||||
patchAccompanyingCourse(id, { type: "accompanying_period", intensity: payload })
|
||||
.then(course => new Promise((resolve, reject) => {
|
||||
commit('toggleIntensity', course.intensity);
|
||||
resolve();
|
||||
})).catch((error) => { commit('catchError', error) });
|
||||
},
|
||||
toggleEmergency({ commit }, payload) {
|
||||
patchAccompanyingCourse(id, { type: "accompanying_period", emergency: payload })
|
||||
.then(course => new Promise((resolve, reject) => {
|
||||
|
Reference in New Issue
Block a user