@@ -85,8 +85,7 @@ export const eventToFullCalendarFormat = (
|
|||||||
const isOrganiser = e.organizer
|
const isOrganiser = e.organizer
|
||||||
? e.organizer.cal_address?.toLowerCase() === userAddress?.toLowerCase()
|
? e.organizer.cal_address?.toLowerCase() === userAddress?.toLowerCase()
|
||||||
: true; // if there are no organizer in the event we assume it was organized by the owner
|
: true; // if there are no organizer in the event we assume it was organized by the owner
|
||||||
const isPersonnalEvent =
|
const isPersonnalEvent = extractEventBaseUuid(e.calId) === userId;
|
||||||
extractEventBaseUuid(e.calId) === userId && isOrganiser;
|
|
||||||
const convertedEvent: CalendarEvent & {
|
const convertedEvent: CalendarEvent & {
|
||||||
colors: Record<string, string> | undefined;
|
colors: Record<string, string> | undefined;
|
||||||
editable: boolean;
|
editable: boolean;
|
||||||
@@ -95,8 +94,8 @@ export const eventToFullCalendarFormat = (
|
|||||||
...e,
|
...e,
|
||||||
title: formatEventChipTitle(e, t),
|
title: formatEventChipTitle(e, t),
|
||||||
colors: e.color,
|
colors: e.color,
|
||||||
editable: isPersonnalEvent,
|
editable: isPersonnalEvent && isOrganiser && !pending,
|
||||||
priority: isPersonnalEvent && !pending ? 1 : 0,
|
priority: isPersonnalEvent ? 1 : 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!isAllDay && e.start && eventTimezone) {
|
if (!isAllDay && e.start && eventTimezone) {
|
||||||
|
|||||||
Reference in New Issue
Block a user