diff --git a/apps/web/components/DestinationCalendarSelector.tsx b/apps/web/components/DestinationCalendarSelector.tsx index 96f28b1f6d..25f4a7f5ac 100644 --- a/apps/web/components/DestinationCalendarSelector.tsx +++ b/apps/web/components/DestinationCalendarSelector.tsx @@ -61,10 +61,12 @@ const DestinationCalendarSelector = ({ query.data.connectedCalendars.map((selectedCalendar) => ({ key: selectedCalendar.credentialId, label: `${selectedCalendar.integration.title} (${selectedCalendar.primary?.name})`, - options: (selectedCalendar.calendars ?? []).map((cal) => ({ - label: cal.name || "", - value: `${cal.integration}:${cal.externalId}`, - })), + options: (selectedCalendar.calendars ?? []) + .filter((cal) => cal.readOnly === false) + .map((cal) => ({ + label: cal.name || "", + value: `${cal.integration}:${cal.externalId}`, + })), })) ?? []; return (
diff --git a/packages/core/CalendarManager.ts b/packages/core/CalendarManager.ts index eb7f7c2137..a4192f1295 100644 --- a/packages/core/CalendarManager.ts +++ b/packages/core/CalendarManager.ts @@ -44,6 +44,7 @@ export const getConnectedCalendars = async ( const calendars = _(cals) .map((cal) => ({ ...cal, + readOnly: cal.readOnly || false, primary: cal.primary || null, isSelected: selectedCalendars.some((selected) => selected.externalId === cal.externalId), credentialId,