refactor(workbench): clarify report states

This commit is contained in:
2026-07-13 15:43:07 +08:00
parent 3a44de941d
commit c2e1c937ae
5 changed files with 295 additions and 252 deletions
@@ -0,0 +1,19 @@
import type {
ScheduledConditionRiskLevel,
ScheduledConditionStatus
} from "@/features/workbench/types";
export function getConditionReportRiskLevel(
status: ScheduledConditionStatus,
riskLevel: ScheduledConditionRiskLevel
): ScheduledConditionRiskLevel {
if (status === "error") {
return "critical";
}
if (status === "warning") {
return "attention";
}
return riskLevel;
}