init
This commit is contained in:
67
lib/types.ts
Normal file
67
lib/types.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
export type SkillLevel =
|
||||
| "never"
|
||||
| "not-autonomous"
|
||||
| "autonomous"
|
||||
| "expert"
|
||||
| null;
|
||||
|
||||
export const SKILL_LEVELS: Record<Exclude<SkillLevel, null>, string> = {
|
||||
never: "Jamais pratiqué",
|
||||
"not-autonomous": "Pas autonome",
|
||||
autonomous: "Autonome",
|
||||
expert: "Maîtrise",
|
||||
};
|
||||
|
||||
export const SKILL_LEVEL_VALUES: Record<Exclude<SkillLevel, null>, number> = {
|
||||
never: 0,
|
||||
"not-autonomous": 1,
|
||||
autonomous: 2,
|
||||
expert: 3,
|
||||
};
|
||||
|
||||
export interface Skill {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
links: string[];
|
||||
}
|
||||
|
||||
export interface SkillCategory {
|
||||
category: string;
|
||||
skills: Skill[];
|
||||
}
|
||||
|
||||
export interface Team {
|
||||
id: string;
|
||||
name: string;
|
||||
direction: string;
|
||||
}
|
||||
|
||||
export interface UserProfile {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
teamId: string;
|
||||
}
|
||||
|
||||
export interface SkillEvaluation {
|
||||
skillId: string;
|
||||
level: SkillLevel;
|
||||
}
|
||||
|
||||
export interface CategoryEvaluation {
|
||||
category: string;
|
||||
skills: SkillEvaluation[];
|
||||
selectedSkillIds: string[]; // List of skill IDs the user wants to evaluate
|
||||
}
|
||||
|
||||
export interface UserEvaluation {
|
||||
profile: UserProfile;
|
||||
evaluations: CategoryEvaluation[];
|
||||
lastUpdated: string;
|
||||
}
|
||||
|
||||
export interface RadarChartData {
|
||||
category: string;
|
||||
score: number;
|
||||
maxScore: number;
|
||||
}
|
||||
Reference in New Issue
Block a user