Add src/app/dashboard/page.tsx
This commit is contained in:
57
src/app/dashboard/page.tsx
Normal file
57
src/app/dashboard/page.tsx
Normal file
@@ -0,0 +1,57 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
|
||||
import { CheckCircle, Clock, AlertCircle } from "lucide-react";
|
||||
|
||||
export default function DashboardPage() {
|
||||
const [quotes, setQuotes] = useState([
|
||||
{ id: "Q001", client: "Entreprise A", service: "Web Design", status: "En attente" },
|
||||
{ id: "Q002", client: "Entreprise B", service: "Stratégie SEO", status: "En cours" },
|
||||
{ id: "Q003", client: "Entreprise C", service: "Avis Google", status: "Terminé" },
|
||||
]);
|
||||
|
||||
const updateStatus = (id: string, newStatus: string) => {
|
||||
setQuotes(quotes.map(q => q.id === id ? { ...q, status: newStatus } : q));
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<NavbarStyleApple
|
||||
navItems={[
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Dashboard", id: "/dashboard" }
|
||||
]}
|
||||
brandName="MAXORA"
|
||||
/>
|
||||
<main className="container mx-auto py-20 px-6">
|
||||
<h1 className="text-4xl font-bold mb-10">Gestion des Devis</h1>
|
||||
<div className="grid gap-6">
|
||||
{quotes.map((quote) => (
|
||||
<div key={quote.id} className="p-6 border rounded-lg flex justify-between items-center bg-card">
|
||||
<div>
|
||||
<h3 className="font-bold text-lg">{quote.client}</h3>
|
||||
<p className="text-sm opacity-70">{quote.service} • ID: {quote.id}</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-4">
|
||||
<span className={`px-3 py-1 rounded-full text-xs font-semibold ${quote.status === 'Terminé' ? 'bg-green-500/20' : 'bg-yellow-500/20'}`}>
|
||||
{quote.status}
|
||||
</span>
|
||||
<select
|
||||
onChange={(e) => updateStatus(quote.id, e.target.value)}
|
||||
className="bg-background border rounded px-2 py-1 text-sm"
|
||||
value={quote.status}
|
||||
>
|
||||
<option value="En attente">En attente</option>
|
||||
<option value="En cours">En cours</option>
|
||||
<option value="Terminé">Terminé</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</main>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user