now dont count 'no aplica'

This commit is contained in:
2025-11-25 12:47:54 -06:00
parent c4383a4d6b
commit f89f096001
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -73,8 +73,11 @@ export default function Pregunta7EP() {
const startItem = (currentPage - 1) * recordsPerPage + 1;
const endItem = Math.min(startItem + recordsPerPage - 1, sortedData.length);
const totalLaboratorios = data.reduce((sum, item) => sum + Number(item.cantidad), 0);
const totalLaboratorios = data.reduce(
(sum, item) => sum + (item.nombre != "NO_APLICA" ? Number(item.cantidad):0),
0
);
return (
<div className="container">
<div className="pregunta-cuadro">Numero de laboratorios.</div>
+1 -1
View File
@@ -74,7 +74,7 @@ export default function Pregunta8() {
const startItem = (currentPage - 1) * recordsPerPage + 1;
const endItem = Math.min(startItem + recordsPerPage - 1, sortedData.length);
const totalLaboratorios = data.reduce(
(sum, item) => sum + Number(item.cantidad),
(sum, item) => sum + (item.nombre != "NO_APLICA" ? Number(item.cantidad):0),
0
);