mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
cleaning console log
This commit is contained in:
parent
a63c38b6aa
commit
44c9a65505
@ -23,14 +23,12 @@ let initPromise = getAccompanyingCourse(id)
|
|||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
removeParticipation(state, item) {
|
removeParticipation(state, item) {
|
||||||
//console.log('mutation: remove item', item.id);
|
//console.log('### mutation: remove item', item.id);
|
||||||
state.accompanyingCourse.participations = state.accompanyingCourse.participations.filter(participation => participation !== item);
|
state.accompanyingCourse.participations = state.accompanyingCourse.participations.filter(participation => participation !== item);
|
||||||
},
|
},
|
||||||
closeParticipation(state, { participation, payload }) {
|
closeParticipation(state, { participation, payload }) {
|
||||||
console.log('### mutation: close item', { participation, payload });
|
//console.log('### mutation: close item', { participation, payload });
|
||||||
// trouve dans le state le payload et le supprime du state
|
|
||||||
state.accompanyingCourse.participations = state.accompanyingCourse.participations.filter(participation => participation !== payload);
|
state.accompanyingCourse.participations = state.accompanyingCourse.participations.filter(participation => participation !== payload);
|
||||||
// pousse la participation
|
|
||||||
state.accompanyingCourse.participations.push(participation);
|
state.accompanyingCourse.participations.push(participation);
|
||||||
},
|
},
|
||||||
addParticipation(state, participation) {
|
addParticipation(state, participation) {
|
||||||
@ -46,7 +44,6 @@ let initPromise = getAccompanyingCourse(id)
|
|||||||
//console.log('## action: fetch delete participation: payload', payload.person.id);
|
//console.log('## action: fetch delete participation: payload', payload.person.id);
|
||||||
postParticipation(id, payload.person.id, 'DELETE')
|
postParticipation(id, payload.person.id, 'DELETE')
|
||||||
.then(participation => new Promise((resolve, reject) => {
|
.then(participation => new Promise((resolve, reject) => {
|
||||||
//console.log('payload', payload);
|
|
||||||
commit('closeParticipation', { participation, payload });
|
commit('closeParticipation', { participation, payload });
|
||||||
resolve();
|
resolve();
|
||||||
}))
|
}))
|
||||||
@ -58,7 +55,6 @@ let initPromise = getAccompanyingCourse(id)
|
|||||||
//console.log('## action: fetch post participation: payload', payload.id);
|
//console.log('## action: fetch post participation: payload', payload.id);
|
||||||
postParticipation(id, payload.id, 'POST')
|
postParticipation(id, payload.id, 'POST')
|
||||||
.then(participation => new Promise((resolve, reject) => {
|
.then(participation => new Promise((resolve, reject) => {
|
||||||
//console.log(participation, payload);
|
|
||||||
addPersons.commit('addParticipation', participation);
|
addPersons.commit('addParticipation', participation);
|
||||||
addPersons.commit('resetState', payload);
|
addPersons.commit('resetState', payload);
|
||||||
resolve();
|
resolve();
|
||||||
@ -69,7 +65,6 @@ let initPromise = getAccompanyingCourse(id)
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//console.log('store object', store.state.accompanyingCourse.id);
|
|
||||||
resolve(store);
|
resolve(store);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ const getters = {
|
|||||||
// mutations
|
// mutations
|
||||||
const mutations = {
|
const mutations = {
|
||||||
setQuery(state, query) {
|
setQuery(state, query) {
|
||||||
//console.log('q=', query);
|
|
||||||
state.query = query;
|
state.query = query;
|
||||||
},
|
},
|
||||||
loadSuggestions(state, suggested) {
|
loadSuggestions(state, suggested) {
|
||||||
@ -38,9 +37,7 @@ const mutations = {
|
|||||||
state.selected = value;
|
state.selected = value;
|
||||||
},
|
},
|
||||||
resetState(state, selected) {
|
resetState(state, selected) {
|
||||||
//console.log('avant', state.selected);
|
|
||||||
state.selected = state.selected.filter(value => value !== selected);
|
state.selected = state.selected.filter(value => value !== selected);
|
||||||
//console.log('après', state.selected);
|
|
||||||
state.query = "";
|
state.query = "";
|
||||||
state.suggested = [];
|
state.suggested = [];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user