Implement complete event creation functionality with CalDAV backend

- Add CalDAV create_event method with proper iCalendar generation
- Add comprehensive backend API for event creation with validation
- Add event creation models and handlers with date/time parsing
- Add frontend service method for creating events via API
- Update frontend to call backend API instead of placeholder
- Fix CalDAV URL construction to avoid duplicate /dav.php paths
- Support all event fields: title, description, dates, location, all-day

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Connor Johnstone
2025-08-28 22:29:06 -04:00
parent 5c966b2571
commit 3440403bed
6 changed files with 452 additions and 5 deletions

View File

@@ -70,6 +70,26 @@ pub struct DeleteEventResponse {
pub message: String,
}
#[derive(Debug, Deserialize)]
pub struct CreateEventRequest {
pub title: String,
pub description: String,
pub start_date: String, // YYYY-MM-DD format
pub start_time: String, // HH:MM format
pub end_date: String, // YYYY-MM-DD format
pub end_time: String, // HH:MM format
pub location: String,
pub all_day: bool,
pub calendar_path: Option<String>, // Optional - use first calendar if not specified
}
#[derive(Debug, Serialize)]
pub struct CreateEventResponse {
pub success: bool,
pub message: String,
pub event_href: Option<String>, // The created event's href/filename
}
// Error handling
#[derive(Debug)]
pub enum ApiError {