still show assignments in green

This commit is contained in:
Dobromir Popov
2024-04-28 01:16:13 +03:00
parent 8fe1b182f1
commit b6001a0042

View File

@ -308,7 +308,7 @@ const AvCalendar = ({ publisherId, events, selectedDate }) => {
// if (event.isActive) {
switch (event.type) {
case 'assignment':
// backgroundColor = '#48bb78' // always green-500 as we don't pass isConfirmed correctly
backgroundColor = '#48bb78' // always green-500 as we don't pass isConfirmed correctly
//backgroundColor = event.isConfirmed ? '#48bb78' : '#f6e05e'; // green-500 and yellow-300 from Tailwind CSS
break;
case 'recurring':
@ -350,7 +350,7 @@ const AvCalendar = ({ publisherId, events, selectedDate }) => {
// bgColor = "bg-orange-500";
// }
if (event.type === "assignment") {
// bgColor = event.isBySystem ? "bg-red-500" : (event.isConfirmed || true ? "bg-green-500" : "bg-yellow-500");
bgColor = event.isBySystem ? "bg-red-500" : (event.isConfirmed || true ? "bg-green-500" : "bg-yellow-500");
//event.title = event.publisher.name; //ToDo: add other publishers names
//event.title = common.getTimeFomatted(event.startTime) + " - " + common.getTimeFomatted(event.endTime);