testing yuk
This commit is contained in:
@@ -32,7 +32,7 @@ export async function GET(request: Request) {
|
||||
);
|
||||
}
|
||||
|
||||
// Group and count the data in JavaScript
|
||||
// Kelompokkan dan hitung data di JavaScript
|
||||
const groupedData = data.reduce((acc: any[], row: any) => {
|
||||
const tahunAngkatanValue = row.mahasiswa?.tahun_angkatan;
|
||||
const namaBeasiswa = row.nama_beasiswa;
|
||||
@@ -60,7 +60,7 @@ export async function GET(request: Request) {
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
// Sort the results by tahun_angkatan ascending (as expected by component)
|
||||
// Urutkan hasil berdasarkan tahun_angkatan ascending (sesuai yang diharapkan komponen)
|
||||
const sortedData = groupedData.sort((a: any, b: any) => {
|
||||
if (a.tahun_angkatan !== b.tahun_angkatan) {
|
||||
return a.tahun_angkatan - b.tahun_angkatan;
|
||||
|
||||
Reference in New Issue
Block a user