Files
calchat/apps/client/src/components/EventConfirmDialog.tsx
Linus Waldowsky 2b999d9b0f feat: add recurring event deletion with three modes
Implement three deletion modes for recurring events:
- single: exclude specific occurrence via EXDATE mechanism
- future: set RRULE UNTIL to stop future occurrences
- all: delete entire event series

Changes include:
- Add exceptionDates field to CalendarEvent model
- Add RecurringDeleteMode type and DeleteRecurringEventDTO
- EventService.deleteRecurring() with mode-based logic using rrule library
- EventController DELETE endpoint accepts mode/occurrenceDate query params
- recurrenceExpander filters out exception dates during expansion
- AI tools support deleteMode and occurrenceDate for proposed deletions
- ChatService.confirmEvent() handles recurring delete modes
- New DeleteEventModal component for unified delete confirmation UI
- Calendar screen integrates modal for both recurring and non-recurring events
2026-01-25 15:19:31 +01:00

42 lines
1.1 KiB
TypeScript

import { View, Text, Modal, Pressable } from "react-native";
import { CreateEventDTO } from "@calchat/shared";
import { useThemeStore } from "../stores/ThemeStore";
type EventConfirmDialogProps = {
visible: boolean;
proposedEvent: CreateEventDTO | null;
onConfirm: () => void;
onReject: () => void;
onClose: () => void;
};
const EventConfirmDialog = ({
visible: _visible,
proposedEvent: _proposedEvent,
onConfirm: _onConfirm,
onReject: _onReject,
onClose: _onClose,
}: EventConfirmDialogProps) => {
const { theme } = useThemeStore();
// TODO: Display proposed event details (title, time, description)
// TODO: Confirm button calls onConfirm and closes dialog
// TODO: Reject button calls onReject and closes dialog
// TODO: Close button or backdrop tap calls onClose
throw new Error("Not implemented");
return (
<Modal visible={false} transparent animationType="fade">
<View>
<Pressable>
<Text style={{ color: theme.textPrimary }}>
EventConfirmDialog - Not Implemented
</Text>
</Pressable>
</View>
</Modal>
);
};
export default EventConfirmDialog;