-
personnalCalendars
- {Object.keys(calendars)
- .filter((id) => id.split("/")[0] === userId)
- .map((id) => {
- return (
-
-
-
- );
- })}
-
sharedCalendars
- {Object.keys(calendars)
- .filter((id) => id.split("/")[0] !== userId)
- .map((id) => (
+
+ Personnal Calendars
+
+ {personnalCalendars.map((id) => {
+ return (
- ))}
+ );
+ })}
+ {delegatedCalendars.length > 0 && (
+ <>
+
+ Delegated Calendars
+
+ {delegatedCalendars.map((id) => (
+
+
+
+ ))}
+ >
+ )}
+ {sharedCalendars.length > 0 && (
+ <>
+
+ Shared Calendars
+
+ {sharedCalendars.map((id) => (
+
+
+
+ ))}
+ >
+ )}
);
}
diff --git a/src/features/Calendars/CalendarSlice.ts b/src/features/Calendars/CalendarSlice.ts
index 6b1422f..1c165fe 100644
--- a/src/features/Calendars/CalendarSlice.ts
+++ b/src/features/Calendars/CalendarSlice.ts
@@ -2,11 +2,10 @@ import { createAsyncThunk, createSlice, PayloadAction } from "@reduxjs/toolkit";
import { Calendars } from "./CalendarTypes";
import { CalendarEvent } from "../Events/EventsTypes";
import { getCalendar, getCalendars } from "./CalendarApi";
-import getOpenPaasUser from "../User/userAPI";
+import { getOpenPaasUser, getUserDetails } from "../User/userAPI";
import { parseCalendarEvent } from "../Events/eventUtils";
import { deleteEvent, putEvent } from "../Events/EventApi";
import { formatDateToYYYYMMDDTHHMMSS } from "../../utils/dateUtils";
-import { responsiveFontSizes } from "@mui/material";
export const getCalendarsListAsync = createAsyncThunk<
Record