Actualizar servicios2.html
This commit is contained in:
@@ -548,13 +548,25 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setKpiFilter(cat) {
|
function setKpiFilter(cat) {
|
||||||
if (activeKpiFilter === cat) activeKpiFilter = 'ACTIVE';
|
if (activeKpiFilter === cat) {
|
||||||
else activeKpiFilter = cat;
|
activeKpiFilter = 'ACTIVE';
|
||||||
|
} else {
|
||||||
|
activeKpiFilter = cat;
|
||||||
|
// 🛑 NUEVO: Si pulsas una caja grande, reseteamos las pastillas pequeñas para que no choquen
|
||||||
|
activeStatusFilter = 'ALL';
|
||||||
|
renderStatusPills();
|
||||||
|
}
|
||||||
renderLists();
|
renderLists();
|
||||||
}
|
}
|
||||||
|
|
||||||
function setStatusFilter(id) {
|
function setStatusFilter(id) {
|
||||||
activeStatusFilter = id;
|
activeStatusFilter = id;
|
||||||
|
// 🛑 NUEVO: Si pulsas una pastilla pequeña, reseteamos las cajas grandes para que no choquen
|
||||||
|
if (id !== 'ALL') {
|
||||||
|
activeKpiFilter = 'ALL_OVERRIDE'; // Creamos un estado que ignora las cajas y muestra TODO lo del estado elegido
|
||||||
|
} else {
|
||||||
|
activeKpiFilter = 'ACTIVE'; // Si pulsas "TODOS", volvemos a ocultar los cerrados
|
||||||
|
}
|
||||||
renderStatusPills();
|
renderStatusPills();
|
||||||
renderLists();
|
renderLists();
|
||||||
}
|
}
|
||||||
@@ -673,7 +685,9 @@
|
|||||||
let matchesStatus = (activeStatusFilter === "ALL") ? true : String(stateInfo.id) === activeStatusFilter;
|
let matchesStatus = (activeStatusFilter === "ALL") ? true : String(stateInfo.id) === activeStatusFilter;
|
||||||
|
|
||||||
let matchesKpi = false;
|
let matchesKpi = false;
|
||||||
if (activeKpiFilter === 'ACTIVE') {
|
if (activeKpiFilter === 'ALL_OVERRIDE') {
|
||||||
|
matchesKpi = true; // 🛑 NUEVO: Si has tocado una pastilla, las cajas grandes ya no filtran
|
||||||
|
} else if (activeKpiFilter === 'ACTIVE') {
|
||||||
matchesKpi = category !== 'finished';
|
matchesKpi = category !== 'finished';
|
||||||
} else {
|
} else {
|
||||||
matchesKpi = category === activeKpiFilter;
|
matchesKpi = category === activeKpiFilter;
|
||||||
|
|||||||
Reference in New Issue
Block a user