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,18 +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 {
|
||||
BookOpen,
|
||||
Search,
|
||||
ChevronRight,
|
||||
FileText,
|
||||
Download,
|
||||
ExternalLink,
|
||||
ArrowLeft,
|
||||
} from "lucide-react";
|
||||
import { Card } from "primereact/card";
|
||||
import { Button } from "primereact/button";
|
||||
import { InputText } from "primereact/inputtext";
|
||||
import Link from "next/link";
|
||||
|
||||
/**
|
||||
@@ -112,8 +103,8 @@ export default function DocumentationPage() {
|
||||
<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>
|
||||
@@ -124,8 +115,8 @@ export default function DocumentationPage() {
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<Button variant="outline">
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<Button outlined>
|
||||
<i className="pi pi-download mr-2"></i>
|
||||
Télécharger PDF
|
||||
</Button>
|
||||
</div>
|
||||
@@ -133,13 +124,15 @@ export default function DocumentationPage() {
|
||||
{/* Barre de recherche */}
|
||||
<Card className="p-4">
|
||||
<div className="relative">
|
||||
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" />
|
||||
<Input
|
||||
placeholder="Rechercher dans la documentation..."
|
||||
className="pl-10"
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
<span className="p-input-icon-left w-full">
|
||||
<i className="pi pi-search" />
|
||||
<InputText
|
||||
placeholder="Rechercher dans la documentation..."
|
||||
className="w-full"
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Résultats de recherche */}
|
||||
@@ -159,7 +152,7 @@ export default function DocumentationPage() {
|
||||
<p className="font-medium">{result.article}</p>
|
||||
<p className="text-sm text-gray-500">{result.category}</p>
|
||||
</div>
|
||||
<ChevronRight className="h-4 w-4 text-gray-400" />
|
||||
<i className="pi pi-chevron-right text-gray-400"></i>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
@@ -176,7 +169,7 @@ export default function DocumentationPage() {
|
||||
>
|
||||
<div className="flex items-start gap-4 mb-4">
|
||||
<div className="p-3 bg-blue-100 rounded-lg">
|
||||
<BookOpen className="h-6 w-6 text-blue-600" />
|
||||
<i className="pi pi-book text-blue-600" style={{ fontSize: '1.5rem' }}></i>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="font-semibold text-lg mb-1">{category.title}</h3>
|
||||
@@ -190,20 +183,20 @@ export default function DocumentationPage() {
|
||||
key={index}
|
||||
className="flex items-center gap-2 p-2 hover:bg-gray-50 rounded cursor-pointer group"
|
||||
>
|
||||
<FileText className="h-4 w-4 text-gray-400" />
|
||||
<i className="pi pi-file text-gray-400"></i>
|
||||
<span className="text-sm flex-1">{article}</span>
|
||||
<ExternalLink className="h-3 w-3 text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity" />
|
||||
<i className="pi pi-external-link text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity" style={{ fontSize: '0.75rem' }}></i>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<Button
|
||||
variant="link"
|
||||
link
|
||||
className="mt-4 p-0 h-auto text-blue-600"
|
||||
onClick={() => setSelectedCategory(category.id)}
|
||||
>
|
||||
Voir tous les articles
|
||||
<ChevronRight className="ml-1 h-4 w-4" />
|
||||
<i className="pi pi-chevron-right ml-1"></i>
|
||||
</Button>
|
||||
</Card>
|
||||
))}
|
||||
@@ -213,7 +206,7 @@ export default function DocumentationPage() {
|
||||
<Card className="p-6 bg-gradient-to-r from-blue-50 to-purple-50">
|
||||
<div className="flex items-start gap-4">
|
||||
<div className="p-3 bg-blue-600 rounded-lg">
|
||||
<BookOpen className="h-6 w-6 text-white" />
|
||||
<i className="pi pi-book text-white" style={{ fontSize: '1.5rem' }}></i>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="font-semibold text-lg mb-2">
|
||||
@@ -226,10 +219,10 @@ export default function DocumentationPage() {
|
||||
</p>
|
||||
<div className="flex gap-3">
|
||||
<Button className="bg-blue-600 hover:bg-blue-700">
|
||||
<Download className="mr-2 h-4 w-4" />
|
||||
<i className="pi pi-download mr-2"></i>
|
||||
Télécharger le guide (PDF)
|
||||
</Button>
|
||||
<Button variant="outline">
|
||||
<Button outlined>
|
||||
Voir la version en ligne
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -1,225 +1,287 @@
|
||||
"use client";
|
||||
|
||||
import React from "react";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import {
|
||||
BookOpen,
|
||||
Video,
|
||||
MessageCircle,
|
||||
Search,
|
||||
FileText,
|
||||
HelpCircle,
|
||||
Lightbulb,
|
||||
Phone,
|
||||
Mail,
|
||||
ExternalLink,
|
||||
} from "lucide-react";
|
||||
import React, { useState } from "react";
|
||||
import { Card } from "primereact/card";
|
||||
import { Button } from "primereact/button";
|
||||
import { InputText } from "primereact/inputtext";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
/**
|
||||
* Page principale du centre d'aide
|
||||
* Point d'entrée pour accéder à toute l'aide et la documentation
|
||||
*/
|
||||
export default function AidePage() {
|
||||
const router = useRouter();
|
||||
const [searchTerm, setSearchTerm] = useState("");
|
||||
|
||||
const categories = [
|
||||
{
|
||||
title: "Démarrage rapide",
|
||||
description: "Premiers pas avec BTPXpress",
|
||||
icon: Lightbulb,
|
||||
icon: "pi pi-lightbulb",
|
||||
color: "bg-blue-100 text-blue-600",
|
||||
articles: 12,
|
||||
link: "/aide/documentation",
|
||||
},
|
||||
{
|
||||
title: "Gestion des chantiers",
|
||||
description: "Créer et gérer vos chantiers",
|
||||
icon: FileText,
|
||||
icon: "pi pi-file",
|
||||
color: "bg-green-100 text-green-600",
|
||||
articles: 25,
|
||||
link: "/aide/documentation",
|
||||
},
|
||||
{
|
||||
title: "Facturation",
|
||||
description: "Devis, factures et paiements",
|
||||
icon: BookOpen,
|
||||
icon: "pi pi-book",
|
||||
color: "bg-purple-100 text-purple-600",
|
||||
articles: 18,
|
||||
link: "/aide/documentation",
|
||||
},
|
||||
{
|
||||
title: "Équipes et planning",
|
||||
description: "Gérer vos équipes et plannings",
|
||||
icon: Video,
|
||||
color: "bg-orange-100 text-orange-600",
|
||||
icon: "pi pi-users",
|
||||
color: "bg-yellow-100 text-yellow-600",
|
||||
articles: 15,
|
||||
link: "/aide/documentation",
|
||||
},
|
||||
{
|
||||
title: "Matériel",
|
||||
description: "Gestion du matériel et stock",
|
||||
icon: "pi pi-box",
|
||||
color: "bg-red-100 text-red-600",
|
||||
articles: 10,
|
||||
link: "/aide/documentation",
|
||||
},
|
||||
{
|
||||
title: "Rapports",
|
||||
description: "Générer et analyser vos rapports",
|
||||
icon: "pi pi-chart-bar",
|
||||
color: "bg-indigo-100 text-indigo-600",
|
||||
articles: 8,
|
||||
link: "/aide/documentation",
|
||||
},
|
||||
];
|
||||
|
||||
const articlesPopulaires = [
|
||||
"Comment créer un nouveau chantier ?",
|
||||
"Gérer les devis et les factures",
|
||||
"Planifier l'utilisation du matériel",
|
||||
"Ajouter des membres à une équipe",
|
||||
"Générer des rapports d'activité",
|
||||
const resources = [
|
||||
{
|
||||
title: "Documentation complète",
|
||||
description: "Guides détaillés et tutoriels pas à pas",
|
||||
icon: "pi pi-book",
|
||||
color: "bg-blue-600",
|
||||
link: "/aide/documentation",
|
||||
},
|
||||
{
|
||||
title: "Tutoriels vidéo",
|
||||
description: "Apprenez en vidéo avec nos tutoriels",
|
||||
icon: "pi pi-video",
|
||||
color: "bg-red-600",
|
||||
link: "/aide/tutoriels",
|
||||
},
|
||||
{
|
||||
title: "Support technique",
|
||||
description: "Contactez notre équipe d'assistance",
|
||||
icon: "pi pi-headphones",
|
||||
color: "bg-green-600",
|
||||
link: "/aide/support",
|
||||
},
|
||||
];
|
||||
|
||||
const popularArticles = [
|
||||
{
|
||||
title: "Comment créer votre premier chantier ?",
|
||||
views: 1543,
|
||||
category: "Chantiers",
|
||||
},
|
||||
{
|
||||
title: "Gérer les phases et sous-phases",
|
||||
views: 1234,
|
||||
category: "Chantiers",
|
||||
},
|
||||
{
|
||||
title: "Créer un devis rapidement",
|
||||
views: 1156,
|
||||
category: "Facturation",
|
||||
},
|
||||
{
|
||||
title: "Planifier les équipes efficacement",
|
||||
views: 987,
|
||||
category: "Équipes",
|
||||
},
|
||||
{
|
||||
title: "Exporter vos données",
|
||||
views: 876,
|
||||
category: "Rapports",
|
||||
},
|
||||
];
|
||||
|
||||
const handleSearch = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
if (searchTerm.trim()) {
|
||||
router.push(`/aide/documentation?search=${encodeURIComponent(searchTerm)}`);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="space-y-8 p-6">
|
||||
<div className="space-y-6 p-6">
|
||||
{/* En-tête */}
|
||||
<div className="text-center space-y-4">
|
||||
<h1 className="text-4xl font-bold text-gray-900">
|
||||
Comment pouvons-nous vous aider ?
|
||||
<div className="text-center mb-8">
|
||||
<h1 className="text-4xl font-bold text-gray-900 mb-3">
|
||||
<i className="pi pi-question-circle mr-3"></i>
|
||||
Centre d'aide
|
||||
</h1>
|
||||
<p className="text-lg text-gray-600">
|
||||
Recherchez dans notre base de connaissances ou contactez notre support
|
||||
<p className="text-xl text-gray-600">
|
||||
Comment pouvons-nous vous aider aujourd'hui ?
|
||||
</p>
|
||||
<div className="max-w-2xl mx-auto">
|
||||
<div className="relative">
|
||||
<Search className="absolute left-4 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400" />
|
||||
<Input
|
||||
</div>
|
||||
|
||||
{/* Barre de recherche */}
|
||||
<Card className="mb-6">
|
||||
<form onSubmit={handleSearch}>
|
||||
<div className="p-inputgroup flex-1">
|
||||
<span className="p-inputgroup-addon">
|
||||
<i className="pi pi-search"></i>
|
||||
</span>
|
||||
<InputText
|
||||
placeholder="Rechercher dans l'aide..."
|
||||
className="pl-12 h-12 text-lg"
|
||||
value={searchTerm}
|
||||
onChange={(e) => setSearchTerm(e.target.value)}
|
||||
className="w-full"
|
||||
style={{ fontSize: '1.1rem', padding: '1rem' }}
|
||||
/>
|
||||
<Button
|
||||
label="Rechercher"
|
||||
type="submit"
|
||||
icon="pi pi-search"
|
||||
className="bg-blue-600 hover:bg-blue-700"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</Card>
|
||||
|
||||
{/* Accès rapide */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<Link href="/aide/documentation">
|
||||
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
|
||||
<div className="flex items-start gap-4">
|
||||
<div className="p-3 bg-blue-100 rounded-lg">
|
||||
<BookOpen className="h-6 w-6 text-blue-600" />
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="font-semibold text-lg mb-2">Documentation</h3>
|
||||
<p className="text-sm text-gray-600">
|
||||
Guides complets et documentation technique
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Link>
|
||||
|
||||
<Link href="/aide/tutoriels">
|
||||
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
|
||||
<div className="flex items-start gap-4">
|
||||
<div className="p-3 bg-green-100 rounded-lg">
|
||||
<Video className="h-6 w-6 text-green-600" />
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="font-semibold text-lg mb-2">Tutoriels</h3>
|
||||
<p className="text-sm text-gray-600">
|
||||
Vidéos et guides pas-à-pas
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Link>
|
||||
|
||||
<Link href="/aide/support">
|
||||
<Card className="p-6 hover:shadow-lg transition-shadow cursor-pointer">
|
||||
<div className="flex items-start gap-4">
|
||||
<div className="p-3 bg-purple-100 rounded-lg">
|
||||
<MessageCircle className="h-6 w-6 text-purple-600" />
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="font-semibold text-lg mb-2">Support</h3>
|
||||
<p className="text-sm text-gray-600">
|
||||
Contactez notre équipe d'assistance
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
{/* Catégories populaires */}
|
||||
<div>
|
||||
<h2 className="text-2xl font-bold text-gray-900 mb-6">
|
||||
Catégories populaires
|
||||
</h2>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
||||
{categories.map((category) => (
|
||||
<Card
|
||||
key={category.title}
|
||||
className="p-6 hover:shadow-lg transition-shadow cursor-pointer"
|
||||
>
|
||||
<div className={`p-3 ${category.color} rounded-lg w-fit mb-4`}>
|
||||
<category.icon className="h-6 w-6" />
|
||||
</div>
|
||||
<h3 className="font-semibold text-lg mb-2">{category.title}</h3>
|
||||
<p className="text-sm text-gray-600 mb-4">{category.description}</p>
|
||||
<p className="text-sm text-blue-600 font-medium">
|
||||
{category.articles} articles
|
||||
</p>
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Articles populaires */}
|
||||
<div>
|
||||
<h2 className="text-2xl font-bold text-gray-900 mb-6">
|
||||
Articles populaires
|
||||
</h2>
|
||||
<Card>
|
||||
<div className="divide-y">
|
||||
{articlesPopulaires.map((article, index) => (
|
||||
<div
|
||||
key={index}
|
||||
className="p-4 hover:bg-gray-50 cursor-pointer flex items-center justify-between group"
|
||||
>
|
||||
<div className="flex items-center gap-3">
|
||||
<HelpCircle className="h-5 w-5 text-gray-400" />
|
||||
<span className="text-gray-900">{article}</span>
|
||||
{/* Ressources principales */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
|
||||
{resources.map((resource, index) => (
|
||||
<Link key={index} href={resource.link}>
|
||||
<Card className="hover:shadow-lg transition-shadow cursor-pointer h-full">
|
||||
<div className="flex flex-column align-items-center text-center">
|
||||
<div
|
||||
className={`${resource.color} text-white border-round`}
|
||||
style={{ padding: '1.5rem', marginBottom: '1rem' }}
|
||||
>
|
||||
<i className={`${resource.icon} text-4xl`}></i>
|
||||
</div>
|
||||
<ExternalLink className="h-4 w-4 text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity" />
|
||||
<h3 className="text-xl font-bold mb-2">{resource.title}</h3>
|
||||
<p className="text-gray-600">{resource.description}</p>
|
||||
<Button
|
||||
label="Accéder"
|
||||
icon="pi pi-arrow-right"
|
||||
className="mt-3"
|
||||
outlined
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</Card>
|
||||
</Card>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Contact direct */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<Card className="p-6 bg-blue-50 border-blue-200">
|
||||
<div className="flex items-start gap-4">
|
||||
<div className="p-3 bg-blue-600 rounded-lg">
|
||||
<Phone className="h-6 w-6 text-white" />
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
|
||||
{/* Catégories */}
|
||||
<div className="lg:col-span-2">
|
||||
<Card>
|
||||
<h2 className="text-2xl font-semibold mb-4">
|
||||
<i className="pi pi-th-large mr-2"></i>
|
||||
Parcourir par catégorie
|
||||
</h2>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
{categories.map((category, index) => (
|
||||
<Link key={index} href={category.link}>
|
||||
<div className="p-4 border border-gray-200 rounded hover:shadow-md transition-shadow cursor-pointer">
|
||||
<div className="flex align-items-start gap-3">
|
||||
<div className={`${category.color} border-round p-3`}>
|
||||
<i className={`${category.icon} text-2xl`}></i>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="font-semibold text-lg mb-1">
|
||||
{category.title}
|
||||
</h3>
|
||||
<p className="text-sm text-gray-600 mb-2">
|
||||
{category.description}
|
||||
</p>
|
||||
<span className="text-xs text-gray-500">
|
||||
{category.articles} articles
|
||||
</span>
|
||||
</div>
|
||||
<i className="pi pi-chevron-right text-gray-400"></i>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="font-semibold text-lg mb-2 text-blue-900">
|
||||
Support téléphonique
|
||||
</h3>
|
||||
<p className="text-sm text-blue-700 mb-3">
|
||||
Disponible du lundi au vendredi de 9h à 18h
|
||||
</p>
|
||||
<Button className="bg-blue-600 hover:bg-blue-700">
|
||||
+33 1 23 45 67 89
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
<Card className="p-6 bg-green-50 border-green-200">
|
||||
<div className="flex items-start gap-4">
|
||||
<div className="p-3 bg-green-600 rounded-lg">
|
||||
<Mail className="h-6 w-6 text-white" />
|
||||
{/* Sidebar */}
|
||||
<div className="space-y-6">
|
||||
{/* Articles populaires */}
|
||||
<Card>
|
||||
<h3 className="text-xl font-semibold mb-4">
|
||||
<i className="pi pi-star mr-2"></i>
|
||||
Articles populaires
|
||||
</h3>
|
||||
<div className="space-y-3">
|
||||
{popularArticles.map((article, index) => (
|
||||
<div
|
||||
key={index}
|
||||
className="p-3 bg-gray-50 rounded hover:bg-gray-100 cursor-pointer transition-colors"
|
||||
>
|
||||
<h4 className="font-medium text-sm mb-1">{article.title}</h4>
|
||||
<div className="flex justify-content-between align-items-center text-xs text-gray-500">
|
||||
<span className="bg-gray-200 px-2 py-1 rounded">
|
||||
{article.category}
|
||||
</span>
|
||||
<span>
|
||||
<i className="pi pi-eye mr-1"></i>
|
||||
{article.views.toLocaleString()}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="font-semibold text-lg mb-2 text-green-900">
|
||||
Support par email
|
||||
</h3>
|
||||
<p className="text-sm text-green-700 mb-3">
|
||||
Réponse sous 24h ouvrées
|
||||
</Card>
|
||||
|
||||
{/* Contact */}
|
||||
<Card className="bg-gradient-to-br from-blue-50 to-blue-100">
|
||||
<div className="text-center">
|
||||
<div className="bg-blue-600 text-white border-round inline-block p-3 mb-3">
|
||||
<i className="pi pi-phone text-2xl"></i>
|
||||
</div>
|
||||
<h3 className="font-semibold text-lg mb-2">Besoin d'aide ?</h3>
|
||||
<p className="text-sm text-gray-700 mb-3">
|
||||
Notre équipe est disponible pour vous assister
|
||||
</p>
|
||||
<Button className="bg-green-600 hover:bg-green-700">
|
||||
support@btpxpress.fr
|
||||
</Button>
|
||||
<div className="space-y-2">
|
||||
<div className="text-sm">
|
||||
<i className="pi pi-phone mr-2"></i>
|
||||
<span className="font-semibold">+33 1 23 45 67 89</span>
|
||||
</div>
|
||||
<div className="text-sm">
|
||||
<i className="pi pi-envelope mr-2"></i>
|
||||
<span className="font-semibold">support@btpxpress.fr</span>
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
label="Contacter le support"
|
||||
icon="pi pi-send"
|
||||
className="mt-3 w-full"
|
||||
onClick={() => router.push('/aide/support')}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,23 +1,11 @@
|
||||
"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 { Badge } from "@/components/ui/badge";
|
||||
import {
|
||||
MessageCircle,
|
||||
Phone,
|
||||
Mail,
|
||||
Clock,
|
||||
CheckCircle,
|
||||
AlertCircle,
|
||||
Send,
|
||||
ArrowLeft,
|
||||
Headphones,
|
||||
} from "lucide-react";
|
||||
import { Card } from "primereact/card";
|
||||
import { Button } from "primereact/button";
|
||||
import { InputText } from "primereact/inputtext";
|
||||
import { InputTextarea } from "primereact/inputtextarea";
|
||||
import { Tag } from "primereact/tag";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
@@ -71,24 +59,24 @@ export default function SupportPage() {
|
||||
},
|
||||
];
|
||||
|
||||
const getStatusBadge = (status: string) => {
|
||||
const getStatusTag = (status: string) => {
|
||||
switch (status) {
|
||||
case "resolved":
|
||||
return (
|
||||
<Badge className="bg-green-100 text-green-800">
|
||||
<CheckCircle className="h-3 w-3 mr-1" />
|
||||
<Tag severity="success">
|
||||
<i className="pi pi-check-circle mr-1"></i>
|
||||
Résolu
|
||||
</Badge>
|
||||
</Tag>
|
||||
);
|
||||
case "in-progress":
|
||||
return (
|
||||
<Badge className="bg-blue-100 text-blue-800">
|
||||
<Clock className="h-3 w-3 mr-1" />
|
||||
<Tag severity="info">
|
||||
<i className="pi pi-clock mr-1"></i>
|
||||
En cours
|
||||
</Badge>
|
||||
</Tag>
|
||||
);
|
||||
default:
|
||||
return <Badge>Nouveau</Badge>;
|
||||
return <Tag>Nouveau</Tag>;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -98,8 +86,8 @@ export default function SupportPage() {
|
||||
<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>
|
||||
@@ -120,8 +108,8 @@ export default function SupportPage() {
|
||||
<form onSubmit={handleSubmit} className="space-y-4">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<Label htmlFor="nom">Nom complet *</Label>
|
||||
<Input
|
||||
<label htmlFor="nom" className="block mb-2">Nom complet *</label>
|
||||
<InputText
|
||||
id="nom"
|
||||
name="nom"
|
||||
type="text"
|
||||
@@ -129,12 +117,12 @@ export default function SupportPage() {
|
||||
value={formData.nom}
|
||||
onChange={handleChange}
|
||||
required
|
||||
className="mt-2"
|
||||
className="w-full"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<Label htmlFor="email">Email *</Label>
|
||||
<Input
|
||||
<label htmlFor="email" className="block mb-2">Email *</label>
|
||||
<InputText
|
||||
id="email"
|
||||
name="email"
|
||||
type="email"
|
||||
@@ -142,14 +130,14 @@ export default function SupportPage() {
|
||||
value={formData.email}
|
||||
onChange={handleChange}
|
||||
required
|
||||
className="mt-2"
|
||||
className="w-full"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="sujet">Sujet *</Label>
|
||||
<Input
|
||||
<label htmlFor="sujet" className="block mb-2">Sujet *</label>
|
||||
<InputText
|
||||
id="sujet"
|
||||
name="sujet"
|
||||
type="text"
|
||||
@@ -157,18 +145,18 @@ export default function SupportPage() {
|
||||
value={formData.sujet}
|
||||
onChange={handleChange}
|
||||
required
|
||||
className="mt-2"
|
||||
className="w-full"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="priorite">Priorité</Label>
|
||||
<label htmlFor="priorite" className="block mb-2">Priorité</label>
|
||||
<select
|
||||
id="priorite"
|
||||
name="priorite"
|
||||
value={formData.priorite}
|
||||
onChange={handleChange}
|
||||
className="mt-2 w-full border border-gray-300 rounded-md p-2"
|
||||
className="w-full border border-gray-300 rounded-md p-2"
|
||||
>
|
||||
<option value="basse">Basse</option>
|
||||
<option value="normale">Normale</option>
|
||||
@@ -178,8 +166,8 @@ export default function SupportPage() {
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="message">Description du problème *</Label>
|
||||
<Textarea
|
||||
<label htmlFor="message" className="block mb-2">Description du problème *</label>
|
||||
<InputTextarea
|
||||
id="message"
|
||||
name="message"
|
||||
placeholder="Décrivez votre problème en détail..."
|
||||
@@ -187,7 +175,7 @@ export default function SupportPage() {
|
||||
onChange={handleChange}
|
||||
required
|
||||
rows={8}
|
||||
className="mt-2"
|
||||
className="w-full"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -196,7 +184,7 @@ export default function SupportPage() {
|
||||
className="w-full 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 le ticket"}
|
||||
</Button>
|
||||
</form>
|
||||
@@ -217,7 +205,7 @@ export default function SupportPage() {
|
||||
<span className="font-mono text-sm text-gray-600">
|
||||
{ticket.id}
|
||||
</span>
|
||||
{getStatusBadge(ticket.status)}
|
||||
{getStatusTag(ticket.status)}
|
||||
</div>
|
||||
<p className="font-medium mt-1">{ticket.sujet}</p>
|
||||
<p className="text-sm text-gray-500">
|
||||
@@ -242,7 +230,7 @@ export default function SupportPage() {
|
||||
<Card className="p-6">
|
||||
<div className="flex items-center gap-3 mb-4">
|
||||
<div className="p-3 bg-blue-100 rounded-lg">
|
||||
<Headphones className="h-6 w-6 text-blue-600" />
|
||||
<i className="pi pi-headphones text-blue-600" style={{ fontSize: '1.5rem' }}></i>
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="font-semibold">Support disponible</h3>
|
||||
@@ -251,7 +239,7 @@ export default function SupportPage() {
|
||||
</div>
|
||||
<div className="space-y-3 text-sm">
|
||||
<div className="flex items-center gap-2">
|
||||
<Clock className="h-4 w-4 text-gray-400" />
|
||||
<i className="pi pi-clock text-gray-400"></i>
|
||||
<span>9h00 - 18h00 (CET)</span>
|
||||
</div>
|
||||
<p className="text-xs text-gray-500">
|
||||
@@ -264,7 +252,7 @@ export default function SupportPage() {
|
||||
<Card className="p-6 bg-blue-50 border-blue-200">
|
||||
<div className="flex items-start gap-3">
|
||||
<div className="p-3 bg-blue-600 rounded-lg">
|
||||
<Phone className="h-5 w-5 text-white" />
|
||||
<i className="pi pi-phone text-white" style={{ fontSize: '1.25rem' }}></i>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="font-semibold text-blue-900 mb-1">
|
||||
@@ -274,8 +262,7 @@ export default function SupportPage() {
|
||||
Pour une assistance immédiate
|
||||
</p>
|
||||
<Button
|
||||
variant="default"
|
||||
size="sm"
|
||||
size="small"
|
||||
className="bg-blue-600 hover:bg-blue-700 w-full"
|
||||
>
|
||||
+33 1 23 45 67 89
|
||||
@@ -288,14 +275,13 @@ export default function SupportPage() {
|
||||
<Card className="p-6 bg-green-50 border-green-200">
|
||||
<div className="flex items-start gap-3">
|
||||
<div className="p-3 bg-green-600 rounded-lg">
|
||||
<Mail className="h-5 w-5 text-white" />
|
||||
<i className="pi pi-envelope text-white" style={{ fontSize: '1.25rem' }}></i>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="font-semibold text-green-900 mb-1">Email support</h3>
|
||||
<p className="text-sm text-green-700 mb-2">Réponse sous 24h</p>
|
||||
<Button
|
||||
variant="default"
|
||||
size="sm"
|
||||
size="small"
|
||||
className="bg-green-600 hover:bg-green-700 w-full"
|
||||
>
|
||||
support@btpxpress.fr
|
||||
@@ -308,7 +294,7 @@ export default function SupportPage() {
|
||||
<Card className="p-6 bg-purple-50 border-purple-200">
|
||||
<div className="flex items-start gap-3">
|
||||
<div className="p-3 bg-purple-600 rounded-lg">
|
||||
<MessageCircle className="h-5 w-5 text-white" />
|
||||
<i className="pi pi-comments text-white" style={{ fontSize: '1.25rem' }}></i>
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="font-semibold text-purple-900 mb-1">
|
||||
@@ -318,8 +304,7 @@ export default function SupportPage() {
|
||||
Discutez avec un agent
|
||||
</p>
|
||||
<Button
|
||||
variant="default"
|
||||
size="sm"
|
||||
size="small"
|
||||
className="bg-purple-600 hover:bg-purple-700 w-full"
|
||||
>
|
||||
Démarrer le chat
|
||||
@@ -331,7 +316,7 @@ export default function SupportPage() {
|
||||
{/* Note importante */}
|
||||
<Card className="p-4 bg-yellow-50 border-yellow-200">
|
||||
<div className="flex items-start gap-2">
|
||||
<AlertCircle className="h-5 w-5 text-yellow-600 flex-shrink-0 mt-0.5" />
|
||||
<i className="pi pi-exclamation-circle text-yellow-600 flex-shrink-0 mt-0.5" style={{ fontSize: '1.25rem' }}></i>
|
||||
<div className="flex-1">
|
||||
<p className="text-sm text-yellow-800">
|
||||
Pour les urgences critiques affectant votre production, appelez
|
||||
|
||||
@@ -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