fix copy availabilities button functionality. when editing manually, the flag is set back to false;

This commit is contained in:
Dobromir Popov
2024-04-17 02:59:54 +03:00
parent 0dd5d71714
commit 52aecf741e
4 changed files with 15 additions and 9 deletions

View File

@ -212,7 +212,7 @@ export default function AvailabilityForm({ publisherId, existingItems, inline, o
availability.dayOfMonth = startTime.getDate();
availability.endDate = null;
}
availability.isFromPreviousMonth = false;
availability.dateOfEntry = new Date();
}

View File

@ -402,6 +402,10 @@ const AvCalendar = ({ publisherId, events, selectedDate }) => {
// orange-500 from Tailwind CSS
backgroundColor = '#f56565';
}
if (event.isFromPreviousMonth) {
//gray
backgroundColor = '#a0aec0';
}
if (event.isActive) {
switch (event.type) {
case 'assignment':