testing yuk

This commit is contained in:
Randa Firman Putra
2025-09-14 16:59:31 +07:00
parent 248fed0d0b
commit 60211ae829
63 changed files with 315 additions and 315 deletions

View File

@@ -39,7 +39,7 @@ export async function GET(req: Request) {
);
}
// Group by tahun_angkatan, separate active and graduated students
// Kelompokkan berdasarkan tahun_angkatan, pisahkan mahasiswa aktif dan lulus
const groupedData = data.reduce((acc, item) => {
const tahun = item.tahun_angkatan;
if (!acc[tahun]) {
@@ -65,7 +65,7 @@ export async function GET(req: Request) {
lulus: { sum: number; count: number };
}>);
// Convert to final format
// Konversi ke format akhir
const results: MasaStudiAktifData[] = Object.values(groupedData).map((data) => ({
tahun_angkatan: data.tahun_angkatan,
rata_rata_masa_studi_aktif_tahun: data.aktif.count > 0
@@ -76,7 +76,7 @@ export async function GET(req: Request) {
: 0,
}));
// Sort by tahun_angkatan
// Urutkan berdasarkan tahun_angkatan
results.sort((a, b) => a.tahun_angkatan - b.tahun_angkatan);
return NextResponse.json(results, {