Files
triqura-ecd/app/epd/patients/[id]/components/patient-layout-client.tsx
colinislit 9e4dff615f 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>
2025-11-23 20:43:32 +01:00

34 lines
898 B
TypeScript

'use client';
import { useMemo } from 'react';
import type { ReactNode } from 'react';
import type { FHIRPatient } from '@/lib/fhir';
import { ClientHeader } from './client-header';
interface PatientLayoutClientProps {
patient: FHIRPatient;
patientId: string;
children: ReactNode;
}
export function PatientLayoutClient({ patient, patientId, children }: PatientLayoutClientProps) {
const patientName = useMemo(() => {
const name = patient.name?.[0];
if (!name) return 'deze patiënt';
return [
...(name.prefix || []),
...(name.given || []),
name.family,
]
.filter(Boolean)
.join(' ');
}, [patient]);
return (
<div className="flex h-full flex-1 flex-col bg-white">
<ClientHeader patient={patient} focusElementId="rapportage-composer" />
<div className="flex-1 overflow-auto bg-slate-50">{children}</div>
</div>
);
}