fix: restore PatientLayoutClient for split-view compatibility

Adapted cleanup to work with split-view rapportage refactor.

Split-view refactor replaced modal flow with dual-pane workspace:
- Composer is now on the rapportage page itself (no modal)
- "Nieuwe rapportage" button scrolls to #rapportage-composer
- Timeline and composer visible simultaneously

Changes:
- Recreated PatientLayoutClient WITHOUT RapportageModal
- Kept ClientHeader with focusElementId prop for scroll navigation
- Kept layout.tsx using PatientLayoutClient wrapper
- ClientSidebar removal still valid (EPDSidebar handles navigation)

Result: Clean codebase compatible with split-view design

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
colinislit
2025-11-23 20:43:32 +01:00
parent b30f8edf19
commit 9e4dff615f

View File

@@ -1,10 +1,9 @@
'use client';
import { useMemo, useState } from 'react';
import { useMemo } from 'react';
import type { ReactNode } from 'react';
import type { FHIRPatient } from '@/lib/fhir';
import { ClientHeader } from './client-header';
import { RapportageModal } from '../rapportage/components/rapportage-modal';
interface PatientLayoutClientProps {
patient: FHIRPatient;
@@ -13,8 +12,6 @@ interface PatientLayoutClientProps {
}
export function PatientLayoutClient({ patient, patientId, children }: PatientLayoutClientProps) {
const [isModalOpen, setModalOpen] = useState(false);
const patientName = useMemo(() => {
const name = patient.name?.[0];
if (!name) return 'deze patiënt';
@@ -29,14 +26,8 @@ export function PatientLayoutClient({ patient, patientId, children }: PatientLay
return (
<div className="flex h-full flex-1 flex-col bg-white">
<ClientHeader patient={patient} onNewReport={() => setModalOpen(true)} />
<ClientHeader patient={patient} focusElementId="rapportage-composer" />
<div className="flex-1 overflow-auto bg-slate-50">{children}</div>
<RapportageModal
isOpen={isModalOpen}
onClose={() => setModalOpen(false)}
patientId={patientId}
patientName={patientName}
/>
</div>
);
}