feat(representation): expose doctor representation details and add counts in admin views
This commit is contained in:
@@ -30,6 +30,9 @@ interface AdminDoctor {
|
||||
owner_status?: string;
|
||||
source?: string;
|
||||
rate: number;
|
||||
representation_id?: number | null;
|
||||
representation_uuid?: string | null;
|
||||
representation_name?: string | null;
|
||||
specialties: { id: number; name: string }[];
|
||||
profile_image: string | null;
|
||||
created_at: string;
|
||||
@@ -294,6 +297,7 @@ export default function DoctorsPage() {
|
||||
<th>درجه</th>
|
||||
<th>امتیاز</th>
|
||||
<th>موبایل</th>
|
||||
{!isRepresentation && <th>نماینده</th>}
|
||||
<th>وضعیت</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@@ -348,6 +352,21 @@ export default function DoctorsPage() {
|
||||
<td style={{ fontFamily: 'monospace', direction: 'ltr', textAlign: 'right' }} className="muted">
|
||||
{doc.mobile ?? '—'}
|
||||
</td>
|
||||
{!isRepresentation && (
|
||||
<td>
|
||||
{doc.representation_id ? (
|
||||
<span
|
||||
className="badge blue"
|
||||
style={{ cursor: doc.representation_uuid ? 'pointer' : 'default', fontSize: 11 }}
|
||||
onClick={(e) => { e.stopPropagation(); if (doc.representation_uuid) navigate(`/admin/representations/${doc.representation_uuid}`); }}
|
||||
>
|
||||
{doc.representation_name ?? 'نماینده'}
|
||||
</span>
|
||||
) : (
|
||||
<span className="muted" style={{ fontSize: 11 }}>بدون نماینده</span>
|
||||
)}
|
||||
</td>
|
||||
)}
|
||||
<td>
|
||||
{doc.owner_status === 'unclaimed' && <span className="badge amber" style={{ marginLeft: 6 }}>بدونمالک</span>}
|
||||
{doc.owner_status === 'pending_transfer' && <span className="badge violet" style={{ marginLeft: 6 }}>در انتظار انتقال</span>}
|
||||
|
||||
Reference in New Issue
Block a user