Actualizar servicios.html

This commit is contained in:
2026-03-18 22:18:11 +00:00
parent 49e9be5421
commit 08ac9fe3e3

View File

@@ -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;