diff --git a/frontend/src/pages/Medicos.tsx b/frontend/src/pages/Medicos.tsx index 13b5522..0188bff 100644 --- a/frontend/src/pages/Medicos.tsx +++ b/frontend/src/pages/Medicos.tsx @@ -1,6 +1,6 @@ import type { FC } from 'react'; import { useEffect, useMemo, useState } from 'react'; -import { Mail, Phone, Stethoscope, Briefcase, Save, Percent, Eye, CalendarDays, FileText, ShoppingCart, Users } from 'lucide-react'; +import { Mail, Phone, Stethoscope, Briefcase, Save, Percent, Eye, CalendarDays, FileText, ShoppingCart, Users, ClipboardList, CreditCard, DollarSign } from 'lucide-react'; import Layout from '../components/Layout'; import { Card, Badge, EmptyState, PageHeader, Skeleton, MobileCard, Input, Button, Modal, toast } from '../components/ui'; import { odooApi, type Doctor, type DoctorHistory } from '../services/odoo'; @@ -265,16 +265,32 @@ const Medicos: FC = () => { {selected && (
{/* Header */} -
- - {initials(selected.name)} - -
-

{selected.name}

- - - {selected.job_title || 'Sin puesto'} - +
+
+ + {initials(selected.name)} + +
+

{selected.name}

+ + + {selected.job_title || 'Sin puesto'} + +
+
+
+
+

Pacientes

+

{fmtNum(selected.patient_count ?? 0, 0)}

+
+
+

Citas

+

{histLoading || !hist ? '…' : fmtNum(hist.totales.citas_total, 0)}

+
+
+

Visitas

+

{histLoading || !hist ? '…' : fmtNum(hist.totales.visitas_total, 0)}

+
@@ -295,29 +311,55 @@ const Medicos: FC = () => {
{modalTab === 'info' ? ( -
-
-
-

Teléfono

-

{selected.work_phone || '—'}

+
+
+

Resumen de actividad

+
+
+

Pacientes asignados

+

{fmtNum(selected.patient_count ?? 0, 0)}

+
+
+

Ventas 30d

+

{selected.ventas_30d ?? 0}

+
+
+

Total 30d

+

{fmtMoney(selected.total_30d ?? 0)}

+
+
+

Tarjeta 30d

+

{fmtMoney(selected.card_30d ?? 0)}

+
-
-

Email

-

{selected.work_email || '—'}

-
-
-

% Comisión

-

{selected.commission_pct ?? 0}%

-

Se edita inline en la tabla

-
-
-

Pacientes asignados

-

{selected.patient_count ?? 0}

+
+ + {selected.total_30d_usd == null ? '—' : `≈ ${fmtNum(selected.total_30d_usd)}`} usd +
-
-

Últimos 30 días

- + +
+

Contacto

+
+
+

Teléfono

+

{selected.work_phone || '—'}

+
+
+

Email

+

{selected.work_email || '—'}

+
+
+

Comisión

+

{selected.commission_pct ?? 0}%

+

Se edita inline en la tabla

+
+
) : ( @@ -328,9 +370,24 @@ const Medicos: FC = () => { ) : ( <> -

- {hist.totales.citas_total} citas en total · {hist.totales.visitas_total} visitas · {hist.totales.ventas_total_lineas} líneas recetadas por {fmtMoney(hist.totales.monto_total)} -

+
+
+

Citas totales

+

{fmtNum(hist.totales.citas_total, 0)}

+
+
+

Visitas totales

+

{fmtNum(hist.totales.visitas_total, 0)}

+
+
+

Líneas recetadas

+

{fmtNum(hist.totales.ventas_total_lineas, 0)}

+
+
+

Monto recetado

+

{fmtMoney(hist.totales.monto_total)}

+
+
{([ { key: 'citas', label: 'Citas', icon: },