From d9f361defbdfa6fd7fff0c3d07102bf186facb53 Mon Sep 17 00:00:00 2001 From: GagoDuBroca Date: Sun, 23 Nov 2025 22:15:50 -0300 Subject: [PATCH] =?UTF-8?q?Remo=C3=A7=C3=A3o=20But=C3=A3o=20Aniversario,?= =?UTF-8?q?=20Ajuste=20no=20ver=20detalhes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/secretary/pacientes/page.tsx | 7 +- components/ui/patient-details-modal.tsx | 139 ++++++++++++++++-------- 2 files changed, 97 insertions(+), 49 deletions(-) diff --git a/app/secretary/pacientes/page.tsx b/app/secretary/pacientes/page.tsx index 9990980..1871d10 100644 --- a/app/secretary/pacientes/page.tsx +++ b/app/secretary/pacientes/page.tsx @@ -209,11 +209,8 @@ export default function PacientesPage() { - {/* Aniversariantes - Ocupa 100% no mobile, e se alinha à direita no md+ */} - + + {/* --- SEÇÃO DE TABELA (VISÍVEL EM TELAS MAIORES OU IGUAIS A MD) --- */} diff --git a/components/ui/patient-details-modal.tsx b/components/ui/patient-details-modal.tsx index fea1040..8a37050 100644 --- a/components/ui/patient-details-modal.tsx +++ b/components/ui/patient-details-modal.tsx @@ -1,96 +1,147 @@ -'use client' +"use client"; import { - Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogClose + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, } from "@/components/ui/dialog"; +import { Button } from "@/components/ui/button"; + +interface Paciente { + id: string; + nome: string; + telefone: string; + cidade: string; + estado: string; + email?: string; + birth_date?: string; + cpf?: string; + blood_type?: string; + weight_kg?: number; + height_m?: number; + street?: string; + number?: string; + complement?: string; + neighborhood?: string; + cep?: string; + [key: string]: any; // Para permitir outras propriedades se necessário +} interface PatientDetailsModalProps { + patient: Paciente | null; isOpen: boolean; - patient: any; onClose: () => void; } -export function PatientDetailsModal({ patient, isOpen, onClose }: PatientDetailsModalProps) { +export function PatientDetailsModal({ + patient, + isOpen, + onClose, +}: PatientDetailsModalProps) { if (!patient) return null; return ( - + - Detalhes do Paciente - Informações detalhadas sobre o paciente. + Detalhes do Paciente + + Informações detalhadas sobre o paciente. + -
-
+ +
+ {/* Grid Principal */} +
-

Nome Completo

-

{patient.nome}

+

Nome Completo

+

{patient.nome}

+ + {/* CORREÇÃO AQUI: Adicionado 'break-all' para quebrar o email */}
-

Email

-

{patient.email}

+

Email

+

{patient.email || "N/A"}

+
-

Telefone

-

{patient.telefone}

+

Telefone

+

{patient.telefone}

+
-

Data de Nascimento

-

{patient.birth_date}

+

Data de Nascimento

+

{patient.birth_date || "N/A"}

+
-

CPF

-

{patient.cpf}

+

CPF

+

{patient.cpf || "N/A"}

+
-

Tipo Sanguíneo

-

{patient.blood_type}

+

Tipo Sanguíneo

+

{patient.blood_type || "N/A"}

+
-

Peso (kg)

-

{patient.weight_kg}

+

Peso (kg)

+

{patient.weight_kg || "0"}

+
-

Altura (m)

-

{patient.height_m}

+

Altura (m)

+

{patient.height_m || "0"}

-
-

Endereço

-
+ +
+ + {/* Seção de Endereço */} +
+

Endereço

+
-

Rua

-

{`${patient.street}, ${patient.number}`}

+

Rua

+

+ {patient.street && patient.street !== "N/A" + ? `${patient.street}, ${patient.number || ""}` + : "N/A"} +

-

Complemento

-

{patient.complement}

+

Complemento

+

{patient.complement || "N/A"}

-

Bairro

-

{patient.neighborhood}

+

Bairro

+

{patient.neighborhood || "N/A"}

-

Cidade

-

{patient.cidade}

+

Cidade

+

{patient.cidade || "N/A"}

-

Estado

-

{patient.estado}

+

Estado

+

{patient.estado || "N/A"}

-

CEP

-

{patient.cep}

+

CEP

+

{patient.cep || "N/A"}

+ - - - +
); -} +} \ No newline at end of file