adapting vue_calendar to use Location

This commit is contained in:
2021-10-15 15:23:49 +02:00
parent d86307327c
commit 6876c23adb
7 changed files with 40 additions and 7 deletions

View File

@@ -66,6 +66,11 @@ const store = createStore({
setEvents(state, payload) {
console.log(payload)
state.currentEvent = {start: payload.start, end: payload.end}
},
// Location
updateLocation(state, value) {
console.log('### mutation: updateLocation', value);
state.activity.location = value;
}
},
actions: {
@@ -130,6 +135,14 @@ const store = createStore({
commit('setEvents', payload);
},
// Location
updateLocation({ commit }, value) {
console.log('### action: updateLocation', value);
let hiddenLocation = document.getElementById("chill_calendarbundle_calendar_location");
hiddenLocation.value = value.id;
commit('updateLocation', value);
}
}
});