559 delegation create event in another user calendar (#561)

* [#559] added delegated calendars in user selector
* [#559] selector for calendar display delegated and personal separatly

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2026-02-20 23:14:48 +01:00
committed by GitHub
parent 2e70928645
commit f40165d2e2
9 changed files with 107 additions and 52 deletions
+11 -1
View File
@@ -11,6 +11,7 @@ import {
Box,
Button,
Checkbox,
Divider,
FormControl,
FormControlLabel,
IconButton,
@@ -183,6 +184,12 @@ export default function EventFormFields({
// Track if user has clicked on calendar section in normal mode
const [hasClickedCalendarSection, setHasClickedCalendarSection] =
React.useState(false);
const delegatedCalendars = userPersonalCalendars.filter(
(cal) => cal.delegated
);
const personalCalendars = userPersonalCalendars.filter(
(cal) => !cal.delegated
);
// Reset hasEndDateChanged and hasClickedDateTimeSection when modal closes
React.useEffect(() => {
@@ -790,7 +797,10 @@ export default function EventFormFields({
handleCalendarChange(e.target.value)
}
>
{CalendarItemList(userPersonalCalendars)}
{CalendarItemList(personalCalendars)}
{delegatedCalendars.length > 0 &&
personalCalendars.length > 0 && <Divider component={"li"} />}
{CalendarItemList(delegatedCalendars)}
</Select>
</FormControl>
)}