poprawka w suwaku

This commit is contained in:
Mateusz Gruszczyński
2025-08-18 00:48:16 +02:00
parent 7762cba541
commit 95cc506abf

View File

@@ -9,10 +9,14 @@ document.addEventListener("DOMContentLoaded", function () {
function loadExpenses(range = "last30days", startDate = null, endDate = null) {
let url = '/expenses_data?range=' + range;
const showAllCheckbox = document.getElementById("showAllLists");
if (showAllCheckbox && showAllCheckbox.checked) {
if (showAllCheckbox) {
url += showAllCheckbox.checked ? '&show_all=true' : '&show_all=false';
} else {
url += '&show_all=true';
}
}
if (startDate && endDate) {
url += `&start_date=${startDate}&end_date=${endDate}`;
}