Fix: Conversion complète vers PrimeReact et corrections build
CONVERSIONS UI (8 pages): ✅ Remplacement de tous les composants Shadcn/UI par PrimeReact - Card, Button, Input, Textarea, Badge → Card, Button, InputText, InputTextarea, Tag - Conversion de toutes les icônes lucide-react en primeicons Pages converties: - app/(main)/aide/page.tsx - app/(main)/aide/documentation/page.tsx - app/(main)/aide/tutoriels/page.tsx - app/(main)/aide/support/page.tsx - app/(main)/messages/page.tsx - app/(main)/messages/nouveau/page.tsx - app/(main)/messages/envoyes/page.tsx - app/(main)/messages/archives/page.tsx CORRECTIONS BUILD: ✅ Résolution des conflits de dépendances FullCalendar - @fullcalendar/core: 6.1.4 → ^6.1.19 - Alignement avec daygrid, timegrid, interaction, react ✅ Correction des erreurs TypeScript - DataTable: Ajout de selectionMode="multiple" - InputText number: Conversion number → string avec .toString() ✅ Correction des services API (3 fichiers) - fournisseurService.ts - notificationService.ts - userService.ts - Remplacement des appels apiService.get() par axios direct - Ajout du préfixe /api/v1/ à tous les endpoints - Configuration d'interceptors pour authentication tokens RÉSULTAT: ✅ Build réussi: 126 pages générées ✅ 0 erreurs de compilation ✅ 0 erreurs TypeScript ✅ Architecture cohérente avec PrimeReact 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,21 +1,10 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import {
|
||||
Video,
|
||||
Search,
|
||||
Play,
|
||||
Clock,
|
||||
Star,
|
||||
ThumbsUp,
|
||||
Eye,
|
||||
ArrowLeft,
|
||||
Filter,
|
||||
} from "lucide-react";
|
||||
import { Card } from "primereact/card";
|
||||
import { Button } from "primereact/button";
|
||||
import { InputText } from "primereact/inputtext";
|
||||
import { Tag } from "primereact/tag";
|
||||
import Link from "next/link";
|
||||
|
||||
/**
|
||||
@@ -115,16 +104,16 @@ export default function TutorielsPage() {
|
||||
return matchesSearch && matchesCategory;
|
||||
});
|
||||
|
||||
const getLevelColor = (level: string) => {
|
||||
const getLevelSeverity = (level: string): "success" | "info" | "warning" | undefined => {
|
||||
switch (level) {
|
||||
case "Débutant":
|
||||
return "bg-green-100 text-green-800";
|
||||
return "success";
|
||||
case "Intermédiaire":
|
||||
return "bg-blue-100 text-blue-800";
|
||||
return "info";
|
||||
case "Avancé":
|
||||
return "bg-purple-100 text-purple-800";
|
||||
return "warning";
|
||||
default:
|
||||
return "bg-gray-100 text-gray-800";
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -134,8 +123,8 @@ export default function TutorielsPage() {
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-4">
|
||||
<Link href="/aide">
|
||||
<Button variant="ghost" size="sm">
|
||||
<ArrowLeft className="h-4 w-4 mr-2" />
|
||||
<Button text size="small">
|
||||
<i className="pi pi-arrow-left mr-2"></i>
|
||||
Retour à l'aide
|
||||
</Button>
|
||||
</Link>
|
||||
@@ -152,22 +141,22 @@ export default function TutorielsPage() {
|
||||
{/* Barre de recherche et filtres */}
|
||||
<div className="flex gap-4 flex-wrap">
|
||||
<div className="flex-1 min-w-[300px]">
|
||||
<div className="relative">
|
||||
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" />
|
||||
<Input
|
||||
<span className="p-input-icon-left w-full">
|
||||
<i className="pi pi-search" />
|
||||
<InputText
|
||||
placeholder="Rechercher un tutoriel..."
|
||||
className="pl-10"
|
||||
className="w-full"
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex gap-2 flex-wrap">
|
||||
{categories.map((category) => (
|
||||
<Button
|
||||
key={category}
|
||||
variant={selectedCategory === category ? "default" : "outline"}
|
||||
size="sm"
|
||||
outlined={selectedCategory !== category}
|
||||
size="small"
|
||||
onClick={() => setSelectedCategory(category)}
|
||||
>
|
||||
{category === "all" ? "Toutes les catégories" : category}
|
||||
@@ -192,11 +181,11 @@ export default function TutorielsPage() {
|
||||
/>
|
||||
<div className="absolute inset-0 bg-black bg-opacity-40 flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity">
|
||||
<div className="p-4 bg-white rounded-full">
|
||||
<Play className="h-8 w-8 text-blue-600" />
|
||||
<i className="pi pi-play text-blue-600" style={{ fontSize: '2rem' }}></i>
|
||||
</div>
|
||||
</div>
|
||||
<div className="absolute bottom-2 right-2 bg-black bg-opacity-75 text-white px-2 py-1 rounded text-xs flex items-center gap-1">
|
||||
<Clock className="h-3 w-3" />
|
||||
<i className="pi pi-clock" style={{ fontSize: '0.75rem' }}></i>
|
||||
{tutoriel.duration}
|
||||
</div>
|
||||
</div>
|
||||
@@ -204,10 +193,8 @@ export default function TutorielsPage() {
|
||||
{/* Contenu */}
|
||||
<div className="p-4">
|
||||
<div className="flex items-start justify-between gap-2 mb-2">
|
||||
<Badge className={getLevelColor(tutoriel.level)}>
|
||||
{tutoriel.level}
|
||||
</Badge>
|
||||
<Badge variant="outline">{tutoriel.category}</Badge>
|
||||
<Tag severity={getLevelSeverity(tutoriel.level)} value={tutoriel.level} />
|
||||
<Tag severity="secondary" value={tutoriel.category} />
|
||||
</div>
|
||||
|
||||
<h3 className="font-semibold text-lg mb-2">{tutoriel.title}</h3>
|
||||
@@ -219,16 +206,16 @@ export default function TutorielsPage() {
|
||||
<div className="flex items-center justify-between text-sm text-gray-500">
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="flex items-center gap-1">
|
||||
<Eye className="h-4 w-4" />
|
||||
<i className="pi pi-eye"></i>
|
||||
{tutoriel.views.toLocaleString()}
|
||||
</div>
|
||||
<div className="flex items-center gap-1">
|
||||
<ThumbsUp className="h-4 w-4" />
|
||||
<i className="pi pi-thumbs-up"></i>
|
||||
{tutoriel.likes}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-1">
|
||||
<Star className="h-4 w-4 fill-yellow-400 text-yellow-400" />
|
||||
<i className="pi pi-star-fill text-yellow-400"></i>
|
||||
<span className="font-medium">{tutoriel.rating}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -240,7 +227,7 @@ export default function TutorielsPage() {
|
||||
{filteredTutoriels.length === 0 && (
|
||||
<Card className="p-12">
|
||||
<div className="text-center">
|
||||
<Video className="h-12 w-12 text-gray-400 mx-auto mb-4" />
|
||||
<i className="pi pi-video text-gray-400 mx-auto mb-4" style={{ fontSize: '3rem' }}></i>
|
||||
<p className="text-gray-500">Aucun tutoriel trouvé</p>
|
||||
</div>
|
||||
</Card>
|
||||
@@ -250,7 +237,7 @@ export default function TutorielsPage() {
|
||||
<Card className="p-6 bg-gradient-to-r from-purple-50 to-blue-50">
|
||||
<div className="flex items-start gap-4">
|
||||
<div className="p-3 bg-purple-600 rounded-lg">
|
||||
<Video className="h-6 w-6 text-white" />
|
||||
<i className="pi pi-video text-white" style={{ fontSize: '1.5rem' }}></i>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="font-semibold text-lg mb-2">
|
||||
|
||||
Reference in New Issue
Block a user