Skip to content

Commit

Permalink
Use the block display mode so that the right colors render in the mon…
Browse files Browse the repository at this point in the history
…th view
  • Loading branch information
alextselegidis committed Oct 14, 2024
1 parent 833b7ba commit 65a4cc5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions assets/js/utils/calendar_default_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -1237,6 +1238,7 @@ App.Utils.CalendarDefaultView = (function () {
editable: true,
className: 'fc-unavailability fc-custom',
data: unavailability,
display: 'block',
};

calendarEventSource.push(unavailabilityEvent);
Expand All @@ -1254,6 +1256,7 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
className: 'fc-blocked-period fc-unavailability',
data: blockedPeriod,
display: 'block',
};

calendarEventSource.push(blockedPeriodEvent);
Expand Down Expand Up @@ -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],
Expand All @@ -1339,6 +1343,7 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
display: 'background',
className: 'fc-unavailability',
display: 'block',
};

calendarEventSource.push(unavailabilityEvent);
Expand Down Expand Up @@ -1366,6 +1371,7 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
display: 'background',
className: 'fc-unavailability',
display: 'block',
};

calendarEventSource.push(unavailabilityEvent);
Expand All @@ -1389,6 +1395,7 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
display: 'background',
className: 'fc-unavailability',
display: 'block',
};

calendarEventSource.push(unavailabilityEvent);
Expand All @@ -1415,6 +1422,7 @@ App.Utils.CalendarDefaultView = (function () {
editable: false,
display: 'background',
className: 'fc-unavailability fc-break',
display: 'block',
};

calendarEventSource.push(unavailabilityEvent);
Expand Down
8 changes: 8 additions & 0 deletions assets/js/utils/calendar_table_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -784,6 +785,7 @@ App.Utils.CalendarTableView = (function () {
end: end,
allDay: false,
color: '#BEBEBE',
display: 'block',
editable: false,
display: 'background',
className: 'fc-unavailability',
Expand All @@ -805,6 +807,7 @@ App.Utils.CalendarTableView = (function () {
end: workDateStart.toDate(),
allDay: false,
color: '#BEBEBE',
display: 'block',
editable: false,
display: 'background',
className: 'fc-unavailability',
Expand All @@ -823,6 +826,7 @@ App.Utils.CalendarTableView = (function () {
end: end.toDate(),
allDay: false,
color: '#BEBEBE',
display: 'block',
editable: false,
display: 'background',
className: 'fc-unavailability',
Expand All @@ -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',
Expand Down Expand Up @@ -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.
});
}
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 65a4cc5

Please sign in to comment.