[#625] added freebusy handling in event preview

This commit is contained in:
Camille Moussu
2026-03-12 09:26:58 +01:00
committed by Benoit TELLIER
parent f41c3cbd8d
commit 5269c43354
10 changed files with 137 additions and 61 deletions
@@ -1,10 +1,10 @@
import { dlEvent } from "../EventApi";
import { CalendarEvent } from "../EventsTypes";
import { Box, IconButton } from "@linagora/twake-mui";
import CloseIcon from "@mui/icons-material/Close";
import EditIcon from "@mui/icons-material/Edit";
import FileDownloadOutlinedIcon from "@mui/icons-material/FileDownloadOutlined";
import MoreVertIcon from "@mui/icons-material/MoreVert";
import { dlEvent } from "../EventApi";
import { CalendarEvent } from "../EventsTypes";
interface EventPreviewHeaderProps {
event: CalendarEvent;
@@ -13,7 +13,6 @@ interface EventPreviewHeaderProps {
isOwn: boolean;
isWriteDelegated: boolean;
isNotPrivate: boolean;
isRecurring: boolean;
onClose: () => void;
onEdit: () => void;
onMoreClick: (e: React.MouseEvent<HTMLElement>) => void;
@@ -26,13 +25,12 @@ export function EventPreviewHeader({
isOwn,
isWriteDelegated,
isNotPrivate,
isRecurring,
onClose,
onEdit,
onMoreClick,
}: EventPreviewHeaderProps) {
const canEdit = isOrganizer && (isOwn || (isWriteDelegated && isNotPrivate));
const canSeeMore = (isNotPrivate && !isOwn) || isOwn;
const canSeeMore = isNotPrivate || isOwn;
return (
<Box