From 3b5c26214c8f7e030d467021a160c84c477d2099 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Tue, 23 Jun 2026 23:12:53 -0500 Subject: [PATCH] feat: buscador de formularios en lab_formularios.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Input de búsqueda filtra tarjetas por nombre o tipo en tiempo real Co-Authored-By: Claude Sonnet 4.6 --- lab_formularios.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lab_formularios.php b/lab_formularios.php index 1f9ac75..a96c004 100644 --- a/lab_formularios.php +++ b/lab_formularios.php @@ -85,6 +85,13 @@ require_once __DIR__ . '/shared/components/sidebar.php';
+
+
+ + +
+
Cargando… @@ -393,6 +400,20 @@ async function cargarFormularios() { renderFormularios(); } +function filtrarFormularios(q) { + q = q.trim().toLowerCase(); + const grid = $('formularios-grid'); + if (!q) { renderFormularios(); return; } + const filtrados = _formularios.filter(f => + (f.nombre || '').toLowerCase().includes(q) || + (f.tipo || '').toLowerCase().includes(q) + ); + const orig = _formularios; + _formularios = filtrados; + renderFormularios(); + _formularios = orig; +} + function renderFormularios() { const grid = $('formularios-grid'); if (!_formularios.length) {