Reservations now show on calendar
This commit is contained in:
@@ -27,7 +27,7 @@ export default class extends Controller {
|
||||
],
|
||||
});
|
||||
|
||||
this.calendar = calendar;
|
||||
window.calendar = calendar;
|
||||
this.getCalendardata();
|
||||
calendar.render();
|
||||
}
|
||||
@@ -36,11 +36,11 @@ export default class extends Controller {
|
||||
var reservations = JSON.parse(document.querySelector("#main-calendar").dataset.reservations);
|
||||
window.reservations = reservations;
|
||||
reservations.forEach(reservation => {
|
||||
this.calendar.createSchedules([
|
||||
window.calendar.createEvents([
|
||||
{
|
||||
id: reservation.id,
|
||||
calendarId: 'cal1',
|
||||
title: reservation.customer,
|
||||
title: reservation.customer.name,
|
||||
category: 'time',
|
||||
dueDateClass: reservation.dueDateClass,
|
||||
location: reservation.team.name,
|
||||
|
||||
Reference in New Issue
Block a user