Implement Open-Xchange calendar profiles

This commit is contained in:
2026-08-02 05:59:06 +02:00
parent 66a6df4f05
commit 4e05ab2c3e
11 changed files with 476 additions and 23 deletions
+12 -2
View File
@@ -327,7 +327,15 @@ export default function CalendarPage({ settings, auth }: {settings: ApiSettings;
color: normalizeHexColor(payload.color) || DEFAULT_CALENDAR_COLOR
});
if (source && canDeleteCalendars) {
const updatedSource = await updateSyncSource(settings, source.id, syncSourceConnectionUpdatePayload(payload.caldav));
const updatedSource = await updateSyncSource(
settings,
source.id,
syncSourceConnectionUpdatePayload(
payload.sourceMode,
payload.caldav,
source.metadata,
),
);
setSyncSources((current) => current.map((item) => item.id === source.id ? updatedSource : item));
reloadSources = true;
}
@@ -336,7 +344,9 @@ export default function CalendarPage({ settings, auth }: {settings: ApiSettings;
const calendar = await createCalendar(settings, {
name,
color: normalizeHexColor(payload.color) || DEFAULT_CALENDAR_COLOR,
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC"
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC",
owner_type: payload.sourceMode === "open_xchange" && payload.caldav.resource_calendar_ref.trim() ? "resource" : "tenant",
owner_id: payload.sourceMode === "open_xchange" ? payload.caldav.resource_calendar_ref.trim() || null : null
});
let createdSource: CalendarSyncSource | null = null;
if (payload.sourceMode !== "local") {