diff --git a/__tests__/components/ui/PrizeCard.test.tsx b/__tests__/components/ui/PrizeCard.test.tsx index 6445ad7..68f93c8 100644 --- a/__tests__/components/ui/PrizeCard.test.tsx +++ b/__tests__/components/ui/PrizeCard.test.tsx @@ -45,15 +45,15 @@ describe('PrizeCard', () => { const { container } = render(); const card = container.firstChild; - expect(card).toHaveClass('border-[#e5e4dc]'); - expect(card).not.toHaveClass('border-[#d4a574]'); + expect(card).toHaveClass('border-beige-300'); + expect(card).not.toHaveClass('border-primary-500'); }); it('should render with grand prix styling when isGrandPrix is true', () => { const { container } = render(); const card = container.firstChild; - expect(card).toHaveClass('border-[#d4a574]'); + expect(card).toHaveClass('border-primary-500'); }); it('should apply custom className', () => { diff --git a/__tests__/utils/theme.test.ts b/__tests__/utils/theme.test.ts index c12e91a..ee13353 100644 --- a/__tests__/utils/theme.test.ts +++ b/__tests__/utils/theme.test.ts @@ -21,32 +21,32 @@ import { describe('Theme Utility', () => { describe('Constants', () => { it('should have all status colors defined', () => { - expect(STATUS_COLORS.PENDING).toBe('bg-yellow-100 text-yellow-800'); - expect(STATUS_COLORS.CLAIMED).toBe('bg-green-100 text-green-800'); + expect(STATUS_COLORS.PENDING).toBe('bg-secondary-100 text-secondary-800'); + expect(STATUS_COLORS.CLAIMED).toBe('bg-primary-100 text-primary-800'); expect(STATUS_COLORS.REJECTED).toBe('bg-red-100 text-red-800'); - expect(STATUS_COLORS.ACTIVE).toBe('bg-green-100 text-green-800'); + expect(STATUS_COLORS.ACTIVE).toBe('bg-primary-100 text-primary-800'); expect(STATUS_COLORS.INACTIVE).toBe('bg-gray-100 text-gray-800'); expect(STATUS_COLORS.EXPIRED).toBe('bg-red-100 text-red-800'); }); it('should have all badge colors defined', () => { expect(BADGE_COLORS.info).toBe('bg-blue-100 text-blue-800'); - expect(BADGE_COLORS.success).toBe('bg-green-100 text-green-800'); - expect(BADGE_COLORS.warning).toBe('bg-yellow-100 text-yellow-800'); + expect(BADGE_COLORS.success).toBe('bg-primary-100 text-primary-800'); + expect(BADGE_COLORS.warning).toBe('bg-secondary-100 text-secondary-800'); expect(BADGE_COLORS.error).toBe('bg-red-100 text-red-800'); expect(BADGE_COLORS.purple).toBe('bg-purple-100 text-purple-800'); expect(BADGE_COLORS.pink).toBe('bg-pink-100 text-pink-800'); - expect(BADGE_COLORS.amber).toBe('bg-amber-100 text-amber-800'); + expect(BADGE_COLORS.amber).toBe('bg-secondary-200 text-secondary-800'); expect(BADGE_COLORS.gray).toBe('bg-gray-100 text-gray-800'); }); it('should have all button styles defined', () => { - expect(BUTTON_STYLES.primary).toContain('bg-blue-600'); - expect(BUTTON_STYLES.secondary).toContain('bg-gray-600'); - expect(BUTTON_STYLES.success).toContain('bg-green-600'); + expect(BUTTON_STYLES.primary).toContain('bg-primary-500'); + expect(BUTTON_STYLES.secondary).toContain('bg-secondary-500'); + expect(BUTTON_STYLES.success).toContain('bg-primary-500'); expect(BUTTON_STYLES.danger).toContain('bg-red-600'); - expect(BUTTON_STYLES.warning).toContain('bg-yellow-600'); - expect(BUTTON_STYLES.outline).toContain('border-blue-600'); + expect(BUTTON_STYLES.warning).toContain('bg-secondary-400'); + expect(BUTTON_STYLES.outline).toContain('border-primary-500'); expect(BUTTON_STYLES.ghost).toContain('text-gray-600'); }); @@ -74,28 +74,28 @@ describe('Theme Utility', () => { it('should have role colors defined', () => { expect(ROLE_COLORS.ADMIN).toBe('bg-red-100 text-red-800'); expect(ROLE_COLORS.EMPLOYEE).toBe('bg-blue-100 text-blue-800'); - expect(ROLE_COLORS.CLIENT).toBe('bg-green-100 text-green-800'); + expect(ROLE_COLORS.CLIENT).toBe('bg-primary-100 text-primary-800'); }); it('should have prize colors defined', () => { expect(PRIZE_COLORS.INFUSEUR).toBe('bg-blue-100 text-blue-800'); - expect(PRIZE_COLORS.THE_SIGNATURE).toBe('bg-green-100 text-green-800'); + expect(PRIZE_COLORS.THE_SIGNATURE).toBe('bg-primary-100 text-primary-800'); expect(PRIZE_COLORS.COFFRET_DECOUVERTE).toBe('bg-purple-100 text-purple-800'); - expect(PRIZE_COLORS.COFFRET_PRESTIGE).toBe('bg-amber-100 text-amber-800'); + expect(PRIZE_COLORS.COFFRET_PRESTIGE).toBe('bg-secondary-200 text-secondary-800'); expect(PRIZE_COLORS.THE_GRATUIT).toBe('bg-pink-100 text-pink-800'); }); }); describe('getStatusColor', () => { it('should return correct color for known statuses', () => { - expect(getStatusColor('PENDING')).toBe('bg-yellow-100 text-yellow-800'); - expect(getStatusColor('CLAIMED')).toBe('bg-green-100 text-green-800'); + expect(getStatusColor('PENDING')).toBe('bg-secondary-100 text-secondary-800'); + expect(getStatusColor('CLAIMED')).toBe('bg-primary-100 text-primary-800'); expect(getStatusColor('REJECTED')).toBe('bg-red-100 text-red-800'); }); it('should handle lowercase statuses', () => { - expect(getStatusColor('pending')).toBe('bg-yellow-100 text-yellow-800'); - expect(getStatusColor('claimed')).toBe('bg-green-100 text-green-800'); + expect(getStatusColor('pending')).toBe('bg-secondary-100 text-secondary-800'); + expect(getStatusColor('claimed')).toBe('bg-primary-100 text-primary-800'); }); it('should return gray for unknown statuses', () => { @@ -106,16 +106,16 @@ describe('Theme Utility', () => { describe('getButtonStyle', () => { it('should return primary style by default', () => { - expect(getButtonStyle()).toContain('bg-blue-600'); + expect(getButtonStyle()).toContain('bg-primary-500'); }); it('should return correct style for variant', () => { - expect(getButtonStyle('primary')).toContain('bg-blue-600'); - expect(getButtonStyle('secondary')).toContain('bg-gray-600'); - expect(getButtonStyle('success')).toContain('bg-green-600'); + expect(getButtonStyle('primary')).toContain('bg-primary-500'); + expect(getButtonStyle('secondary')).toContain('bg-secondary-500'); + expect(getButtonStyle('success')).toContain('bg-primary-500'); expect(getButtonStyle('danger')).toContain('bg-red-600'); - expect(getButtonStyle('warning')).toContain('bg-yellow-600'); - expect(getButtonStyle('outline')).toContain('border-blue-600'); + expect(getButtonStyle('warning')).toContain('bg-secondary-400'); + expect(getButtonStyle('outline')).toContain('border-primary-500'); expect(getButtonStyle('ghost')).toContain('text-gray-600'); }); }); @@ -140,13 +140,13 @@ describe('Theme Utility', () => { it('should return correct color for known roles', () => { expect(getRoleColor('ADMIN')).toBe('bg-red-100 text-red-800'); expect(getRoleColor('EMPLOYEE')).toBe('bg-blue-100 text-blue-800'); - expect(getRoleColor('CLIENT')).toBe('bg-green-100 text-green-800'); + expect(getRoleColor('CLIENT')).toBe('bg-primary-100 text-primary-800'); }); it('should handle lowercase roles', () => { expect(getRoleColor('admin')).toBe('bg-red-100 text-red-800'); expect(getRoleColor('employee')).toBe('bg-blue-100 text-blue-800'); - expect(getRoleColor('client')).toBe('bg-green-100 text-green-800'); + expect(getRoleColor('client')).toBe('bg-primary-100 text-primary-800'); }); it('should return gray for unknown roles', () => { @@ -157,9 +157,9 @@ describe('Theme Utility', () => { describe('getPrizeColor', () => { it('should return correct color for known prize types', () => { expect(getPrizeColor('INFUSEUR')).toBe('bg-blue-100 text-blue-800'); - expect(getPrizeColor('THE_SIGNATURE')).toBe('bg-green-100 text-green-800'); + expect(getPrizeColor('THE_SIGNATURE')).toBe('bg-primary-100 text-primary-800'); expect(getPrizeColor('COFFRET_DECOUVERTE')).toBe('bg-purple-100 text-purple-800'); - expect(getPrizeColor('COFFRET_PRESTIGE')).toBe('bg-amber-100 text-amber-800'); + expect(getPrizeColor('COFFRET_PRESTIGE')).toBe('bg-secondary-200 text-secondary-800'); expect(getPrizeColor('THE_GRATUIT')).toBe('bg-pink-100 text-pink-800'); }); diff --git a/app/about/page.tsx b/app/about/page.tsx index a81c5f9..b10fa79 100644 --- a/app/about/page.tsx +++ b/app/about/page.tsx @@ -8,15 +8,15 @@ import { Leaf } from "lucide-react"; export default function AboutPage() { return ( -
+
{/* Hero Section */} -
+
-

+

À propos de Thé Tip Top à Nice

-

+

Notre passion pour le thé d'exception et nos événements uniques à Nice

@@ -29,9 +29,9 @@ export default function AboutPage() {
{/* Texte */}
-

+

Notre Histoire - + Thé Tip Top Nice

@@ -66,30 +66,30 @@ export default function AboutPage() {
-

Notre Engagement - Thé Tip Top

-

Qualité, Durabilité et Respect au Cœur de Chaque Thé

+

Notre Engagement - Thé Tip Top

+

Qualité, Durabilité et Respect au Cœur de Chaque Thé

-
-
+
+
-
Thé bio
-

+

Thé bio
+

Tous nos thés sont certifiés biologiques et cultivés dans le respect de l'environnement.

-
-
🌍
-
Commerce équitable
-

+

+
🌍
+
Commerce équitable
+

Nous soutenons les producteurs locaux en collaborant avec des partenaires engagés dans des pratiques durables et équitables

-
-
📦
-
Livraison rapide
-

+

+
📦
+
Livraison rapide
+

Expédition sous 24h pour que vous puissiez savourer rapidement vos thés

@@ -102,26 +102,26 @@ export default function AboutPage() {
-

+

"Le thé, un art de vivre, une invitation à la découverte."

-

Philosophie de Thé Tip Top

+

Philosophie de Thé Tip Top

{/* Contact Section */} -
+
-

Contactez-nous

-

+

Contactez-nous

+

Une question sur notre histoire ou nos thés ? N'hésitez pas à nous écrire !

✉️ thetiptopgr3@gmail.com diff --git a/app/admin/dashboard/page.tsx b/app/admin/dashboard/page.tsx index fa4a890..e76ef16 100644 --- a/app/admin/dashboard/page.tsx +++ b/app/admin/dashboard/page.tsx @@ -187,6 +187,12 @@ export default function AdminDashboardAdvanced() { { name: "Admins", value: stats.users.admins || 0, color: "#3b82f6" }, ].filter(item => item.value > 0); + // Données pour le graphique des clients actifs/inactifs + const clientStatusData = [ + { name: "Actifs", value: stats.users.activeClients || 0, color: "#10b981" }, + { name: "Inactifs", value: stats.users.inactiveClients || 0, color: "#ef4444" }, + ].filter(item => item.value > 0); + const ticketDistributedPercent = stats.tickets.total > 0 ? ((stats.tickets.distributed / stats.tickets.total) * 100).toFixed(1) : 0; @@ -389,6 +395,39 @@ export default function AdminDashboardAdvanced() {
)} + {/* Graphique Clients Actifs/Inactifs */} + {clientStatusData.length > 0 && ( +
+

+
+ +
+ Statut des Clients +

+ + + `${name}: ${value}`} + outerRadius={80} + innerRadius={40} + fill="#8884d8" + dataKey="value" + > + {clientStatusData.map((entry, index) => ( + + ))} + + + + + +
+ )} + {/* Graphique répartition par genre */} {genderChartData.length > 0 && (
@@ -502,6 +541,8 @@ export default function AdminDashboardAdvanced() {
+ +
diff --git a/app/client/page.tsx b/app/client/page.tsx index b045fd8..652644d 100644 --- a/app/client/page.tsx +++ b/app/client/page.tsx @@ -64,21 +64,21 @@ export default function ClientPage() { return ( -
+
{/* Welcome Section */}
-

- Bonjour {user?.firstName} ! 👋 +

+ Bonjour {user?.firstName} !

-

+

Bienvenue dans votre espace client

{/* Quick Action */}
-
+

@@ -89,8 +89,8 @@ export default function ClientPage() {

-
@@ -99,10 +99,10 @@ export default function ClientPage() { {/* Statistics Cards */}
-
+
-

+

Total Participations

@@ -117,36 +117,36 @@ export default function ClientPage() {

-
+
-

+

Gains réclamés

-

+

{stats.claimed}

-
- +
+
-
+
-

+

En attente

-

+

{stats.pending}

-
- +
+
@@ -155,12 +155,12 @@ export default function ClientPage() {
{/* Recent Tickets */} -
-
+
+
-

Mes derniers tickets

+

Mes derniers tickets

- @@ -170,11 +170,11 @@ export default function ClientPage() { {tickets.length === 0 ? (
🎲
-

+

Vous n'avez pas encore participé au jeu

- @@ -183,22 +183,22 @@ export default function ClientPage() {
- - + - - - - + {tickets.slice(0, 5).map((ticket) => ( ))} diff --git a/app/contact/page.tsx b/app/contact/page.tsx index e1aa722..06f5159 100644 --- a/app/contact/page.tsx +++ b/app/contact/page.tsx @@ -67,15 +67,15 @@ export default function ContactPage() { }; return ( -
+
{/* Hero Section */} -
+
-

+

Contactez-nous

-

+

Une question sur le jeu-concours ? Besoin d'aide ? Notre équipe est là pour vous accompagner !

@@ -90,13 +90,13 @@ export default function ContactPage() { {/* Contact Form */}
-
-

Envoyez-nous un message

+
+

Envoyez-nous un message

{/* Nom complet */}
-
{/* Email */}
-
{/* Sujet */}
-
+
Code Ticket + Gain + Statut + Date