From de1f7b2370ce465acb1ba31e2148ae4c2d08ede5 Mon Sep 17 00:00:00 2001 From: SirRobert-1 <rviverosgonzalez@gmail.com> Date: Sun, 9 Mar 2025 21:23:57 -0600 Subject: [PATCH] Add category filtering for seat selection in Informacion component --- ventaboletos/src/components/vistas/Informacion.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ventaboletos/src/components/vistas/Informacion.jsx b/ventaboletos/src/components/vistas/Informacion.jsx index f281efc..d7cc4f1 100644 --- a/ventaboletos/src/components/vistas/Informacion.jsx +++ b/ventaboletos/src/components/vistas/Informacion.jsx @@ -70,6 +70,14 @@ function Informacion() { setOpen(true); }; + const handleCategoriaChange = (categoria) => { + setSelectedCategoria(categoria); + }; + + const filteredAsientos = numeroAsiento + .filter((asiento) => asiento.categoria === selectedCategoria) + .sort((a, b) => a.numero_asiento - b.numero_asiento); + const handleAgregarAlCarrito = () => { if (!selectedConcierto || !asientoSeleccionado) { alert("Selecciona un tipo de asiento antes de continuar.");