55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import type { Report } from '@faunosteo/domain'
|
|
import Label from '@/components/ui/Label'
|
|
import Textarea from '@/components/ui/Textarea'
|
|
import NextAppointmentPicker from './NextAppointmentPicker'
|
|
import { useT } from '@/i18n/useT'
|
|
|
|
export interface ConclusionPanelProps {
|
|
conclusion: string
|
|
recommendations: string
|
|
nextAppointment: Report['nextAppointment']
|
|
onChangeConclusion: (s: string) => void
|
|
onChangeRecommendations: (s: string) => void
|
|
onChangeNextAppointment: (n: Report['nextAppointment']) => void
|
|
}
|
|
|
|
export default function ConclusionPanel({
|
|
conclusion,
|
|
recommendations,
|
|
nextAppointment,
|
|
onChangeConclusion,
|
|
onChangeRecommendations,
|
|
onChangeNextAppointment,
|
|
}: ConclusionPanelProps) {
|
|
const t = useT()
|
|
return (
|
|
<section className="space-y-4">
|
|
<h2 className="font-serif text-lg sm:text-xl text-[var(--color-ink)]">
|
|
{t('conclusion.section_title')}
|
|
</h2>
|
|
<div>
|
|
<Label htmlFor="conclusion">{t('conclusion.conclusion')}</Label>
|
|
<Textarea
|
|
id="conclusion"
|
|
value={conclusion}
|
|
onChange={(e) => onChangeConclusion(e.target.value)}
|
|
/>
|
|
</div>
|
|
<div>
|
|
<Label htmlFor="recommendations">
|
|
{t('conclusion.recommendations')}
|
|
</Label>
|
|
<Textarea
|
|
id="recommendations"
|
|
value={recommendations}
|
|
onChange={(e) => onChangeRecommendations(e.target.value)}
|
|
/>
|
|
</div>
|
|
<NextAppointmentPicker
|
|
value={nextAppointment}
|
|
onChange={onChangeNextAppointment}
|
|
/>
|
|
</section>
|
|
)
|
|
}
|