feat(representation): expose doctor representation details and add counts in admin views
This commit is contained in:
@@ -57,6 +57,7 @@ interface DoctorDetail {
|
||||
state: { id: string; name: string }[];
|
||||
city: { id: string; name: string }[];
|
||||
clinics: { id: string; uuid: string; name: string; address: string | null; telephone: string | null }[];
|
||||
representation: { id: number; uuid: string; full_name: string | null } | null;
|
||||
}
|
||||
|
||||
interface SpecialtyOpt { id: number; uuid: string; name: string; parent_id: number | null; }
|
||||
@@ -2699,6 +2700,13 @@ export default function DoctorDetailPage({ isOwnProfile = false }: { isOwnProfil
|
||||
<InfoCard icon={AcademicCapIcon} label="کد نظام پزشکی" value={doctor.medical_system_code} mono copyable />
|
||||
<InfoCard icon={CalendarIcon} label="سابقه (سال)" value={doctor.experience > 0 ? String(doctor.experience) : null} />
|
||||
<InfoCard icon={StarIcon} label="امتیاز" value={<div dir="ltr"><StarRating rate={rateNum} /></div>} />
|
||||
<InfoCard
|
||||
icon={UserIcon}
|
||||
label="نماینده"
|
||||
value={doctor.representation
|
||||
? <button type="button" style={{ color: '#2563eb', textDecoration: 'underline', background: 'none', border: 0, padding: 0, cursor: 'pointer', font: 'inherit' }} onClick={() => navigate(`/admin/representations/${doctor.representation!.uuid}`)}>{doctor.representation.full_name ?? 'نماینده'}</button>
|
||||
: <span className="text-slate-400">بدون نماینده</span>}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user