feat: add lint:fix command to package.json and update French text for consistency across various components
This commit is contained in:
@@ -254,7 +254,7 @@ export function AccountForm({ initialProfile, teams }: AccountFormProps) {
|
||||
|
||||
{Object.keys(teamsByDirection).length === 0 && (
|
||||
<div className="px-3 py-4 text-center text-sm text-muted-foreground">
|
||||
Aucune équipe trouvée pour "{searchTerm}"
|
||||
Aucune équipe trouvée pour "{searchTerm}"
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
import { Users, User, Calendar, X, Trash2 } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
@@ -31,13 +31,7 @@ export function TeamMembersModal({
|
||||
const [deletingMemberId, setDeletingMemberId] = useState<string | null>(null);
|
||||
const { toast } = useToast();
|
||||
|
||||
useEffect(() => {
|
||||
if (isOpen && teamId) {
|
||||
fetchMembers();
|
||||
}
|
||||
}, [isOpen, teamId]);
|
||||
|
||||
const fetchMembers = async () => {
|
||||
const fetchMembers = useCallback(async () => {
|
||||
setIsLoading(true);
|
||||
setError(null);
|
||||
try {
|
||||
@@ -48,7 +42,13 @@ export function TeamMembersModal({
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
}, [teamId]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isOpen && teamId) {
|
||||
fetchMembers();
|
||||
}
|
||||
}, [isOpen, teamId, fetchMembers]);
|
||||
|
||||
const handleRemoveMember = async (memberId: string, memberName: string) => {
|
||||
if (
|
||||
@@ -91,7 +91,7 @@ export function TeamMembersModal({
|
||||
<div className="flex items-center gap-3">
|
||||
<Users className="w-6 h-6 text-blue-400" />
|
||||
<div>
|
||||
<CardTitle className="text-xl">Membres de l'équipe</CardTitle>
|
||||
<CardTitle className="text-xl">Membres de l'équipe</CardTitle>
|
||||
<p className="text-sm text-slate-500 font-normal">{teamName}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,7 +137,7 @@ export function TeamMembersModal({
|
||||
Aucun membre dans cette équipe
|
||||
</p>
|
||||
<p className="text-slate-500 text-sm mt-1">
|
||||
Les membres apparaîtront ici une fois qu'ils seront assignés
|
||||
Les membres apparaîtront ici une fois qu'ils seront assignés
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@@ -27,7 +27,7 @@ export function TeamDetailHeader({
|
||||
className="text-slate-400 hover:text-white hover:bg-white/10"
|
||||
>
|
||||
<ArrowLeft className="h-4 w-4 mr-2" />
|
||||
Retour à l'admin
|
||||
Retour à l'admin
|
||||
</Button>
|
||||
<div className="text-slate-400 text-sm">|</div>
|
||||
<div className="flex items-center gap-3">
|
||||
|
||||
@@ -116,7 +116,7 @@ export function TeamDetailModal({
|
||||
</div>
|
||||
</DialogTitle>
|
||||
<DialogDescription className="text-slate-400">
|
||||
Aperçu rapide de l'équipe. Cliquez sur "Voir tous les détails" pour
|
||||
Aperçu rapide de l'équipe. Cliquez sur "Voir tous les détails" pour
|
||||
une vue complète.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
@@ -69,7 +69,7 @@ export function TeamDetailTabs({
|
||||
value="overview"
|
||||
className="data-[state=active]:bg-white/20 data-[state=active]:text-white text-slate-400 hover:text-white transition-colors"
|
||||
>
|
||||
Vue d'ensemble
|
||||
Vue d'ensemble
|
||||
</TabsTrigger>
|
||||
<TabsTrigger
|
||||
value="skills"
|
||||
|
||||
@@ -204,7 +204,7 @@ export function TeamInsightsTab({
|
||||
<div className="bg-white/5 backdrop-blur-sm border border-white/10 rounded-2xl p-6">
|
||||
<h3 className="text-lg font-semibold text-white mb-6 flex items-center gap-2">
|
||||
<Lightbulb className="h-5 w-5 text-yellow-400" />
|
||||
Recommandations pour l'équipe
|
||||
Recommandations pour l'équipe
|
||||
</h3>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div className="p-4 bg-red-500/10 border border-red-500/20 rounded-xl">
|
||||
@@ -219,7 +219,7 @@ export function TeamInsightsTab({
|
||||
{teamInsights.skillGaps.incontournable > 1 ? "s" : ""}{" "}
|
||||
incontournable
|
||||
{teamInsights.skillGaps.incontournable > 1 ? "s" : ""} sous
|
||||
l'objectif de {COVERAGE_OBJECTIVES.incontournable}%.
|
||||
l'objectif de {COVERAGE_OBJECTIVES.incontournable}%.
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
@@ -239,9 +239,9 @@ export function TeamInsightsTab({
|
||||
<>
|
||||
Attention: {teamInsights.skillGaps.majeure} compétence
|
||||
{teamInsights.skillGaps.majeure > 1 ? "s" : ""} majeure
|
||||
{teamInsights.skillGaps.majeure > 1 ? "s" : ""} n'atteigne
|
||||
{teamInsights.skillGaps.majeure > 1 ? "s" : ""} n'atteigne
|
||||
{teamInsights.skillGaps.majeure > 1 ? "nt" : ""} pas
|
||||
l'objectif de {COVERAGE_OBJECTIVES.majeure}%.
|
||||
l'objectif de {COVERAGE_OBJECTIVES.majeure}%.
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
|
||||
@@ -74,7 +74,7 @@ export function TeamOverviewTab({
|
||||
<div className="bg-white/5 backdrop-blur-sm border border-white/10 rounded-2xl p-6">
|
||||
<h3 className="text-lg font-semibold text-white mb-6 flex items-center gap-2">
|
||||
<Star className="h-5 w-5 text-yellow-400" />
|
||||
Top Compétences de l'équipe
|
||||
Top Compétences de l'équipe
|
||||
</h3>
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
{team.topSkills.slice(0, 6).map((skill, idx) => (
|
||||
@@ -505,7 +505,7 @@ export function TeamOverviewTab({
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between p-3 bg-white/5 rounded-lg">
|
||||
<span className="text-slate-300">Objectifs d'apprentissage</span>
|
||||
<span className="text-slate-300">Objectifs d'apprentissage</span>
|
||||
<span className="text-white font-bold">
|
||||
{teamInsights.totalLearners}
|
||||
</span>
|
||||
|
||||
@@ -55,7 +55,7 @@ export function TeamFormDialog({
|
||||
</DialogHeader>
|
||||
<div className="space-y-4">
|
||||
<div>
|
||||
<Label htmlFor="team-name">Nom de l'équipe *</Label>
|
||||
<Label htmlFor="team-name">Nom de l'équipe *</Label>
|
||||
<Input
|
||||
id="team-name"
|
||||
value={formData.name}
|
||||
|
||||
@@ -23,7 +23,7 @@ export function AdminHeader() {
|
||||
<h1 className="text-4xl font-bold text-white">Dashboard Managérial</h1>
|
||||
|
||||
<p className="text-slate-400 max-w-2xl mx-auto leading-relaxed">
|
||||
Vue d'ensemble des compétences par équipe et direction pour pilotage
|
||||
Vue d'ensemble des compétences par équipe et direction pour pilotage
|
||||
stratégique
|
||||
</p>
|
||||
|
||||
@@ -40,7 +40,7 @@ export function AdminHeader() {
|
||||
}`}
|
||||
>
|
||||
<Building2 className="w-4 h-4 mr-2" />
|
||||
Vue d'ensemble
|
||||
Vue d'ensemble
|
||||
</Button>
|
||||
</Link>
|
||||
<Link href="/admin/manage">
|
||||
|
||||
@@ -9,7 +9,7 @@ export function ActionSection() {
|
||||
size="lg"
|
||||
className="bg-blue-500 hover:bg-blue-600 text-white px-8 py-3 rounded-xl"
|
||||
>
|
||||
<Link href="/evaluation">Continuer l'évaluation</Link>
|
||||
<Link href="/evaluation">Continuer l'évaluation</Link>
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -194,7 +194,7 @@ export function MentorSection({
|
||||
})
|
||||
) : (
|
||||
<p className="text-slate-400 text-sm">
|
||||
Aucun objectif d'apprentissage configuré
|
||||
Aucun objectif d'apprentissage configuré
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@ export function RadarSection({ radarData }: RadarSectionProps) {
|
||||
<div className="bg-white/5 backdrop-blur-sm border border-white/10 rounded-2xl p-6">
|
||||
<div className="mb-6">
|
||||
<h3 className="text-xl font-bold text-white mb-2">
|
||||
Vue d'ensemble de vos compétences
|
||||
Vue d'ensemble de vos compétences
|
||||
</h3>
|
||||
<p className="text-slate-400 text-sm">
|
||||
Radar chart représentant votre niveau par catégorie
|
||||
|
||||
@@ -22,8 +22,8 @@ export function WelcomeScreen() {
|
||||
Bienvenue ! Commencez votre parcours
|
||||
</h1>
|
||||
<p className="text-lg text-slate-400 mb-12 max-w-2xl mx-auto">
|
||||
Vous êtes connecté avec succès. Il est temps d'évaluer vos
|
||||
compétences techniques pour obtenir une vue d'ensemble personnalisée
|
||||
Vous êtes connecté avec succès. Il est temps d'évaluer vos
|
||||
compétences techniques pour obtenir une vue d'ensemble personnalisée
|
||||
de votre expertise.
|
||||
</p>
|
||||
|
||||
@@ -35,7 +35,7 @@ export function WelcomeScreen() {
|
||||
Évaluez vos compétences
|
||||
</h3>
|
||||
<p className="text-slate-400 text-sm">
|
||||
Sélectionnez vos domaines d'expertise et évaluez votre niveau
|
||||
Sélectionnez vos domaines d'expertise et évaluez votre niveau
|
||||
</p>
|
||||
</div>
|
||||
<div className="bg-white/5 border border-white/10 rounded-xl p-6 backdrop-blur-sm">
|
||||
@@ -63,7 +63,7 @@ export function WelcomeScreen() {
|
||||
href="/evaluation"
|
||||
className="group bg-blue-500 hover:bg-blue-600 text-white px-8 py-4 rounded-xl font-medium transition-all inline-flex items-center gap-2"
|
||||
>
|
||||
Commencer l'évaluation
|
||||
Commencer l'évaluation
|
||||
<ArrowRight className="h-4 w-4 group-hover:translate-x-1 transition-transform" />
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -148,7 +148,7 @@ export function AuthWrapper({ teams, initialUser }: AuthWrapperProps) {
|
||||
onClick={() => (window.location.href = "/")}
|
||||
className="px-6 py-3 bg-blue-500 hover:bg-blue-600 text-white rounded-lg"
|
||||
>
|
||||
Aller à l'accueil
|
||||
Aller à l'accueil
|
||||
</button>
|
||||
<button
|
||||
onClick={handleLogout}
|
||||
|
||||
@@ -298,7 +298,7 @@ export function RegisterForm({
|
||||
|
||||
{Object.keys(teamsByDirection).length === 0 && (
|
||||
<div className="px-3 py-4 text-center text-sm text-slate-400">
|
||||
Aucune équipe trouvée pour "{searchTerm}"
|
||||
Aucune équipe trouvée pour "{searchTerm}"
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,8 @@ export function SkillEvaluation({
|
||||
} else if (categories.length > 0 && !selectedCategory) {
|
||||
setSelectedCategory(categories[0].category);
|
||||
}
|
||||
}, [categoryParam, categories]); // Remove selectedCategory from deps to avoid loop
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [categoryParam, categories]); // selectedCategory intentionally excluded to avoid infinite loop
|
||||
|
||||
const currentCategory = categories.find(
|
||||
(cat) => cat.category === selectedCategory
|
||||
|
||||
@@ -236,7 +236,7 @@ export function SkillSelector({
|
||||
<div className="text-center py-8 text-muted-foreground border-2 border-dashed border-muted rounded-lg">
|
||||
<p className="mb-2">Aucune compétence sélectionnée</p>
|
||||
<p className="text-sm">
|
||||
Cliquez sur "Ajouter une compétence" pour commencer
|
||||
Cliquez sur "Ajouter une compétence" pour commencer
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -92,7 +92,7 @@ export function TeamOverview({
|
||||
return (
|
||||
<Card className="bg-white/5 border-white/10 backdrop-blur">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-slate-200">Vue d'ensemble</CardTitle>
|
||||
<CardTitle className="text-slate-200">Vue d'ensemble</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
||||
|
||||
@@ -130,7 +130,7 @@ export function TeamStats({
|
||||
<Card className="bg-white/5 border-white/10 backdrop-blur">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-slate-200">
|
||||
Statistiques de l'équipe
|
||||
Statistiques de l'équipe
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-8">
|
||||
|
||||
Reference in New Issue
Block a user