Seção de Relatórios
Acesse a seção de relatórios médicos para gerenciar, visualizar e exportar documentos.
diff --git a/susconecta/app/(main-routes)/dashboard/relatorios/page.tsx b/susconecta/app/(main-routes)/dashboard/relatorios/page.tsx
index e406b1b..c70081a 100644
--- a/susconecta/app/(main-routes)/dashboard/relatorios/page.tsx
+++ b/susconecta/app/(main-routes)/dashboard/relatorios/page.tsx
@@ -303,8 +303,8 @@ export default function RelatoriosPage() {
{ label: "Atendimentos", value: appointmentsToday ?? 0, icon: },
{ label: "Absenteísmo", value: '—', icon: },
{ label: "Satisfação", value: 'Dados não foram disponibilizados', icon: },
- { label: "Faturamento (Mês)", value: `R$ ${faturamentoArr[faturamentoArr.length - 1]?.valor ?? 0}`, icon: },
- { label: "No-show", value: `${taxaArr[taxaArr.length - 1]?.noShow ?? 0}%`, icon: },
+ { label: "Faturamento (Mês)", value: `R$ ${faturamentoArr.at(-1)?.valor ?? 0}`, icon: },
+ { label: "No-show", value: `${taxaArr.at(-1)?.noShow ?? 0}%`, icon: },
] as any);
} catch (err: any) {
diff --git a/susconecta/app/(main-routes)/doutores/page.tsx b/susconecta/app/(main-routes)/doutores/page.tsx
index a9bdfac..5761f68 100644
--- a/susconecta/app/(main-routes)/doutores/page.tsx
+++ b/susconecta/app/(main-routes)/doutores/page.tsx
@@ -20,7 +20,7 @@ import { listAssignmentsForUser } from '@/lib/assignment';
function normalizeMedico(m: any): Medico {
const normalizeSex = (v: any) => {
- if (v === null || typeof v === 'undefined') return null;
+ if (v === undefined) return null;
const s = String(v || '').trim().toLowerCase();
if (!s) return null;
const male = new Set(['m','masc','male','masculino','homem','h','1','mas']);
diff --git a/susconecta/app/paciente/page.tsx b/susconecta/app/paciente/page.tsx
index da64595..697c02f 100644
--- a/susconecta/app/paciente/page.tsx
+++ b/susconecta/app/paciente/page.tsx
@@ -172,7 +172,6 @@ export default function PacientePage() {
loadProfile()
return () => { mounted = false }
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [user?.id, user?.email])
// Load authoritative patient row for the logged-in user (prefer user_id lookup)
@@ -414,7 +413,7 @@ export default function PacientePage() {
}
load()
return () => { mounted = false }
- }, [patientId])
+ }, [])
return (
@@ -622,7 +621,7 @@ export default function PacientePage() {
loadAppointments()
return () => { mounted = false }
- }, [patientId])
+ }, [])
// Monta a URL de resultados com os filtros atuais
const buildResultadosHref = () => {
@@ -642,14 +641,14 @@ export default function PacientePage() {
return (
{/* Hero Section */}
-
+
-
+