Use the block display mode so that the right colors render in the month view

This commit is contained in:
Alex Tselegidis 2024-10-14 15:08:21 +02:00
parent 833b7bad03
commit 65a4cc5df0
2 changed files with 16 additions and 0 deletions

View file

@ -1214,6 +1214,7 @@ App.Utils.CalendarDefaultView = (function () {
allDay: false,
color: appointment.color,
data: appointment, // Store appointment data for later use.
display: 'block',
};
calendarEventSource.push(appointmentEvent);
@ -1237,6 +1238,7 @@ App.Utils.CalendarDefaultView = (function () {
editable: true,
className: 'fc-unavailability fc-custom',
data: unavailability,
display: 'block',
};
calendarEventSource.push(unavailabilityEvent);
@ -1254,6 +1256,7 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
className: 'fc-blocked-period fc-unavailability',
data: blockedPeriod,
display: 'block',
};
calendarEventSource.push(blockedPeriodEvent);
@ -1317,6 +1320,7 @@ App.Utils.CalendarDefaultView = (function () {
color: '#879DB4',
editable: false,
className: 'fc-working-plan-exception fc-custom',
display: 'block',
data: {
date: weekdayDate,
workingPlanException: workingPlanExceptions[weekdayDate],
@ -1339,6 +1343,7 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
display: 'background',
className: 'fc-unavailability',
display: 'block',
};
calendarEventSource.push(unavailabilityEvent);
@ -1366,6 +1371,7 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
display: 'background',
className: 'fc-unavailability',
display: 'block',
};
calendarEventSource.push(unavailabilityEvent);
@ -1389,6 +1395,7 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
display: 'background',
className: 'fc-unavailability',
display: 'block',
};
calendarEventSource.push(unavailabilityEvent);
@ -1415,6 +1422,7 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
display: 'background',
className: 'fc-unavailability fc-break',
display: 'block',
};
calendarEventSource.push(unavailabilityEvent);

View file

@ -765,6 +765,7 @@ App.Utils.CalendarTableView = (function () {
end: moment(workingPlanExceptionEnd, 'YYYY-MM-DD HH:mm', true).add(1, 'day'),
allDay: true,
color: '#879DB4',
display: 'block',
editable: false,
className: 'fc-working-plan-exception fc-custom',
data: {
@ -784,6 +785,7 @@ App.Utils.CalendarTableView = (function () {
end: end,
allDay: false,
color: '#BEBEBE',
display: 'block',
editable: false,
display: 'background',
className: 'fc-unavailability',
@ -805,6 +807,7 @@ App.Utils.CalendarTableView = (function () {
end: workDateStart.toDate(),
allDay: false,
color: '#BEBEBE',
display: 'block',
editable: false,
display: 'background',
className: 'fc-unavailability',
@ -823,6 +826,7 @@ App.Utils.CalendarTableView = (function () {
end: end.toDate(),
allDay: false,
color: '#BEBEBE',
display: 'block',
editable: false,
display: 'background',
className: 'fc-unavailability',
@ -845,6 +849,7 @@ App.Utils.CalendarTableView = (function () {
end: breakEnd.toDate(),
allDay: false,
color: '#BEBEBE',
display: 'block',
editable: false,
display: 'background',
className: 'fc-unavailability fc-break',
@ -907,6 +912,7 @@ App.Utils.CalendarTableView = (function () {
end: moment(appointment.end_datetime).toDate(),
allDay: false,
color: appointment.color,
display: 'block',
data: appointment, // Store appointment data for later use.
});
}
@ -942,6 +948,7 @@ App.Utils.CalendarTableView = (function () {
end: moment(unavailability.end_datetime).toDate(),
allDay: false,
color: '#879DB4',
display: 'block',
editable: true,
className: 'fc-unavailability fc-custom',
data: unavailability,
@ -979,6 +986,7 @@ App.Utils.CalendarTableView = (function () {
backgroundColor: '#d65069',
borderColor: '#d65069',
textColor: '#ffffff',
display: 'block',
editable: false,
className: 'fc-blocked-period fc-unavailability',
data: blockedPeriod,