import { type EvaluationRun } from "@/hooks/useRoundEvaluationRun"; type EvaluationHistoryPanelProps = { runs: EvaluationRun[]; historyOpen: boolean; onToggle: () => void; formatEventTime: (value?: string | null) => string | null; }; export default function EvaluationHistoryPanel({ runs, historyOpen, onToggle, formatEventTime, }: EvaluationHistoryPanelProps) { return (
{historyOpen && ( <> {runs.length === 0 &&
Zatím bez historie.
} {runs.length > 0 && (
{runs.map((item) => (
Run #{item.id}
Stav: {item.status ?? "—"}
{item.result_type &&
Výsledek: {item.result_type}
}
Start: {formatEventTime(item.started_at ?? item.created_at) ?? "—"}
Konec: {formatEventTime(item.finished_at) ?? "—"}
))}
)} )}
); }