[#397 bis] added participation management on event from thunderbird (#432)

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2026-01-07 11:45:17 +01:00
committed by GitHub
parent e59d878e6c
commit 9ff75056c7
47 changed files with 550 additions and 366 deletions
+6 -6
View File
@@ -12,8 +12,8 @@ import React, {
import { useAppDispatch, useAppSelector } from "../../app/hooks";
import { ResponsiveDialog } from "../../components/Dialog";
import { putEventAsync } from "../Calendars/CalendarSlice";
import { Calendars } from "../Calendars/CalendarTypes";
import { userAttendee } from "../User/userDataTypes";
import { Calendar } from "../Calendars/CalendarTypes";
import { userAttendee } from "../User/models/attendee";
import { CalendarEvent, RepetitionObject } from "./EventsTypes";
import { createSelector } from "@reduxjs/toolkit";
import { TIMEZONES } from "../../utils/timezone-data";
@@ -75,11 +75,11 @@ function EventPopover({
if (id.split("/")[0] === userId) {
return calendars.list?.[id];
}
return {} as Calendars;
return {} as Calendar;
})
.filter((calendar) => calendar.id)
);
const userPersonalCalendars: Calendars[] = useAppSelector(
const userPersonalCalendars: Calendar[] = useAppSelector(
selectPersonalCalendars
);
@@ -722,10 +722,10 @@ function EventPopover({
const newEventUID = crypto.randomUUID();
// Resolve target calendar safely
const targetCalendar: Calendars | undefined =
const targetCalendar: Calendar | undefined =
calList[calendarid] ||
userPersonalCalendars[0] ||
(Object.values(calList)[0] as Calendars | undefined);
(Object.values(calList)[0] as Calendar | undefined);
if (!targetCalendar || !targetCalendar.id) {
console.error("No target calendar available to save event");
return;