diff --git a/src/components/DetailPanel.tsx b/src/components/DetailPanel.tsx index 18e5700..ad0a211 100644 --- a/src/components/DetailPanel.tsx +++ b/src/components/DetailPanel.tsx @@ -5,6 +5,7 @@ import { useFocusTrap } from '@/hooks/useFocusTrap' import { DetailPanelContent } from '@/types/pmr' import type { CardHeaderProps } from './Card' import { KPIDetail } from './detail/KPIDetail' +import { ConsultationDetail } from './detail/ConsultationDetail' // Width mapping from content type const widthMap: Record = { @@ -210,24 +211,29 @@ export function DetailPanel() { > {/* Render content based on type */} {content.type === 'kpi' && } + {(content.type === 'consultation' || content.type === 'career-role') && ( + + )} {/* Other content types - placeholder for future stories */} - {content.type !== 'kpi' && ( -
-

- Detail panel for: {content.type} -

-

- Content renderers will be implemented in subsequent user stories. -

-
- )} + {content.type !== 'kpi' && + content.type !== 'consultation' && + content.type !== 'career-role' && ( +
+

+ Detail panel for: {content.type} +

+

+ Content renderers will be implemented in subsequent user stories. +

+
+ )} diff --git a/src/components/detail/ConsultationDetail.tsx b/src/components/detail/ConsultationDetail.tsx new file mode 100644 index 0000000..013e07c --- /dev/null +++ b/src/components/detail/ConsultationDetail.tsx @@ -0,0 +1,236 @@ +import type { Consultation } from '@/types/pmr' + +interface ConsultationDetailProps { + consultation: Consultation +} + +export function ConsultationDetail({ consultation }: ConsultationDetailProps) { + return ( +
+ {/* Role header */} +
+
+ {consultation.role} +
+
+ {consultation.organization} +
+
+ {consultation.duration} + {consultation.isCurrent && ( + + Current + + )} +
+
+ + {/* History (presenting complaint) */} +
+

+ History +

+

+ {consultation.history} +

+
+ + {/* Examination (achievements) */} + {consultation.examination && consultation.examination.length > 0 && ( +
+

+ Key Achievements +

+
    + {consultation.examination.map((item, index) => ( +
  • + {item} +
  • + ))} +
+
+ )} + + {/* Plan (outcomes) */} + {consultation.plan && consultation.plan.length > 0 && ( +
+

+ Outcomes & Impact +

+
    + {consultation.plan.map((item, index) => ( +
  • + {item} +
  • + ))} +
+
+ )} + + {/* Coded entries (technical environment / tags) */} + {consultation.codedEntries && consultation.codedEntries.length > 0 && ( +
+

+ Coded Entries +

+
+ {consultation.codedEntries.map((entry, index) => ( +
+ + {entry.code} + + + {entry.description} + +
+ ))} +
+
+ )} +
+ ) +}