rdv: add user calendar endpoint + add this calendar in the calendar

This commit is contained in:
nobohan
2021-08-18 23:16:52 +02:00
parent dbf72774c2
commit 7c4f976230
8 changed files with 105 additions and 23 deletions

View File

@@ -51,7 +51,7 @@ export default {
calendarEvents: {
loaded: [],
selected: [],
userEvents: [], //TODO load user calendar events
user: [], //TODO load user calendar events
current: currentEvent
},
calendarOptions: {
@@ -81,22 +81,24 @@ export default {
console.log(window.startDate)
// let calendar = this.$refs.fullCalendar.getApi()
// console.log(calendar)
this.calendarEvents.selected.push(this.calendarEvents.user);
this.calendarOptions.eventSources = this.calendarEvents.selected;
console.log(this.calendarOptions.eventSources)
},
updateEventsSource() {
this.calendarOptions.eventSources = this.calendarEvents.selected;
if (window.startDate !== undefined) {
this.calendarEvents.selected.push(currentEvent);
}
this.calendarEvents.selected.push(this.calendarEvents.user);
this.calendarOptions.eventSources = this.calendarEvents.selected;
console.log(this.calendarOptions.eventSources)
},
onDateSelect(payload) {
Object.assign(payload, {users: this.users});
this.$store.dispatch('createEvent', payload);
},
onEventChange(payload) {
console.log(payload.event);
console.log(payload.event.extendedProps);
console.log(payload.event.source);
console.log(payload.event.source.id);
console.log(this.calendarOptions.eventSources)
this.$store.dispatch('updateEvent', payload);
},