- E1.S1: FullCalendar setup with React wrapper - E1.S2: Day view (timeGridDay) with hourly slots - E1.S3: Week view (timeGridWeek) with 7-day grid - E1.S4: Workweek view (timeGridWorkWeek, Mon-Fri) Features: - View switcher toolbar (Dag/Week/Werkweek) - Date navigation (prev/next/today) - Dutch localization (nl) - Business hours highlighting (08:00-18:00) - Color-coded appointments by type - Drag-and-drop rescheduling support - Server actions for encounter CRUD 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
31 lines
762 B
TypeScript
31 lines
762 B
TypeScript
/**
|
|
* Behandelaar Agenda - Level 1
|
|
*
|
|
* Kalender view met alle afspraken van de behandelaar.
|
|
* Supports day, week, and workweek views.
|
|
*/
|
|
|
|
import { startOfWeek, endOfWeek } from 'date-fns';
|
|
import { AgendaView } from './components/agenda-view';
|
|
import { getEncounters } from './actions';
|
|
|
|
export default async function AgendaPage() {
|
|
// Get initial date range (current week)
|
|
const now = new Date();
|
|
const start = startOfWeek(now, { weekStartsOn: 1 });
|
|
const end = endOfWeek(now, { weekStartsOn: 1 });
|
|
|
|
// Fetch initial events
|
|
const initialEvents = await getEncounters({
|
|
startDate: start.toISOString(),
|
|
endDate: end.toISOString(),
|
|
});
|
|
|
|
return (
|
|
<AgendaView
|
|
initialEvents={initialEvents}
|
|
initialDate={now}
|
|
/>
|
|
);
|
|
}
|