refactor: rule of coverage are in one place
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
"use client";
|
||||
|
||||
import { Users, BarChart3, Award, BookOpen, Target } from "lucide-react";
|
||||
import {
|
||||
COVERAGE_OBJECTIVES,
|
||||
isCoverageBelowObjective,
|
||||
} from "@/lib/evaluation-utils";
|
||||
|
||||
interface TeamInsights {
|
||||
averageTeamLevel: number;
|
||||
@@ -81,7 +85,10 @@ export function TeamMetricsCards({
|
||||
</div>
|
||||
<div
|
||||
className={`text-2xl font-bold ${
|
||||
teamInsights.criticalSkillsCoverage.incontournable < 75
|
||||
isCoverageBelowObjective(
|
||||
teamInsights.criticalSkillsCoverage.incontournable,
|
||||
"incontournable"
|
||||
)
|
||||
? "text-red-400"
|
||||
: "text-green-400"
|
||||
}`}
|
||||
@@ -102,7 +109,10 @@ export function TeamMetricsCards({
|
||||
</div>
|
||||
<div
|
||||
className={`text-2xl font-bold ${
|
||||
teamInsights.criticalSkillsCoverage.majeure < 60
|
||||
isCoverageBelowObjective(
|
||||
teamInsights.criticalSkillsCoverage.majeure,
|
||||
"majeure"
|
||||
)
|
||||
? "text-red-400"
|
||||
: "text-green-400"
|
||||
}`}
|
||||
|
||||
Reference in New Issue
Block a user