import { type EvaluationRun } from "@/hooks/useRoundEvaluationRun"; type EvaluationStatusSummaryProps = { loading: boolean; hasLoaded: boolean; run: EvaluationRun | null; isOfficialRun: boolean; stepProgressPercent: number | null; }; export default function EvaluationStatusSummary({ loading, hasLoaded, run, isOfficialRun, stepProgressPercent, }: EvaluationStatusSummaryProps) { if (loading && !hasLoaded) { return
Načítám stav…
; } if (!loading && !run && hasLoaded) { return
Vyhodnocení zatím nebylo spuštěno.
; } if (!loading && run && !isOfficialRun) { return
Žádné oficiální vyhodnocení zatím neběží.
; } if (!run || !isOfficialRun) { return null; } return (
Stav: {run.status ?? "—"}
Krok: {run.current_step ?? "—"}
Typ: {run.rules_version ?? "—"}
{run.result_type && (
Výsledek: {run.result_type}
)} {run.progress_total !== null && run.progress_total !== undefined && (
{run.progress_done ?? 0}/{run.progress_total}{" "} {stepProgressPercent !== null ? `(${stepProgressPercent}%)` : ""}
)}
); }