feat: update app.db and BACKLOG.md with new decisions and adjustments
All checks were successful
Deploy / deploy (push) Successful in 7m45s
All checks were successful
Deploy / deploy (push) Successful in 7m45s
- Updated the app.db file to reflect recent changes in the application state. - Modified BACKLOG.md to include new entries regarding the removal of certain wizard steps, adjustments to priority chips, and the introduction of special quota conditions for candidates. - Added details on the decision to link priority chips to data sources and clarified the implications for user experience and data handling.
This commit is contained in:
68
src/features/katalog/components/taban-karti.tsx
Normal file
68
src/features/katalog/components/taban-karti.tsx
Normal file
@@ -0,0 +1,68 @@
|
||||
import Link from "next/link";
|
||||
import type { ReactNode } from "react";
|
||||
import {
|
||||
ortaTabanYonu,
|
||||
YON_ETIKET,
|
||||
type TabanKumesi,
|
||||
type TabanDuzeyi,
|
||||
type TabanOzeti,
|
||||
} from "@/lib/taban-ozeti";
|
||||
import { kisaSayi } from "@/components/ozet-kart";
|
||||
|
||||
/**
|
||||
* Üniversite ve bölüm sayfasının özet kartlarının ortak metin ve link
|
||||
* yardımcıları (DESIGN.md §4.8). Yıl yıl ayrıntı çekmecesi ("Yıllara göre
|
||||
* taban") 6 Eki 2026'da Bilal'in isteğiyle şimdilik kaldırıldı; geri gelirse
|
||||
* git geçmişinde `taban-yillari.tsx` + `siranla-kapilar.tsx` olarak duruyor.
|
||||
*/
|
||||
|
||||
/** "2026'da" — yıl eki ünlü uyumuna göre (2023'te, 2026'da, 2027'de). */
|
||||
export function yilEki(yil: number): string {
|
||||
const son = yil % 10;
|
||||
if (son === 3 || son === 4 || son === 5) return `${yil}'te`;
|
||||
if (son === 0 || son === 6 || son === 9) return `${yil}'da`;
|
||||
return `${yil}'de`;
|
||||
}
|
||||
|
||||
/** Orta taban kümesinin adı: "Devlet" / "Lisans" / "Önlisans". */
|
||||
export function kumeAdi(kume: TabanKumesi, duzey: TabanDuzeyi): string {
|
||||
if (kume === "devlet") return "Devlet";
|
||||
return duzey === "lisans" ? "Lisans" : "Önlisans";
|
||||
}
|
||||
|
||||
/** Özet kartının açıklaması: "Devlet · 2021'de 105 bin · gevşedi". */
|
||||
export function ortaTabanAciklamasi(taban: TabanOzeti): string {
|
||||
const yon = ortaTabanYonu(taban.ortaTaban);
|
||||
const kume = kumeAdi(taban.kume, taban.duzey);
|
||||
if (!yon) {
|
||||
return taban.ortaTabanAdet > 0
|
||||
? `${kume} · ${taban.ortaTabanAdet.toLocaleString("tr-TR")} programın ortası`
|
||||
: "henüz taban oluşmadı";
|
||||
}
|
||||
return `${kume} · ${yilEki(yon.ilkYil)} ${kisaSayi(yon.ilk)} · ${YON_ETIKET[yon.yon]}`;
|
||||
}
|
||||
|
||||
/** Özet kartı açıklamasındaki ad linki (üniversite ↔ bölüm çapraz bağ). */
|
||||
export function KartBaglantisi({
|
||||
href,
|
||||
children,
|
||||
}: {
|
||||
href: string | null;
|
||||
children: ReactNode;
|
||||
}) {
|
||||
if (!href) return <>{children}</>;
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
className="font-medium text-primary transition-colors hover:text-orange-500 hover:underline"
|
||||
>
|
||||
{children}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
/** "Koç Üniversitesi" → "Koç Üni.", "… Meslek Yüksekokulu" → "… MYO" — kart açıklaması kısa kalsın. */
|
||||
export function kisaUniAdi(ad: string): string {
|
||||
// \b kullanılmaz: JS'te ASCII sınırıdır, "Ü" önünde sözcük sınırı saymaz.
|
||||
return ad.replace("Üniversitesi", "Üni.").replace("Meslek Yüksekokulu", "MYO");
|
||||
}
|
||||
Reference in New Issue
Block a user