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,23 +1,9 @@
|
||||
"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 {
|
||||
Mail,
|
||||
Search,
|
||||
Send,
|
||||
Archive,
|
||||
Star,
|
||||
Trash2,
|
||||
Reply,
|
||||
Forward,
|
||||
MoreVertical,
|
||||
Paperclip,
|
||||
Clock,
|
||||
} from "lucide-react";
|
||||
import { Card } from "primereact/card";
|
||||
import { Button } from "primereact/button";
|
||||
import { InputText } from "primereact/inputtext";
|
||||
import Link from "next/link";
|
||||
|
||||
/**
|
||||
@@ -134,7 +120,7 @@ export default function MessagesPage() {
|
||||
</div>
|
||||
<Link href="/messages/nouveau">
|
||||
<Button className="bg-blue-600 hover:bg-blue-700">
|
||||
<Send className="mr-2 h-4 w-4" />
|
||||
<i className="pi pi-send mr-2"></i>
|
||||
Nouveau message
|
||||
</Button>
|
||||
</Link>
|
||||
@@ -143,20 +129,20 @@ export default function MessagesPage() {
|
||||
{/* Navigation */}
|
||||
<div className="flex gap-2">
|
||||
<Link href="/messages">
|
||||
<Button variant="default" className="bg-blue-600">
|
||||
<Mail className="mr-2 h-4 w-4" />
|
||||
<Button className="bg-blue-600">
|
||||
<i className="pi pi-envelope mr-2"></i>
|
||||
Reçus
|
||||
</Button>
|
||||
</Link>
|
||||
<Link href="/messages/envoyes">
|
||||
<Button variant="outline">
|
||||
<Send className="mr-2 h-4 w-4" />
|
||||
<Button outlined>
|
||||
<i className="pi pi-send mr-2"></i>
|
||||
Envoyés
|
||||
</Button>
|
||||
</Link>
|
||||
<Link href="/messages/archives">
|
||||
<Button variant="outline">
|
||||
<Archive className="mr-2 h-4 w-4" />
|
||||
<Button outlined>
|
||||
<i className="pi pi-inbox mr-2"></i>
|
||||
Archives
|
||||
</Button>
|
||||
</Link>
|
||||
@@ -166,34 +152,34 @@ export default function MessagesPage() {
|
||||
<Card className="p-4">
|
||||
<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 dans les messages..."
|
||||
className="pl-10"
|
||||
className="w-full"
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<Button
|
||||
variant={filterStatus === "all" ? "default" : "outline"}
|
||||
outlined={filterStatus !== "all"}
|
||||
onClick={() => setFilterStatus("all")}
|
||||
>
|
||||
Tous
|
||||
</Button>
|
||||
<Button
|
||||
variant={filterStatus === "unread" ? "default" : "outline"}
|
||||
outlined={filterStatus !== "unread"}
|
||||
onClick={() => setFilterStatus("unread")}
|
||||
>
|
||||
Non lus ({unreadCount})
|
||||
</Button>
|
||||
<Button
|
||||
variant={filterStatus === "starred" ? "default" : "outline"}
|
||||
outlined={filterStatus !== "starred"}
|
||||
onClick={() => setFilterStatus("starred")}
|
||||
>
|
||||
<Star className="mr-1 h-4 w-4" />
|
||||
<i className="pi pi-star mr-1"></i>
|
||||
Favoris
|
||||
</Button>
|
||||
</div>
|
||||
@@ -209,19 +195,19 @@ export default function MessagesPage() {
|
||||
sélectionné{selectedMessages.length > 1 ? "s" : ""}
|
||||
</span>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
outlined
|
||||
size="small"
|
||||
onClick={() => setSelectedMessages([])}
|
||||
>
|
||||
Tout désélectionner
|
||||
</Button>
|
||||
<div className="flex-1" />
|
||||
<Button variant="outline" size="sm">
|
||||
<Archive className="mr-2 h-4 w-4" />
|
||||
<Button outlined size="small">
|
||||
<i className="pi pi-inbox mr-2"></i>
|
||||
Archiver
|
||||
</Button>
|
||||
<Button variant="outline" size="sm">
|
||||
<Trash2 className="mr-2 h-4 w-4" />
|
||||
<Button outlined size="small">
|
||||
<i className="pi pi-trash mr-2"></i>
|
||||
Supprimer
|
||||
</Button>
|
||||
</div>
|
||||
@@ -257,13 +243,14 @@ export default function MessagesPage() {
|
||||
e.stopPropagation();
|
||||
}}
|
||||
>
|
||||
<Star
|
||||
className={`h-5 w-5 ${
|
||||
<i
|
||||
className={`pi ${
|
||||
message.isStarred
|
||||
? "fill-yellow-400 text-yellow-400"
|
||||
: "text-gray-400"
|
||||
? "pi-star-fill text-yellow-400"
|
||||
: "pi-star text-gray-400"
|
||||
}`}
|
||||
/>
|
||||
style={{ fontSize: '1.25rem' }}
|
||||
></i>
|
||||
</button>
|
||||
|
||||
{/* Contenu du message */}
|
||||
@@ -279,7 +266,7 @@ export default function MessagesPage() {
|
||||
{message.from}
|
||||
</p>
|
||||
{message.hasAttachment && (
|
||||
<Paperclip className="h-4 w-4 text-gray-400" />
|
||||
<i className="pi pi-paperclip text-gray-400"></i>
|
||||
)}
|
||||
</div>
|
||||
<p
|
||||
@@ -303,7 +290,7 @@ export default function MessagesPage() {
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
className="hover:bg-gray-200 rounded p-1"
|
||||
>
|
||||
<MoreVertical className="h-4 w-4 text-gray-400" />
|
||||
<i className="pi pi-ellipsis-v text-gray-400"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -313,7 +300,7 @@ export default function MessagesPage() {
|
||||
))
|
||||
) : (
|
||||
<div className="p-12 text-center">
|
||||
<Mail className="h-12 w-12 text-gray-400 mx-auto mb-4" />
|
||||
<i className="pi pi-envelope text-gray-400 mx-auto mb-4" style={{ fontSize: '3rem' }}></i>
|
||||
<p className="text-gray-500">Aucun message trouvé</p>
|
||||
</div>
|
||||
)}
|
||||
@@ -325,7 +312,7 @@ export default function MessagesPage() {
|
||||
<Card className="p-4">
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="p-3 bg-blue-100 rounded-lg">
|
||||
<Mail className="h-6 w-6 text-blue-600" />
|
||||
<i className="pi pi-envelope text-blue-600" style={{ fontSize: '1.5rem' }}></i>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-2xl font-bold">{messages.length}</p>
|
||||
@@ -336,7 +323,7 @@ export default function MessagesPage() {
|
||||
<Card className="p-4">
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="p-3 bg-orange-100 rounded-lg">
|
||||
<Clock className="h-6 w-6 text-orange-600" />
|
||||
<i className="pi pi-clock text-orange-600" style={{ fontSize: '1.5rem' }}></i>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-2xl font-bold">{unreadCount}</p>
|
||||
@@ -347,7 +334,7 @@ export default function MessagesPage() {
|
||||
<Card className="p-4">
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="p-3 bg-yellow-100 rounded-lg">
|
||||
<Star className="h-6 w-6 text-yellow-600" />
|
||||
<i className="pi pi-star text-yellow-600" style={{ fontSize: '1.5rem' }}></i>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-2xl font-bold">
|
||||
@@ -360,7 +347,7 @@ export default function MessagesPage() {
|
||||
<Card className="p-4">
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="p-3 bg-green-100 rounded-lg">
|
||||
<Send className="h-6 w-6 text-green-600" />
|
||||
<i className="pi pi-send text-green-600" style={{ fontSize: '1.5rem' }}></i>
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-2xl font-bold">12</p>
|
||||
|
||||
Reference in New Issue
Block a user