Add category filtering for seat selection in Informacion component
This commit is contained in:
parent
c7dc7eb330
commit
de1f7b2370
ventaboletos/src/components/vistas
|
@ -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.");
|
||||
|
|
Loading…
Reference in New Issue