zmiana, domyslnie current month

This commit is contained in:
Mateusz Gruszczyński
2025-08-22 11:45:17 +02:00
parent 5415e3435e
commit 372bd8eb20

View File

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