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