Skip to content

Commit bf82b69

Browse files
committed
Remove redundant statistics update calls in footer
Eliminated unnecessary calls to updateCqStatistics and updateWasStatistics on page load and after table filtering/sorting. Statistics are now handled by server-side calculations and page reloads, simplifying the client-side logic.
1 parent d07e788 commit bf82b69

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

application/views/interface_assets/footer.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3056,9 +3056,8 @@ function updateCqStatistics() {
30563056

30573057
// Call on page load to initialize with filtered data
30583058
document.addEventListener('DOMContentLoaded', function() {
3059-
setTimeout(function() {
3060-
updateCqStatistics();
3061-
}, 500);
3059+
// Page has been loaded with server-calculated values
3060+
// No need to recalculate - the form filters handle updates via page reload
30623061
});
30633062

30643063
// Table search functionality
@@ -3078,8 +3077,6 @@ function updateCqStatistics() {
30783077
row.style.display = 'none';
30793078
}
30803079
});
3081-
3082-
updateCqStatistics();
30833080
});
30843081
}
30853082

@@ -3117,7 +3114,6 @@ function updateCqStatistics() {
31173114
}
31183115

31193116
rows.forEach(row => tbody.appendChild(row));
3120-
updateCqStatistics();
31213117
});
31223118
});
31233119

@@ -3309,9 +3305,8 @@ function updateWasStatistics() {
33093305

33103306
// Call on page load to initialize with filtered data
33113307
document.addEventListener('DOMContentLoaded', function() {
3312-
setTimeout(function() {
3313-
updateWasStatistics();
3314-
}, 500);
3308+
// Page has been loaded with server-calculated values
3309+
// No need to recalculate - the form filters handle updates via page reload
33153310
});
33163311

33173312
// Table search functionality
@@ -3331,8 +3326,6 @@ function updateWasStatistics() {
33313326
row.style.display = 'none';
33323327
}
33333328
});
3334-
3335-
updateWasStatistics();
33363329
});
33373330
}
33383331

@@ -3370,7 +3363,6 @@ function updateWasStatistics() {
33703363
}
33713364

33723365
rows.forEach(row => tbody.appendChild(row));
3373-
updateWasStatistics();
33743366
});
33753367
});
33763368

0 commit comments

Comments
 (0)