mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
handle moving an event
This commit is contained in:
parent
d8e7a7f1af
commit
a5998ce99d
@ -111,35 +111,10 @@ export default {
|
||||
toggleWeekends: function () {
|
||||
this.calendarOptions.weekends = !this.calendarOptions.weekends;
|
||||
},
|
||||
updateEventsSource() {
|
||||
/*
|
||||
this.calendarOptions.eventSources = [];
|
||||
this.calendarOptions.eventSources.push(...this.calendarEvents.selected);
|
||||
if (window.startDate !== undefined) {
|
||||
this.calendarOptions.eventSources.push(this.calendarEvents.current);
|
||||
}
|
||||
if (this.showMyCalendar) {
|
||||
this.calendarOptions.eventSources.push(this.calendarEvents.user);
|
||||
}
|
||||
|
||||
console.log('eventSources', this.calendarOptions.eventSoruces);
|
||||
|
||||
*/
|
||||
},
|
||||
onDatesSet(event) {
|
||||
console.log('onDatesSet', event);
|
||||
this.$store.dispatch('setCurrentDatesView', {start: event.start, end: event.end});
|
||||
},
|
||||
unSelectPreviousEvent(event) {
|
||||
if (event) {
|
||||
if (typeof event.setProp === 'function') {
|
||||
event.setProp('backgroundColor', this.previousSelectedEventColor);
|
||||
event.setProp('borderColor', this.previousSelectedEventColor);
|
||||
event.setProp('textColor', '#444444');
|
||||
event.setProp('title', '');
|
||||
}
|
||||
}
|
||||
},
|
||||
onDateSelect(payload) {
|
||||
console.log('onDateSelect', payload);
|
||||
|
||||
@ -156,7 +131,11 @@ export default {
|
||||
this.$store.dispatch('setEventTimes', {start: payload.start, end: payload.end});
|
||||
},
|
||||
onEventChange(payload) {
|
||||
this.$store.dispatch('updateEvent', payload);
|
||||
console.log('onEventChange', payload);
|
||||
if (this.$store.state.activity.calendarRange !== null) {
|
||||
throw new Error("not allowed to edit a calendar associated with a calendar range");
|
||||
}
|
||||
this.$store.dispatch('setEventTimes', {start: payload.event.start, end: payload.event.end});
|
||||
},
|
||||
onEventClick(payload) {
|
||||
if (payload.event.extendedProps.is !== 'range') {
|
||||
@ -181,9 +160,6 @@ export default {
|
||||
payload.event.setProp('borderColor', '#ffffff');
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//this.init();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user