feat: add importance property to category breakdown and update team stats structure
This commit is contained in:
@@ -23,6 +23,7 @@ interface CategoryBreakdownProps {
|
|||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
|
importance: "incontournable" | "majeure" | "standard";
|
||||||
}>;
|
}>;
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export function useTeamsManagement(
|
|||||||
setTeams((prev) => [...prev, newLocalTeam]);
|
setTeams((prev) => [...prev, newLocalTeam]);
|
||||||
|
|
||||||
// Ajouter les stats de la nouvelle équipe (avec les propriétés minimales)
|
// Ajouter les stats de la nouvelle équipe (avec les propriétés minimales)
|
||||||
const newTeamStats = {
|
const newTeamStats: TeamStats = {
|
||||||
teamId: newTeam.id,
|
teamId: newTeam.id,
|
||||||
teamName: newTeam.name,
|
teamName: newTeam.name,
|
||||||
direction: newTeam.direction,
|
direction: newTeam.direction,
|
||||||
@@ -70,7 +70,11 @@ export function useTeamsManagement(
|
|||||||
skillCoverage: 0,
|
skillCoverage: 0,
|
||||||
topSkills: [],
|
topSkills: [],
|
||||||
members: [],
|
members: [],
|
||||||
} as TeamStats;
|
criticalSkillsCoverage: {
|
||||||
|
incontournable: 0,
|
||||||
|
majeure: 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
setTeamStats((prev) => [...prev, newTeamStats]);
|
setTeamStats((prev) => [...prev, newTeamStats]);
|
||||||
return true;
|
return true;
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
TeamMember,
|
TeamMember,
|
||||||
TeamMemberSkill,
|
TeamMemberSkill,
|
||||||
} from "@/lib/team-review-types";
|
} from "@/lib/team-review-types";
|
||||||
import { SkillLevel, SKILL_LEVEL_VALUES } from "@/lib/types";
|
import { SKILL_LEVEL_VALUES, SkillImportance } from "@/lib/types";
|
||||||
import {
|
import {
|
||||||
COVERAGE_OBJECTIVES,
|
COVERAGE_OBJECTIVES,
|
||||||
isCoverageBelowObjective,
|
isCoverageBelowObjective,
|
||||||
@@ -159,7 +159,7 @@ export class TeamReviewService {
|
|||||||
const coverage = calculateSkillCoverage(levels, totalTeamMembers);
|
const coverage = calculateSkillCoverage(levels, totalTeamMembers);
|
||||||
|
|
||||||
// Déterminer le niveau de risque en fonction de l'importance et de la couverture
|
// 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 =
|
const risk =
|
||||||
skill.importance === "incontournable" && coverage < coverageObjective
|
skill.importance === "incontournable" && coverage < coverageObjective
|
||||||
? "high"
|
? "high"
|
||||||
|
|||||||
Reference in New Issue
Block a user