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,12 +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 { Textarea } from "@/components/ui/textarea";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Send, Paperclip, X, ArrowLeft } from "lucide-react";
|
||||
import { Card } from "primereact/card";
|
||||
import { Button } from "primereact/button";
|
||||
import { InputText } from "primereact/inputtext";
|
||||
import { InputTextarea } from "primereact/inputtextarea";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
@@ -48,8 +46,8 @@ export default function NouveauMessagePage() {
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-4">
|
||||
<Link href="/messages">
|
||||
<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
|
||||
</Button>
|
||||
</Link>
|
||||
@@ -63,61 +61,61 @@ export default function NouveauMessagePage() {
|
||||
<Card className="p-6">
|
||||
<form onSubmit={handleSubmit} className="space-y-6">
|
||||
<div>
|
||||
<Label htmlFor="destinataire">Destinataire *</Label>
|
||||
<Input
|
||||
<label htmlFor="destinataire" className="block mb-2">Destinataire *</label>
|
||||
<InputText
|
||||
id="destinataire"
|
||||
type="email"
|
||||
placeholder="email@exemple.com"
|
||||
value={destinataire}
|
||||
onChange={(e) => setDestinataire(e.target.value)}
|
||||
required
|
||||
className="mt-2"
|
||||
className="w-full"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="sujet">Sujet *</Label>
|
||||
<Input
|
||||
<label htmlFor="sujet" className="block mb-2">Sujet *</label>
|
||||
<InputText
|
||||
id="sujet"
|
||||
type="text"
|
||||
placeholder="Objet du message"
|
||||
value={sujet}
|
||||
onChange={(e) => setSujet(e.target.value)}
|
||||
required
|
||||
className="mt-2"
|
||||
className="w-full"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="message">Message *</Label>
|
||||
<Textarea
|
||||
<label htmlFor="message" className="block mb-2">Message *</label>
|
||||
<InputTextarea
|
||||
id="message"
|
||||
placeholder="Tapez votre message ici..."
|
||||
value={message}
|
||||
onChange={(e) => setMessage(e.target.value)}
|
||||
required
|
||||
rows={12}
|
||||
className="mt-2"
|
||||
className="w-full"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label>Pièces jointes</Label>
|
||||
<div className="mt-2 space-y-2">
|
||||
<label className="block mb-2">Pièces jointes</label>
|
||||
<div className="space-y-2">
|
||||
{fichiers.map((file, index) => (
|
||||
<div
|
||||
key={index}
|
||||
className="flex items-center gap-2 p-2 bg-gray-50 rounded"
|
||||
>
|
||||
<Paperclip className="h-4 w-4 text-gray-400" />
|
||||
<i className="pi pi-paperclip text-gray-400"></i>
|
||||
<span className="text-sm flex-1">{file.name}</span>
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
text
|
||||
size="small"
|
||||
onClick={() => removeFile(index)}
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
<i className="pi pi-times"></i>
|
||||
</Button>
|
||||
</div>
|
||||
))}
|
||||
@@ -130,10 +128,10 @@ export default function NouveauMessagePage() {
|
||||
/>
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
outlined
|
||||
onClick={() => document.getElementById("file-upload")?.click()}
|
||||
>
|
||||
<Paperclip className="mr-2 h-4 w-4" />
|
||||
<i className="pi pi-paperclip mr-2"></i>
|
||||
Ajouter une pièce jointe
|
||||
</Button>
|
||||
</div>
|
||||
@@ -145,11 +143,11 @@ export default function NouveauMessagePage() {
|
||||
className="bg-blue-600 hover:bg-blue-700"
|
||||
disabled={isSubmitting}
|
||||
>
|
||||
<Send className="mr-2 h-4 w-4" />
|
||||
<i className="pi pi-send mr-2"></i>
|
||||
{isSubmitting ? "Envoi en cours..." : "Envoyer"}
|
||||
</Button>
|
||||
<Link href="/messages">
|
||||
<Button type="button" variant="outline">
|
||||
<Button type="button" outlined>
|
||||
Annuler
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user