From e7f6389ca364fa8af9acb374d2341eac93636710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Thu, 18 Sep 2025 22:04:03 +0200 Subject: [PATCH] zmiana w js setCategorySplit --- static/js/chart_controls.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/static/js/chart_controls.js b/static/js/chart_controls.js index 8a015a2..1fd507b 100644 --- a/static/js/chart_controls.js +++ b/static/js/chart_controls.js @@ -78,7 +78,16 @@ document.addEventListener("DOMContentLoaded", function () { // porzucenie zakresu //document.querySelectorAll("#chartTab .range-btn").forEach(b => b.classList.remove("active")); - reloadRespectingSplit(); + // pobierz wartości z inputów + const sd = startDateInput?.value; + const ed = endDateInput?.value; + if(sd && ed) { + window.setCategorySplit(true); + window.loadExpenses('monthly', sd, ed); // lub odpowiednio, jeśli dzienny lub inny tryb + } else { + reloadRespectingSplit(); // fallback, jeśli brak wartości + } + }); // ——— Własny zakres ———