"use client"; import Link from "next/link"; import type { Program } from "@/types/yokatlas"; import { SON_YIL, VERI_YIL_SAYISI } from "@/lib/veri-yillari"; import { ProgramSiraGecmisi, ProgramTabanTrendi, programEtkinSira, } from "@/components/program-liste-verileri"; import { ProgramEkleButonu } from "@/features/liste/components/program-ekle-butonu"; import { ProgramNetleriButonu } from "./program-netleri"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table"; const sayi = (n: number) => n.toLocaleString("tr-TR"); const TUR_ETIKET: Record = { SAYISAL: "SAY", "EŞİT AĞIRLIK": "EA", SÖZEL: "SÖZ", DİL: "DİL", TYT: "TYT", }; export type UniProgramSatiri = Program & { bolumSlug: string | null }; export function UniversiteProgramTablosu({ gruplar, }: { gruplar: { fakulte: string; programlar: UniProgramSatiri[] }[]; }) { return ( <> {gruplar.map(({ fakulte, programlar }, i) => (

{fakulte}

Program Son {VERI_YIL_SAYISI} yıl {SON_YIL} puan Kontenjan Taban sıra Netler ve listeye ekle {programlar.map((p) => { const taban = programEtkinSira(p); return ( {p.bolumSlug ? ( {p.isim.trim()} ) : ( {p.isim.trim()} )} {TUR_ETIKET[p.tur] ?? p.tur} {p.sure ? ( {p.sure} yıl ) : null} {p.puanSon != null ? p.puanSon.toFixed(2).replace(".", ",") : "—"} {p.kontenjanSon != null ? `${sayi(p.kontenjanSon)} kişi` : "—"} {taban != null ? `~${sayi(taban)}.` : "—"} ); })}
))} ); }