2026-06-20 14:51:43 +03:30
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
import { useTranslations } from 'next-intl';
|
2026-06-28 14:49:37 +03:30
|
|
|
import { formatMobileForDisplay } from '@/lib/phone';
|
2026-04-29 13:32:22 +03:30
|
|
|
import { Patient } from '@/types/patient';
|
|
|
|
|
|
|
|
|
|
interface PatientSummaryCardProps {
|
|
|
|
|
patient?: Patient;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function PatientSummaryCard({ patient }: PatientSummaryCardProps) {
|
2026-06-20 14:51:43 +03:30
|
|
|
const t = useTranslations('patients');
|
|
|
|
|
|
2026-04-29 13:32:22 +03:30
|
|
|
if (!patient) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="surface-card p-4">
|
2026-06-20 14:51:43 +03:30
|
|
|
<p className="text-sm text-text-muted">{t('selectPatient')}</p>
|
2026-04-29 13:32:22 +03:30
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="surface-card p-4 space-y-2">
|
|
|
|
|
<h2 className="text-lg font-semibold text-text-primary">
|
|
|
|
|
{patient.firstName} {patient.lastName}
|
|
|
|
|
</h2>
|
|
|
|
|
<p className="text-sm text-text-secondary">
|
2026-06-28 14:49:37 +03:30
|
|
|
{t('mobileLabel')} {formatMobileForDisplay(patient.mobile)}
|
2026-06-20 14:51:43 +03:30
|
|
|
</p>
|
|
|
|
|
<p className="text-sm text-text-secondary">
|
|
|
|
|
{t('emailLabel')} {patient.email || t('emptyValue')}
|
|
|
|
|
</p>
|
|
|
|
|
<p className="text-sm text-text-secondary">
|
|
|
|
|
{t('statusLabel')}{' '}
|
|
|
|
|
{patient.isActive ? t('statusActive') : t('statusInactive')}
|
2026-04-29 13:32:22 +03:30
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|