update tgl 3 juni 2

This commit is contained in:
whywdd 2025-06-05 00:04:50 +07:00
parent c1b4718680
commit 20eeb0c646
1 changed files with 6 additions and 2 deletions

View File

@ -560,8 +560,12 @@ function updateChartType(type) {
// Redirect ke halaman tampilkan semua
window.location.href = "{{ route('home.all') }}";
} else {
// Redirect ke halaman dengan filter tanggal default
window.location.href = "{{ route('home.filter', ['start_date' => date('Y-m-d'), 'end_date' => date('Y-m-d')]) }}";
// Redirect ke halaman dengan filter tanggal bulan ini
const today = new Date();
const startDate = today.toISOString().split('T')[0].substring(0, 8) + '01';
const endDate = today.toISOString().split('T')[0];
window.location.href = `{{ route('home.filter') }}?start_date=${startDate}&end_date=${endDate}`;
}
});
});