diff --git a/src/features/liste/components/liste-cekmecesi.tsx b/src/features/liste/components/liste-cekmecesi.tsx index 83240b6..df77faf 100644 --- a/src/features/liste/components/liste-cekmecesi.tsx +++ b/src/features/liste/components/liste-cekmecesi.tsx @@ -28,6 +28,7 @@ import { } from "@/components/ui/drawer"; import { ArrowRight, + Check, GripVertical, ListChecks, Plus, @@ -89,6 +90,13 @@ export function ListeCekmecesi() { const [oturdu, setOturdu] = useState(false); const doluluk = Math.round((liste.length / MANUEL_LISTE_MAX) * 100); + // Risk dağılımı: riskliden güvenliye, sıfır olanlar yazılmaz + const riskSayilari = (["riskli", "az-riskli", "guvenli"] as const) + .map((r) => [r, liste.filter((t) => t.risk === r).length] as const) + .filter(([, adet]) => adet > 0); + const riskBilinen = liste.filter((t) => t.risk != null).length; + const guvenliYok = + riskBilinen >= 6 && !liste.some((t) => t.risk === "guvenli"); // Profilsiz + ile eklenenlerin riski henüz hesaplanmamıştır; alt kart // olmayan bir analizi "hazır" diye duyurmasın. Profil varken null risk, // programın taban sırası olmadığındandır — sıra istemek yanlış olur. @@ -139,8 +147,18 @@ export function ListeCekmecesi() { Kendi Listem -

- {liste.length} / {MANUEL_LISTE_MAX} tercih + {/* Durum ekran okuyucuya da duyurulur (WCAG 4.1.3) */} +

+ {liste.length === MANUEL_LISTE_MAX ? ( + + + Listen tamam · {liste.length} / {MANUEL_LISTE_MAX} + + ) : ( + <> + {liste.length} / {MANUEL_LISTE_MAX} tercih + + )}

+ {/* Listenin dengesi metinle (renk tek başına değil, §2.2) */} + {riskSayilari.length > 0 ? ( +

+ {riskSayilari.map(([seviye, adet]) => ( + + + + {adet} + + + ))} +

+ ) : null} + {/* Denge ipucu: 24'lük iskeletin mantığı (alt sıralarda güvenli + programlar). Yalnız riskleri bilinen ve en az 6 tercihli + listede; vaat değil, gerekçe. */} + {guvenliYok ? ( +

+ Güvenli program yok; alta birkaç tane eklemek açıkta kalma riskini + azaltır. +

+ ) : null}