From 91c84b6a46778f34db1e31bb261b830394da045d Mon Sep 17 00:00:00 2001 From: M-Gabrielly Date: Thu, 4 Sep 2025 15:46:55 -0300 Subject: [PATCH 1/2] fix: secure setting of onOpenChange on the patient form --- .../components/forms/patient-registration-form.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/susconecta/components/forms/patient-registration-form.tsx b/susconecta/components/forms/patient-registration-form.tsx index ceff417..95ac4c6 100644 --- a/susconecta/components/forms/patient-registration-form.tsx +++ b/susconecta/components/forms/patient-registration-form.tsx @@ -395,8 +395,8 @@ export function PatientRegistrationForm({ if (inline && onClose) { onClose() - } else if (onOpenChange) { - onOpenChange(false) + } else { + onOpenChange?.(false) } // Show success message (you might want to use a toast notification) @@ -412,8 +412,8 @@ export function PatientRegistrationForm({ const handleCancel = () => { if (inline && onClose) { onClose() - } else if (onOpenChange) { - onOpenChange(false) + } else { + onOpenChange?.(false) } } @@ -464,10 +464,10 @@ export function PatientRegistrationForm({
From 3cce8a9774ff469e9a525f42607dcfa5b09c84b8 Mon Sep 17 00:00:00 2001 From: M-Gabrielly Date: Thu, 4 Sep 2025 16:42:54 -0300 Subject: [PATCH 2/2] fix: fix ref error in actions menu --- susconecta/app/dashboard/pacientes/page.tsx | 4 ++-- susconecta/components/forms/patient-registration-form.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/susconecta/app/dashboard/pacientes/page.tsx b/susconecta/app/dashboard/pacientes/page.tsx index b2ea805..bbb5d20 100644 --- a/susconecta/app/dashboard/pacientes/page.tsx +++ b/susconecta/app/dashboard/pacientes/page.tsx @@ -382,10 +382,10 @@ export default function PacientesPage() { - + handleViewDetails(patient.id)}> diff --git a/susconecta/components/forms/patient-registration-form.tsx b/susconecta/components/forms/patient-registration-form.tsx index 95ac4c6..9337a01 100644 --- a/susconecta/components/forms/patient-registration-form.tsx +++ b/susconecta/components/forms/patient-registration-form.tsx @@ -1028,7 +1028,7 @@ export function PatientRegistrationForm({ } return ( - + { })}> @@ -1630,7 +1630,7 @@ export function PatientRegistrationForm({ {/* Botões de Ação */}
-