update tgl 3 juni 2
This commit is contained in:
parent
c1b4718680
commit
20eeb0c646
|
@ -560,8 +560,12 @@ function updateChartType(type) {
|
||||||
// Redirect ke halaman tampilkan semua
|
// Redirect ke halaman tampilkan semua
|
||||||
window.location.href = "{{ route('home.all') }}";
|
window.location.href = "{{ route('home.all') }}";
|
||||||
} else {
|
} else {
|
||||||
// Redirect ke halaman dengan filter tanggal default
|
// Redirect ke halaman dengan filter tanggal bulan ini
|
||||||
window.location.href = "{{ route('home.filter', ['start_date' => date('Y-m-d'), 'end_date' => date('Y-m-d')]) }}";
|
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}`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue