feat: add importance property to category breakdown and update team stats structure

This commit is contained in:
Julien Froidefond
2025-10-12 16:03:11 +02:00
parent 7d12a66c12
commit ad5d954182
3 changed files with 9 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ import {
TeamMember,
TeamMemberSkill,
} from "@/lib/team-review-types";
import { SkillLevel, SKILL_LEVEL_VALUES } from "@/lib/types";
import { SKILL_LEVEL_VALUES, SkillImportance } from "@/lib/types";
import {
COVERAGE_OBJECTIVES,
isCoverageBelowObjective,
@@ -159,7 +159,7 @@ export class TeamReviewService {
const coverage = calculateSkillCoverage(levels, totalTeamMembers);
// Déterminer le niveau de risque en fonction de l'importance et de la couverture
const coverageObjective = COVERAGE_OBJECTIVES[skill.importance];
const coverageObjective = COVERAGE_OBJECTIVES[skill.importance as SkillImportance];
const risk =
skill.importance === "incontournable" && coverage < coverageObjective
? "high"