availability serf reference;

fix copying last month;
This commit is contained in:
Dobromir Popov
2024-03-28 22:55:35 +02:00
parent a6b7c62768
commit a26dd954c0
11 changed files with 163 additions and 90 deletions

View File

@ -274,6 +274,11 @@ const AvCalendar = ({ publisherId, events, selectedDate }) => {
//if event is not active - show in gray
let bgColorClass = 'bg-gray-500'; // Default color for inactive events
var bgColor = event.isActive ? "" : "bg-gray-500";
//ToDo: fix this. maybe we're missing some properties
// if (event.isFromPreviousMonth) {
// // set opacity to 0.5
// bgColor = "bg-orange-500";
// }
if (event.type === "assignment") {
bgColor = event.isBySystem ? "bg-red-500" : (event.isConfirmed ? "bg-green-500" : "bg-yellow-500");
@ -297,11 +302,14 @@ const AvCalendar = ({ publisherId, events, selectedDate }) => {
}
}
eventStyle = {
...style,
// backgroundColor: bgColorClass,
//height: "50px",
//color: 'white',
//if (event.isFromPreviousAssignment) { set opacity to 0.5 }
// opacity: event.isFromPreviousMonth ? 0.5 : 1,
whiteSpace: 'normal', // Allow the text to wrap to the next line
overflow: 'hidden', // Hide overflowed content
textOverflow: 'ellipsis' // Add ellipsis to text that's too long to fit