fix: correct search/replace block in avcalendar.tsx to match existing lines

This commit is contained in:
Dobromir Popov (aider)
2024-09-17 10:58:52 +03:00
parent 2064d95346
commit 1d4696f0f7

View File

@ -261,7 +261,9 @@ const AvCalendar = ({ publisherId, events, selectedDate, cartEvents, lastPublish
const enddate = common.setTimezone(end);
if (!start || !end) return;
//readonly for past dates (ToDo: if not admin)
//readonly for past dates (ToDo: if not admin or current user)
const isCurrentUser = selectedEvents.some(event => event.userId === currentUserId);
if (!isAdmin && !isCurrentUser) {
if (startdate < new Date() || end < new Date() || startdate > end) return;
//or if schedule is published (lastPublishedDate)