diff --git a/app/epd/layout.tsx b/app/epd/layout.tsx index da6ae68..db46eb3 100644 --- a/app/epd/layout.tsx +++ b/app/epd/layout.tsx @@ -20,7 +20,7 @@ export default async function EPDLayout({ children }: EPDLayoutProps) { return (
- {/* Sidebar - Fixed 240px width on desktop */} + {/* Sidebar - Context-aware (switches between Level 1 and Level 2) */} -
- {children} -
+ {children}
diff --git a/app/epd/patients/[id]/components/client-sidebar.tsx b/app/epd/patients/[id]/components/client-sidebar.tsx deleted file mode 100644 index c8609a4..0000000 --- a/app/epd/patients/[id]/components/client-sidebar.tsx +++ /dev/null @@ -1,116 +0,0 @@ -'use client'; - -/** - * Client Sidebar Navigation Component - * E2.S3: Context-aware sidebar with tabs for client dossier - */ - -import Link from 'next/link'; -import { usePathname } from 'next/navigation'; -import { - ChevronLeft, - LayoutDashboard, - User, - ClipboardList, - FileText, - Stethoscope, - Calendar, - FileBarChart, -} from 'lucide-react'; - -interface ClientSidebarProps { - patientId: string; -} - -interface NavItem { - label: string; - href: string; - icon: React.ComponentType<{ className?: string }>; -} - -export function ClientSidebar({ patientId }: ClientSidebarProps) { - const pathname = usePathname(); - - // Navigation items - const navItems: NavItem[] = [ - { - label: 'Dashboard', - href: `/epd/patients/${patientId}`, - icon: LayoutDashboard, - }, - { - label: 'Basisgegevens', - href: `/epd/patients/${patientId}/basisgegevens`, - icon: User, - }, - { - label: 'Screening', - href: `/epd/patients/${patientId}/screening`, - icon: ClipboardList, - }, - { - label: 'Intake', - href: `/epd/patients/${patientId}/intakes`, - icon: FileText, - }, - { - label: 'Diagnose', - href: `/epd/patients/${patientId}/diagnose`, - icon: Stethoscope, - }, - { - label: 'Behandelplan', - href: `/epd/patients/${patientId}/behandelplan`, - icon: Calendar, - }, - { - label: 'Rapportage', - href: `/epd/patients/${patientId}/rapportage`, - icon: FileBarChart, - }, - ]; - - return ( - - ); -} diff --git a/docs/release/ops-log.md b/docs/release/ops-log.md index e00edec..21b44e2 100644 --- a/docs/release/ops-log.md +++ b/docs/release/ops-log.md @@ -10,3 +10,18 @@ - Intake-tabs (contact, kindcheck, risico, anamnese, onderzoeken/ROM, diagnose, behandeladvies) compleet met Supabase CRUD - Status dropdowns gecorrigeerd (bezig/afgerond) en dokument flows afgerond - Supabase migratiestappen wachten nog op einde maintenance (fase 0 runbook ligt klaar) + +## 2025-11-23 — Universele Rapportage backend + modal (Colin) +- API: `/api/reports` (GET/POST) + `/api/reports/[reportId]` (GET/PATCH/DELETE) + `/api/reports/classify` staan, met Zod-validatie en soft delete +- Supabase: `reports` tabel + migratie + RLS policies uitgerold, types toegevoegd in `lib/supabase/database.types.ts` +- Server actions: `app/epd/patients/[id]/rapportage/actions.ts` + gedeelde `lib/server/api-client.ts` houden fetch logic DRY +- UI: shadcn-dialog gebaseerd Rapportage Modal met textarea, speech recorder, AI-analyse en save flow (E2.S1) + +## 2025-11-23 — ClientSidebar duplicate cleanup (Colin) +- **Bug fix**: Dubbele sidebar (EPDSidebar + ClientSidebar) in patient detail routes verwijderd +- ClientSidebar (`app/epd/patients/[id]/components/client-sidebar.tsx`) blijkt 100% duplicate van EPDSidebar Level 2 navigatie +- EPDSidebar is al context-aware: detecteert patient routes en switcht automatisch tussen Level 1 (behandelaar) en Level 2 (patient) navigatie +- Verwijderd: ClientSidebar component (117 regels) + EPDLayoutClient wrapper (conditionele sidebar hiding) +- Vereenvoudigd: patient detail layout gebruikt nu alleen PatientLayoutClient zonder eigen sidebar rendering +- Resultaat: Eén sidebar component die automatisch switcht, -117 regels duplicate code, DRY principle hersteld +