implement calendar event display with day indicators and overlay
- Add ExpandedEvent type to shared package for recurring event instances - Implement EventController and EventService with full CRUD operations - Server-side recurring event expansion via recurrenceExpander - Calendar grid shows orange dot indicator for days with events - Tap on day opens modal overlay with EventCards - EventCard component with Feather icons (calendar, clock, repeat, edit, trash) - EventsStore with Zustand for client-side event state management - Load events for visible grid range including adjacent month days - Add textPrimary, borderPrimary, eventIndicator to theme - Update test responses for multiple events on Saturdays
This commit is contained in:
25
CLAUDE.md
25
CLAUDE.md
@@ -167,7 +167,7 @@ src/
|
||||
├── models/
|
||||
│ ├── index.ts
|
||||
│ ├── User.ts # User, CreateUserDTO, LoginDTO, AuthResponse
|
||||
│ ├── CalendarEvent.ts # CalendarEvent, CreateEventDTO, UpdateEventDTO
|
||||
│ ├── CalendarEvent.ts # CalendarEvent, CreateEventDTO, UpdateEventDTO, ExpandedEvent
|
||||
│ ├── ChatMessage.ts # ChatMessage, Conversation, SendMessageDTO, CreateMessageDTO,
|
||||
│ │ # GetMessagesOptions, ChatResponse, ConversationSummary,
|
||||
│ │ # ProposedEventChange, EventAction
|
||||
@@ -181,6 +181,7 @@ src/
|
||||
**Key Types:**
|
||||
- `User`: id, email, displayName, passwordHash?, createdAt?, updatedAt?
|
||||
- `CalendarEvent`: id, userId, title, description?, startTime, endTime, note?, isRecurring?, recurrenceRule?
|
||||
- `ExpandedEvent`: Extends CalendarEvent with occurrenceStart, occurrenceEnd (for recurring event instances)
|
||||
- `ChatMessage`: id, conversationId, sender ('user' | 'assistant'), content, proposedChange?
|
||||
- `ProposedEventChange`: action ('create' | 'update' | 'delete'), eventId?, event?, updates?
|
||||
- `Conversation`: id, userId, createdAt?, updatedAt? (messages loaded separately via lazy loading)
|
||||
@@ -274,6 +275,8 @@ MONGODB_URI=mongodb://root:mongoose@localhost:27017/calchat?authSource=admin
|
||||
- `ChatController`: sendMessage(), confirmEvent(), rejectEvent()
|
||||
- `ChatService`: processMessage() with test responses (create, update, delete actions), confirmEvent() handles all CRUD actions
|
||||
- `MongoEventRepository`: Full CRUD implemented (findById, findByUserId, findByDateRange, create, update, delete)
|
||||
- `EventController`: Full CRUD (create, getById, getAll, getByDateRange, update, delete)
|
||||
- `EventService`: Full CRUD with recurring event expansion via recurrenceExpander
|
||||
- `utils/eventFormatters`: getWeeksOverview(), getMonthOverview() with German localization
|
||||
- `utils/recurrenceExpander`: expandRecurringEvents() using rrule library for RRULE parsing
|
||||
- **Stubbed (TODO):**
|
||||
@@ -283,22 +286,28 @@ MONGODB_URI=mongodb://root:mongoose@localhost:27017/calchat?authSource=admin
|
||||
- `ChatController`: getConversations(), getConversation()
|
||||
- `MongoChatRepository`: Database persistence for chat
|
||||
- **Not started:**
|
||||
- `EventController`, `EventService`
|
||||
- `ClaudeAdapter` (AI integration - currently using test responses)
|
||||
|
||||
**Shared:** Types, DTOs, constants (Day, Month with German translations), and date utilities defined and exported.
|
||||
**Shared:** Types, DTOs, constants (Day, Month with German translations), ExpandedEvent type, and date utilities defined and exported.
|
||||
|
||||
**Frontend:**
|
||||
- Tab navigation (Chat, Calendar) implemented with basic UI
|
||||
- Calendar screen has month navigation and grid display (partially functional)
|
||||
- Calendar screen fully functional:
|
||||
- Month navigation with grid display
|
||||
- Events loaded from API via EventService.getByDateRange()
|
||||
- Orange dot indicator for days with events
|
||||
- Tap-to-open modal overlay showing EventCards for selected day
|
||||
- Supports events from adjacent months visible in grid
|
||||
- Chat screen functional with FlashList, message sending, and event confirm/reject
|
||||
- `ApiClient`: get(), post() implemented
|
||||
- `ApiClient`: get(), post(), put(), delete() implemented
|
||||
- `EventService`: getAll(), getById(), getByDateRange(), create(), update(), delete() - fully implemented
|
||||
- `ChatService`: sendMessage(), confirmEvent(convId, msgId, action, event?, eventId?, updates?), rejectEvent() - supports create/update/delete actions
|
||||
- `EventCard`: Displays event details (title, date, time, duration, recurring indicator) with Feather icons and edit/delete buttons
|
||||
- `ProposedEventCard`: Displays proposed events (title, date, description, recurring indicator) with confirm/reject buttons
|
||||
- `Themes.tsx`: Centralized color definitions including button colors
|
||||
- `Themes.tsx`: Centralized color definitions including textPrimary, borderPrimary, eventIndicator
|
||||
- `EventsStore`: Zustand store with setEvents(), addEvent(), updateEvent(), deleteEvent() - stores ExpandedEvent[]
|
||||
- Auth screens (Login, Register), Event Detail, and Note screens exist as skeletons
|
||||
- Zustand stores (AuthStore, EventsStore) defined with `throw new Error('Not implemented')`
|
||||
- Components (EventCard, EventConfirmDialog) exist as skeletons
|
||||
- AuthStore defined with `throw new Error('Not implemented')`
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user