fix: correct search/replace block in avcalendar.tsx to match existing lines
This commit is contained in:
@ -261,7 +261,9 @@ const AvCalendar = ({ publisherId, events, selectedDate, cartEvents, lastPublish
|
|||||||
const enddate = common.setTimezone(end);
|
const enddate = common.setTimezone(end);
|
||||||
|
|
||||||
if (!start || !end) return;
|
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 (!isAdmin && !isCurrentUser) {
|
||||||
if (startdate < new Date() || end < new Date() || startdate > end) return;
|
if (startdate < new Date() || end < new Date() || startdate > end) return;
|
||||||
//or if schedule is published (lastPublishedDate)
|
//or if schedule is published (lastPublishedDate)
|
||||||
|
Reference in New Issue
Block a user