fix(ts): add disputed to all Record<TestState> maps to satisfy TypeScript
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled

This commit is contained in:
kitos
2026-06-03 12:23:53 +02:00
parent 61e6037e97
commit 9f86c205be
2 changed files with 4 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ const STATE_INDEX: Record<TestState, number> = {
in_review: 3, in_review: 3,
validated: 4, validated: 4,
rejected: -1, rejected: -1,
disputed: 3, // same step as in_review (still in validation phase)
}; };
// ── Badge colors ─────────────────────────────────────────────────── // ── Badge colors ───────────────────────────────────────────────────

View File

@@ -18,6 +18,7 @@ import {
ChevronDown, ChevronDown,
ChevronsUpDown, ChevronsUpDown,
Timer, Timer,
AlertTriangle,
} from "lucide-react"; } from "lucide-react";
import { getTests, type TestListFilters } from "../api/tests"; import { getTests, type TestListFilters } from "../api/tests";
import type { Test, TestState } from "../types/models"; import type { Test, TestState } from "../types/models";
@@ -379,6 +380,7 @@ export default function TestsPage() {
in_review: <Eye className="h-5 w-5 text-blue-400" />, in_review: <Eye className="h-5 w-5 text-blue-400" />,
validated: <CheckCircle className="h-5 w-5 text-green-400" />, validated: <CheckCircle className="h-5 w-5 text-green-400" />,
rejected: <XCircle className="h-5 w-5 text-red-400" />, rejected: <XCircle className="h-5 w-5 text-red-400" />,
disputed: <AlertTriangle className="h-5 w-5 text-amber-400" />,
}; };
const colorMap: Record<TestState, string> = { const colorMap: Record<TestState, string> = {
draft: "text-gray-400", draft: "text-gray-400",
@@ -387,6 +389,7 @@ export default function TestsPage() {
in_review: "text-blue-400", in_review: "text-blue-400",
validated: "text-green-400", validated: "text-green-400",
rejected: "text-red-400", rejected: "text-red-400",
disputed: "text-amber-400",
}; };
return ( return (
<button <button