diff --git a/app/employe/dashboard/page.tsx b/app/employe/dashboard/page.tsx index 3aaacc1..ba52a93 100644 --- a/app/employe/dashboard/page.tsx +++ b/app/employe/dashboard/page.tsx @@ -97,109 +97,140 @@ export default function EmployeDashboardPage() { } return ( -
+
+ {/* Welcome Section */}
-

- Tableau de bord employé +

+ Bonjour {user?.firstName} ! 👋

-

- Bienvenue {user?.firstName}, voici un aperçu de votre activité +

+ Bienvenue dans votre espace employé. Voici un aperçu de votre activité.

{/* Statistics Cards */}
- +
-

+

Tickets en attente

-

+

{stats.pendingTickets}

-
+
+ + + +
- +
- +
-

+

Réclamés aujourd'hui

-

+

{stats.claimedToday}

-
+
+ + + +
- +
- +
-

+

Total réclamés

-

+

{stats.totalClaimed}

-
📊
+
+ + + +
- +
+
+ + {/* Quick Actions Title */} +
+

Actions rapides

+

Accédez rapidement aux fonctionnalités principales

{/* Quick Actions */}
- -
-
🔍
+
+
+
+ + + +
-

+

Validation des gains

-

- Rechercher et valider les tickets des clients +

+ Rechercher et valider les tickets

- +
- -
-
🎁
+
+
+
+ + + +
-

+

Gains du Client

-

- Rechercher tous les gains d'un client +

+ Rechercher les gains d'un client

- +
- -
-
📜
+
+
+
+ + + +
-

+

Historique

-

+

Consulter l'historique des validations

- +
diff --git a/app/employe/gains-client/page.tsx b/app/employe/gains-client/page.tsx index cfcc6fd..6e29511 100644 --- a/app/employe/gains-client/page.tsx +++ b/app/employe/gains-client/page.tsx @@ -94,49 +94,55 @@ export default function GainsClientPage() { return ( -
+
{/* Header */} -
-

- +
+

Gains du Client

-

+

Recherchez un client pour visualiser tous ses gains et les remettre

{/* Search Section */} - -

Rechercher un client

+
+
+
+ +
+

+ Rechercher un client +

+
{/* Search Type Selection */} -
-
- +
{/* Client Info & Prizes */} {clientData && ( <> {/* Client Info Card */} - +
-
- +
+ {clientData.client.firstName?.charAt(0)}{clientData.client.lastName?.charAt(0)}

@@ -179,12 +184,12 @@ export default function GainsClientPage() {

- + {clientData.client.email}

{clientData.client.phone && (

- + {clientData.client.phone}

)} @@ -192,108 +197,116 @@ export default function GainsClientPage() {
-
-
-
-

Total

-

{clientData.totalPrizes}

-
-
-

À remettre

-

{clientData.pendingPrizes}

-
-
-

Remis

-

{clientData.claimedPrizes}

-
+
+
+

Total

+

{clientData.totalPrizes}

+
+
+

À remettre

+

{clientData.pendingPrizes}

+
+
+

Remis

+

{clientData.claimedPrizes}

- +
{/* Prizes List */} - -

- - Lots gagnés ({clientData.prizes.length}) -

+
+
+
+
+ +
+
+

+ Lots gagnés +

+

{clientData.prizes.length} lot(s) au total

+
+
+
- {clientData.prizes.length === 0 ? ( - - ) : ( -
- {clientData.prizes.map((prize) => ( -
-
-
-
-

- {prize.prize.name} -

- -
+
+ {clientData.prizes.length === 0 ? ( +
+
+ +
+

Ce client n'a pas encore gagné de lots

+
+ ) : ( +
+ {clientData.prizes.map((prize) => ( +
+
+
+
+

+ {prize.prize.name} +

+ +
-

- {prize.prize.description} -

+

+ {prize.prize.description} +

-
-
- Code ticket: - {prize.ticketCode} -
-
- Valeur: - - {prize.prize.value}€ - -
-
- Gagné le: - - {new Date(prize.playedAt).toLocaleDateString('fr-FR')} - -
- {prize.claimedAt && ( -
- Remis le: - - {new Date(prize.claimedAt).toLocaleDateString('fr-FR')} +
+
+ Code: + {prize.ticketCode} +
+
+ Gagné le: + + {new Date(prize.playedAt).toLocaleDateString('fr-FR')}
- )} - {prize.validatedBy && ( -
- Remis par: - {prize.validatedBy} -
- )} + {prize.claimedAt && ( +
+ Remis le: + + {new Date(prize.claimedAt).toLocaleDateString('fr-FR')} + +
+ )} + {prize.validatedBy && ( +
+ Remis par: + {prize.validatedBy} +
+ )} +
-
- {prize.status === 'PENDING' && ( - - )} + {prize.status === 'PENDING' && ( + + )} +
-
- ))} -
- )} - + ))} +
+ )} +
+
)}
diff --git a/app/employe/historique/page.tsx b/app/employe/historique/page.tsx index 90024cd..e1de417 100644 --- a/app/employe/historique/page.tsx +++ b/app/employe/historique/page.tsx @@ -73,148 +73,169 @@ export default function EmployeeHistoryPage() { } return ( -
+
{/* Header */} -
-

- +
+

Historique des Validations

-

+

Consultez l'historique de vos validations de tickets

{/* Statistics Cards */} -
- +
+
-

Total traités

-

{stats.total}

+

Total traités

+

{stats.total}

+
+
+ + +
-
📊
- +
- +
-

Validés

-

{stats.claimed}

+

Validés

+

{stats.claimed}

+
+
+ + +
-
- +
- +
-

Rejetés

-

{stats.rejected}

+

Rejetés

+

{stats.rejected}

+
+
+ + +
-
- +
- {/* Filters */} - -
-
+ {/* Filters & History List */} +
+
+
+
+ + + +
+ - -
- -
- - {/* History List */} - - {filteredHistory.length === 0 ? ( - - ) : ( -
- {filteredHistory.map((ticket) => ( -
-
-
-
- - {ticket.code} - - -
+
+ {filteredHistory.length === 0 ? ( +
+
+ +
+

Aucun ticket dans l'historique

+

+ {filter === 'ALL' + ? 'Vous n\'avez pas encore validé de tickets' + : `Aucun ticket ${filter === 'CLAIMED' ? 'validé' : 'rejeté'}`} +

+
+ ) : ( +
+ {filteredHistory.map((ticket) => ( +
+
+
+
+ + {ticket.code} + + +
-
-
- -
-

Client

-

{ticket.user_name}

-

{ticket.user_email}

+
+
+
+ {ticket.user_name.split(' ').map(n => n.charAt(0)).join('').slice(0, 2)} +
+
+

Client

+

{ticket.user_name}

+

{ticket.user_email}

+
+
+ +
+
+ +
+
+

Lot

+

{ticket.prize_name}

+
-
- -
-

Lot

-

{ticket.prize_name}

-

{ticket.prize_value}€

-
-
-
- -
-
- +
+ - Validé le{' '} + {ticket.status === 'REJECTED' ? 'Rejeté' : 'Validé'} le{' '} {ticket.validated_at ? new Date(ticket.validated_at).toLocaleDateString('fr-FR', { day: 'numeric', @@ -226,23 +247,23 @@ export default function EmployeeHistoryPage() { : 'N/A'}
-
- {ticket.rejection_reason && ( -
-

- Raison du rejet: -

-

{ticket.rejection_reason}

-
- )} + {ticket.rejection_reason && ( +
+

+ Raison du rejet: +

+

{ticket.rejection_reason}

+
+ )} +
-
- ))} -
- )} - + ))} +
+ )} +
+
); } diff --git a/app/employe/layout.tsx b/app/employe/layout.tsx index ca31a82..9371b5d 100644 --- a/app/employe/layout.tsx +++ b/app/employe/layout.tsx @@ -51,16 +51,16 @@ export default function EmployeLayout({ } const navItems = [ - { - label: "Validation des Tickets", - href: "/employe/verification", - icon: , - }, { label: "Dashboard", href: "/employe/dashboard", icon: , }, + { + label: "Validation des Tickets", + href: "/employe/verification", + icon: , + }, ]; const isActive = (href: string) => pathname === href; diff --git a/app/employe/verification/page.tsx b/app/employe/verification/page.tsx index 2a24bdf..854d3de 100644 --- a/app/employe/verification/page.tsx +++ b/app/employe/verification/page.tsx @@ -125,37 +125,42 @@ export default function EmployeeVerificationPage() { } return ( -
+
{/* Header */}
-

+

Validation des Tickets

-

+

Scannez ou recherchez un code pour valider les lots gagnés

{/* Search Section */} -
-

- Rechercher un ticket -

+
+
+
+ +
+

+ Rechercher un ticket +

+
setSearchCode(e.target.value.toUpperCase())} onKeyPress={(e) => e.key === "Enter" && handleSearch()} - className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent font-mono text-lg" - maxLength={10} + className="w-full px-5 py-4 border-2 border-white/20 bg-white/10 text-white placeholder-white/60 rounded-xl focus:ring-2 focus:ring-white focus:border-transparent font-mono text-lg backdrop-blur-sm" + maxLength={12} />
{/* Lots en attente de remise */} -
-
-

- Lots en attente de remise -

+
+
+
+
+ +
+
+

+ Lots en attente de remise +

+

{tickets.length} ticket(s) en attente

+
+