From 7faf4410b008aabb31e10619fa2118692a31b28a Mon Sep 17 00:00:00 2001 From: Silva Date: Fri, 7 Mar 2025 13:05:49 -0600 Subject: [PATCH] Edit de Alertas Alertas de Editar, eliminar y Crear de Docentes --- app/Http/Controllers/DocentesController.php | 2 +- resources/views/docentes.blade.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/DocentesController.php b/app/Http/Controllers/DocentesController.php index 97c82ea..2f4ad9e 100644 --- a/app/Http/Controllers/DocentesController.php +++ b/app/Http/Controllers/DocentesController.php @@ -49,7 +49,7 @@ class DocentesController extends Controller { $docentes = Docentes::all(); $docente = Docentes::find($id); - return view('docentesCrearEditar', ['docentes' => $docentes, 'docente' => $docente]); + return view('docentesCrearEditar', ['docentes' => $docentes, 'docente' => $docente]) ; } /** diff --git a/resources/views/docentes.blade.php b/resources/views/docentes.blade.php index 34f10b1..092f75f 100644 --- a/resources/views/docentes.blade.php +++ b/resources/views/docentes.blade.php @@ -120,6 +120,7 @@ function confirmarEdicion(url) { window.location.href = url; } }); + } function confirmarEliminacion(button) { Swal.fire({ @@ -138,6 +139,17 @@ function confirmarEliminacion(button) { } }); } +// Desaparecer el mensaje después de 3 segundos +setTimeout(function() { + var message = document.getElementById('success-message'); + if (message) { + message.style.transition = 'opacity 0.5s ease'; + message.style.opacity = '0'; + setTimeout(function() { + message.remove(); + }, 500); // Tiempo para remover el elemento después de la transición + } +}, 3000); // Tiempo en milisegundos antes de comenzar a desap @endsection