diff --git a/servicios.html b/servicios.html index fba02d4..7e71e3f 100644 --- a/servicios.html +++ b/servicios.html @@ -625,7 +625,19 @@ const name = (raw["Nombre Cliente"] || raw["CLIENTE"] || "").toLowerCase(); const ref = (s.service_ref || "").toLowerCase(); - const matchesSearch = searchTerm === "" || name.includes(searchTerm) || ref.includes(searchTerm); + const addr = (raw["Dirección"] || raw["DOMICILIO"] || "").toLowerCase(); + const pop = (raw["Población"] || raw["POBLACION-PROVINCIA"] || "").toLowerCase(); + const phone = (raw["Teléfono"] || raw["TELEFONO"] || raw["TELEFONOS"] || "").toLowerCase(); + const comp = (raw["Compañía"] || raw["COMPAÑIA"] || raw["Procedencia"] || "").toLowerCase(); + + // Ahora sí busca en absolutamente todos los campos + const matchesSearch = searchTerm === "" || + name.includes(searchTerm) || + ref.includes(searchTerm) || + addr.includes(searchTerm) || + pop.includes(searchTerm) || + phone.includes(searchTerm) || + comp.includes(searchTerm); const matchesOp = selectedOp === "ALL" || s.assigned_name === selectedOp; let matchesWeek = true;