Implement Open-Xchange calendar profiles
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user