Add mentor and learning status updates to skill evaluation

- Introduced `updateSkillMentorStatus` and `updateSkillLearningStatus` functions to manage mentor and learning preferences for skills.
- Updated `SkillEvaluationCard` to include buttons for toggling mentor and learning statuses with corresponding icons.
- Enhanced `SkillEvaluationGrid` and `SkillEvaluation` components to pass new status update handlers.
- Modified `SkillEvaluation` type to accommodate new properties for mentor and learning status.
This commit is contained in:
Julien Froidefond
2025-08-20 17:04:19 +02:00
parent ab9c35c276
commit 328a1b68a1
6 changed files with 186 additions and 8 deletions

View File

@@ -16,6 +16,16 @@ interface SkillEvaluationProps {
categories: SkillCategory[];
evaluations: CategoryEvaluation[];
onUpdateSkill: (category: string, skillId: string, level: SkillLevel) => void;
onUpdateMentorStatus: (
category: string,
skillId: string,
canMentor: boolean
) => void;
onUpdateLearningStatus: (
category: string,
skillId: string,
wantsToLearn: boolean
) => void;
onAddSkill: (category: string, skillId: string) => void;
onRemoveSkill: (category: string, skillId: string) => void;
}
@@ -24,6 +34,8 @@ export function SkillEvaluation({
categories,
evaluations,
onUpdateSkill,
onUpdateMentorStatus,
onUpdateLearningStatus,
onAddSkill,
onRemoveSkill,
}: SkillEvaluationProps) {
@@ -94,6 +106,8 @@ export function SkillEvaluation({
currentCategory={currentCategory}
currentEvaluation={currentEvaluation}
onUpdateSkill={onUpdateSkill}
onUpdateMentorStatus={onUpdateMentorStatus}
onUpdateLearningStatus={onUpdateLearningStatus}
onRemoveSkill={onRemoveSkill}
/>
)}