podzial dzienny
This commit is contained in:
@@ -120,6 +120,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
loadExpenses();
|
||||
});
|
||||
|
||||
|
||||
toggleBtn.textContent = "🔵 Pokaż całościowo";
|
||||
toggleBtn.classList.remove("btn-outline-warning");
|
||||
toggleBtn.classList.add("btn-outline-info");
|
||||
@@ -173,9 +174,14 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
}
|
||||
|
||||
document.getElementById('toggleDailySplit').addEventListener('click', function() {
|
||||
// Zmień typ podziału na dzienny i odśwież dane wykresu
|
||||
currentRangeType = 'daily';
|
||||
refreshChart();
|
||||
// Pobierz aktualne daty jeśli są ustawione w inputach
|
||||
const startDateInput = document.getElementById('startDate');
|
||||
const endDateInput = document.getElementById('endDate');
|
||||
let startDate = startDateInput ? startDateInput.value : null;
|
||||
let endDate = endDateInput ? endDateInput.value : null;
|
||||
|
||||
// Wywołaj funkcję z "daily" jako typ zakresu
|
||||
loadExpenses('daily', startDate, endDate);
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user