menambah halaman penelitian pada dosen, memperbaiki tampilan awal agar menampilkan informasi seputar penelitian

This commit is contained in:
cowrie committed 2026-11-17 03:14:23 +08:00
1 parent 218f8ce063
commit e625acd13a
12 files changed
+2275 -290

No files matched your search

+23 -6
View File
@@ -196,13 +196,30 @@
// Format Dates
function formatDate(dateString) {
if (!dateString) return '-';
// If it's already in "YYYY-MM-DD HH:mm:ss" format, just format it
if (!dateString.includes('T')) {
// Replace T with space, then remove the seconds
let cleanStr = dateString.replace('T', ' ');
return cleanStr.substring(0, 16).replace(/-/g, ' ').replace(':', '.');
}
const date = new Date(dateString);
return date.toLocaleString('id-ID', {
day: '2-digit', month: 'short', year: 'numeric',
hour: '2-digit', minute: '2-digit'
});
// Use UTC getters because the DB stores WIB as "UTC" in the ISO string
const months = ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agu', 'Sep', 'Okt', 'Nov', 'Des'];
const day = String(date.getUTCDate()).padStart(2, '0');
const month = months[date.getUTCMonth()];
const year = date.getUTCFullYear();
const hours = String(date.getUTCHours()).padStart(2, '0');
const minutes = String(date.getUTCMinutes()).padStart(2, '0');
return `${day} ${month} ${year}, ${hours}.${minutes}`;
}
function logout() {
swal({
title: "Logout?",
@@ -220,7 +237,7 @@
// --- CHART RENDERING FUNCTION ---
function renderChart() {
$.get('/api/laporan/stats/daily', function(data) {
$.get('/api/laporan/stats/daily', function (data) {
const labels = [];
const counts = [];
@@ -234,7 +251,7 @@
});
const ctx = document.getElementById('penelitianChart').getContext('2d');
new Chart(ctx, {
type: 'line',
data: {