diff --git a/src/components/Breadcrumb.tsx b/src/components/Breadcrumb.tsx new file mode 100644 index 0000000..69a2d9c --- /dev/null +++ b/src/components/Breadcrumb.tsx @@ -0,0 +1,96 @@ +import { ChevronRight } from 'lucide-react' +import type { ViewId } from '../types/pmr' + +interface BreadcrumbProps { + currentView: ViewId + expandedItem?: { + name: string + type: string + } + onNavigateToView?: (view: ViewId) => void + onCollapseItem?: () => void +} + +const viewLabels: Record = { + summary: 'Summary', + consultations: 'Experience', + medications: 'Skills', + problems: 'Achievements', + investigations: 'Projects', + documents: 'Education', + referrals: 'Contact', +} + +export function Breadcrumb({ + currentView, + expandedItem, + onNavigateToView, + onCollapseItem, +}: BreadcrumbProps) { + const handleNavigateToPatientRecord = () => { + if (onNavigateToView) { + onNavigateToView('summary') + } + } + + const handleNavigateToCurrentView = () => { + if (onCollapseItem) { + onCollapseItem() + } + } + + return ( + + ) +} diff --git a/src/components/PMRInterface.tsx b/src/components/PMRInterface.tsx index b7e9845..655e2ef 100644 --- a/src/components/PMRInterface.tsx +++ b/src/components/PMRInterface.tsx @@ -5,6 +5,7 @@ import type { ViewId } from '../types/pmr' import { ClinicalSidebar } from './ClinicalSidebar' import { PatientBanner } from './PatientBanner' import { MobileBottomNav } from './MobileBottomNav' +import { Breadcrumb } from './Breadcrumb' import { SummaryView } from './views/SummaryView' import { ConsultationsView } from './views/ConsultationsView' import { MedicationsView } from './views/MedicationsView' @@ -130,11 +131,11 @@ function PMRContent({ children }: PMRInterfaceProps) { return default: return ( -
-

+
+

{activeView} View

-

+

Content for {activeView} will be implemented in a separate task.

@@ -201,11 +202,26 @@ function PMRContent({ children }: PMRInterfaceProps) {

{viewLabels[activeView]}

+ {/* Breadcrumb (desktop/tablet only) */} + {!isMobile && ( + setExpandedItem(null)} + /> + )} + + {/* Mobile back button (mobile only) */} {isMobile && activeView !== 'summary' && (