diff --git a/susconecta/app/(main-routes)/doutores/page.tsx b/susconecta/app/(main-routes)/doutores/page.tsx
index 588e7f9..a8e0a73 100644
--- a/susconecta/app/(main-routes)/doutores/page.tsx
+++ b/susconecta/app/(main-routes)/doutores/page.tsx
@@ -10,7 +10,7 @@ import { Label } from "@/components/ui/label";
import { MoreHorizontal, Plus, Search, Edit, Trash2, ArrowLeft, Eye } from "lucide-react";
import { Badge } from "@/components/ui/badge";
import { DoctorRegistrationForm } from "@/components/forms/doctor-registration-form";
-
+import ProtectedRoute from "@/components/ProtectedRoute"; // <-- IMPORTADO
import { listarMedicos, excluirMedico, Medico } from "@/lib/api";
@@ -75,164 +75,164 @@ export default function DoutoresPage() {
await load();
}
- if (showForm) {
- return (
-
-
-
-
{editingId ? "Editar Médico" : "Novo Médico"}
-
-
-
setShowForm(false)}
- />
-
- );
- }
-
return (
-
-
-
-
Médicos
-
Gerencie os médicos da sua clínica
-
-
-
-
-
-
setSearch(e.target.value)}
- />
+
// <-- REGRA APLICADA
+ {showForm ? (
+
+
+
+
{editingId ? "Editar Médico" : "Novo Médico"}
-
+
+
setShowForm(false)}
+ />
-
-
-
-
-
-
- Nome
- Especialidade
- CRM
- Contato
- Ações
-
-
-
- {loading ? (
-
-
- Carregando…
-
-
- ) : filtered.length > 0 ? (
- filtered.map((doctor) => (
-
- {doctor.nome}
-
- {doctor.especialidade}
-
- {doctor.crm}
-
-
- {doctor.email}
- {doctor.telefone}
-
-
-
-
-
-
-
-
- handleView(doctor)}>
-
- Ver
-
- handleEdit(String(doctor.id))}>
-
- Editar
-
- handleDelete(String(doctor.id))} className="text-destructive">
-
- Excluir
-
-
-
-
-
- ))
- ) : (
-
-
- Nenhum médico encontrado
-
-
- )}
-
-
-
-
- {viewingDoctor && (
-