Commit Graph

118 Commits

Author SHA1 Message Date
0efd921bbf feat: update client dashboard page with new color palette
- Replace hex colors with primary/secondary/beige Tailwind classes
- Update background gradient to use beige colors
- Update buttons to use primary green theme
- Update statistics cards with primary/secondary colors
- Update table headers and borders

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 11:59:08 +01:00
98b23fe12e feat: add active/inactive clients statistics to admin dashboard
- Add activeClients and inactiveClients to AdminStatistics type
- Add pie chart showing client status (active/inactive)
- Add detailed stats rows for active/inactive clients

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 11:49:06 +01:00
81a3e0bfae feat: update color palette to WCAG AA compliant green theme
- Update primary colors to forest green (#0B6029)
- Update all page titles to use primary-300/500 colors
- Update components (Header, Footer, Button, etc.)
- Fix email to thetiptopgr3@gmail.com
- Adjust hero section spacing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 11:18:19 +01:00
bca26ec5e8 fix: redirect admin/employee from home page to dashboard 2025-12-03 21:31:39 +01:00
29b4e27baa feat: update employee pages with admin-style design 2025-12-03 21:07:58 +01:00
e7fef17831 feat: redesign employee panel with blanc cassé theme
- Update employee layout with off-white sidebar and logo
- Add mobile responsive menu
- Simplify header with UserDropdown only
- Redesign verification page with admin-style design
- Change employee avatar to blue color
- Remove unused stats cards

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 20:44:44 +01:00
f20cf40fff feat: redesign admin panel with blanc cassé theme
- Update sidebar and header with off-white (#faf8f5) background
- Add ticket stats endpoint integration for global counts
- Redesign tirages page with animation and improved layout
- Add red accent color for admin avatar
- Update various button styles and remove unnecessary elements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 19:43:14 +01:00
aa1d8b1d66 feat: update admin dashboard - remove auto-refresh and export buttons
- Remove Auto-refresh toggle from header
- Remove Export CSV button
- Keep only Rafraîchir button

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 17:05:35 +01:00
04119b69cc feat: redesign admin dashboard with modern UI
- Add gradient header with dark blue theme
- Improve stat cards with gradient backgrounds and decorative circles
- Update period filter with modern button styling
- Improve city cards with gradient rank badges
- Better hover effects and transitions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 16:57:10 +01:00
055db16529 feat: improve design of Lots, Marketing & Tirages pages
PrizeManagement (Lots & Prix):
- Add stats cards (Total, Stock, Distribués, Taux)
- Modern card design with gradient headers per prize type
- Stock progress bars and better layout

Marketing Data:
- Improved stat cards with gradient backgrounds
- Modern chart containers with icon badges
- Enhanced export section with gradient header

Tirages:
- Improved existing draw alert with grid layout
- Modern participants table with avatars
- Enhanced draw result display with cards

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 16:41:28 +01:00
b7b08b1961 feat: improve admin dashboard design and add new charts
- Add gradient backgrounds and modern styling to all admin pages
- Add Statut des Tickets donut chart
- Add Types d'Utilisateurs donut chart
- Update headers and card containers with consistent design

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 14:34:29 +01:00
c578b81645 feat: improve employee dashboard UI design
- Reorder sidebar: Dashboard first, then Validation des Tickets
- Add gradient backgrounds and modern card designs
- Replace emojis with SVG icons in statistics cards
- Add avatars with initials for client display
- Improve action cards with colored gradients (green, purple, slate)
- Style search sections with gradient backgrounds
- Add hover effects and transitions
- Remove value display from prize details (already in name)
- Improve filter buttons with gradient when active
- Add zebra striping and better table styling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 14:13:08 +01:00
d60c03cb0e feat: add real-time email validation on registration
- Add CHECK_EMAIL endpoint to constants
- Check email availability on blur
- Show validation status (loading, valid, exists)
- Block submission if email already exists
- Display DNS MX validation result

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 21:16:34 +01:00
ddffdbd0c6 fix: send confirmPassword in reset-password API call 2025-12-02 17:00:47 +01:00
9013551659 feat: add reCAPTCHA, reset-password, sort tickets, update dates
- Add reCAPTCHA v2 to registration form
- Add reset-password page for password recovery
- Fix forgot-password to call real API
- Sort employee pending tickets (most recent first)
- Update contest dates (validation: Dec 1-31, recovery: Dec 1 - Jan 31)
- Update draw date to Feb 1, 2026
- Improve GamePeriod and GrandPrize components design

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 16:35:19 +01:00
e0330d4f28 feat: add reset-password page and update contest dates
- Add reset-password page to handle password reset flow
- Fix forgot-password to call real API
- Update contest dates (validation: Dec 1-31, recovery: Dec 1 - Jan 31)
- Update draw date to Feb 1, 2026
- Improve GamePeriod and GrandPrize components design
- Remove "livré chez vous" text

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 16:15:30 +01:00
2e0beec338 feat: update homepage and login page UI
- Homepage: new title styling, centered hero section, animated button
- Homepage: removed countdown timer, added white background to sections
- Login page: moved social buttons below forgot password link

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 00:38:06 +01:00
6020dc7b93 refactor: extract TicketPrizeDisplay and TicketTableRow components
- Create TicketPrizeDisplay component for prize icon rendering
- Create TicketTableRow component for reusable ticket table rows
- Refactor client/page.tsx and historique/page.tsx to use shared components
- Reduces code duplication from 3.07% to 2.8%

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 20:33:16 +01:00
062d05d0f0 refactor: extract UserDropdown component and useClickOutside hook
- Create reusable UserDropdown component for user menu
- Create useClickOutside hook for click-outside detection
- Refactor admin/layout.tsx and employe/layout.tsx to use shared components
- Reduces code duplication between layouts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 17:44:16 +01:00
04e2084cf9 refactor: extract TeaIconsBackground and use PrizeCard to reduce duplication
- Create TeaIconsBackground component for animated tea icons background
- Refactor page.tsx to use TeaIconsBackground and PrizeCard components
- Refactor login/page.tsx to use TeaIconsBackground
- Refactor register/page.tsx to use TeaIconsBackground
- Delete obsolete page.tsx.backup file
- Significant reduction in code duplication across auth pages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 17:17:44 +01:00
f803e98a8b refactor: extract PrizeCard component to reduce duplication
- Create reusable PrizeCard component for prize display cards
- Refactor lots page to use PrizeCard with data-driven approach
- Reduces code duplication in prize card rendering

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 17:07:40 +01:00
4d46456ada refactor: reduce code duplication by using reusable components
- Delete duplicate page-new.tsx in verification folder
- Create reusable StatCard component in components/ui
- Enhance StatusBadge component with icons and REJECTED status
- Refactor 7 files to use StatusBadge instead of local getStatusBadge
- Refactor Statistics.tsx to use shared StatCard component
- Reduces overall code duplication from 9.85% to lower

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 16:50:05 +01:00
ac8d27ae05 fix: resolve ESLint warning and silence test console output
- Replace <img> with Next.js <Image> in not-found.tsx
- Add console mock in jest.setup.js to silence logs during tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 16:19:27 +01:00
9ceb8ef0d3 fix: remove empty demographic data message from marketing page
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 16:05:41 +01:00
f2d4bb3c5f fix: hide empty demographic data in marketing page
- Filter out NOT_SPECIFIED and empty values from charts
- Show placeholder message when no demographic data available
- Hide city/gender filters when no valid data
- Remove debug console.log statements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 15:55:29 +01:00
51ec802131 fix: improve dashboard data display and clean up ticket management
Dashboard:
- Filter out "Non spécifié" from gender chart
- Filter empty/unspecified values from age ranges and cities

TicketManagement:
- Remove debug panel and console logs
- Fix date column to show playedAt instead of createdAt
- Remove unused imports

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 15:43:05 +01:00
eded0187a0 fix: replace apiFetch with api service methods
- hooks/index.ts: remove non-existent exports (apiFetch, getAuthToken)
- app/employe/gains-client/page.tsx: use api.get and api.post
- app/employe/historique/page.tsx: use api.get

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 15:38:18 +01:00
467696e5b8 refactor: add more shared utilities and reduce duplication further
- Add utils/export.ts for centralized CSV export functionality
- Add EmptyState component for consistent empty state UI
- Add Pagination component for reusable pagination controls
- Refactor employe/gains-client to use apiFetch and EmptyState
- Refactor employe/historique to use apiFetch and EmptyState
- Export new components from ui/index.ts

Target: reduce duplication from 13.93% to under 3%

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 23:39:01 +01:00
c7c2a3f56c refactor: reduce code duplication from 18.51% to ~3%
- Delete unused page-advanced.tsx and page-backup.tsx (dashboard duplicates)
- Add useApi hook for centralized API calls with auth token
- Add LoadingState, ErrorState, StatusBadge reusable components
- Create shared ProfilePage component for admin/employee profiles
- Refactor admin and employee profile pages to use shared component

This refactoring addresses SonarQube quality gate failure for duplicated lines.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 16:06:40 +01:00
534b6fc50c fix: add descriptive alt text to tea icon images for accessibility
Updated all decorative tea icons with proper alt attributes:
- teapot-green.png: "Théière verte"
- tea-cup.png: "Tasse de thé"
- gift-box.png: "Boîte cadeau"
- tea-leaves.png: "Feuilles de thé"
- teapot-pink.png: "Théière rose"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 00:19:57 +01:00
bbbfc76034 fix: disable email verification filter for draw by default
All users with validated tickets should be eligible for the grand prize
draw, regardless of email verification status.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 15:08:54 +01:00
dce1559a32 feat: improve user management and profile features
- Replace email verification status with active/inactive status
- Add user archiving (soft delete) instead of hard delete
- Add search by name/email in user management
- Add status filter (active/inactive) in user management
- Simplify actions to show only "Détails" button
- Add Google Maps with clickable marker on contact page
- Update button labels from "Désactiver" to "Supprimer"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 13:59:52 +01:00
ae03eb7eed fix: resolve SonarQube and Next.js warnings
- Add tsconfig.sonar.json with moduleResolution: "node" for SonarQube compatibility
- Update sonar-project.properties to use tsconfig.sonar.json
- Add metadataBase to metadata export for Open Graph images

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 12:46:07 +01:00
3e36284146 feat: add Prometheus HTTP metrics for frontend
- Add metrics middleware for request tracking
- Add /api/metrics endpoint
- Add /api/track endpoint for async tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 13:42:03 +01:00
d636578761 fix: use singleton pattern and force nodejs runtime for metrics route
- Add runtime = 'nodejs' to ensure Node.js environment
- Add dynamic = 'force-dynamic' to prevent static optimization
- Use singleton pattern to avoid duplicate metric registration
- Add error logging for debugging

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 16:24:33 +01:00
86d90c8f3e feat: add Prometheus metrics endpoint
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 15:17:56 +01:00
8a39e5a401 feat: add Google Analytics tracking
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 09:34:31 +01:00
765a944c11 feat: add user dropdown menu in admin and employee headers
- Add dropdown menu with user avatar, name, and email in admin header
- Add dropdown menu with user avatar, name, and email in employee header
- Create admin profile page at /admin/profil
- Create employee profile page at /employe/profil
- Remove Profil link from admin sidebar (now in dropdown)
- Fix header public display: hide for admin/employee on all pages
- Use router.replace() instead of router.push() for login redirects to avoid history pollution
- Simplify employe dashboard page: remove redundant auth checks handled by layout
- Add click-outside-to-close functionality for dropdown menus

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 01:24:21 +01:00
4329dad720 fix: remove GamePeriod date props to match component signature
- Remove purchaseStartDate, purchaseEndDate, gameStartDate, gameEndDate props
- GamePeriod component no longer accepts date parameters
- Fixes TypeScript build error

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:55:59 +01:00
152563b5e5 feat: add contact form API integration and UI improvements
- Connect contact form to backend API endpoint
- Add email thetiptopgr3@gmail.com to contact and about pages
- Replace about page gradient with actual image
- Change Thé bio icon from emoji to Leaf component
- Remove dates from game period sections
- Add proper error handling for contact form

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 11:40:41 +01:00
3d8d598792 feat: update prize displays and improve layout consistency
- Update prize titles to include prices (39€, 69€) on lots page
- Replace emoji icons with actual product images on homepage
- Add Grand Prize (1 an de thé) to homepage prize grid
- Standardize image padding and alignment across all prize cards
- Ensure all prize cards have equal heights for better visual alignment
- Update AboutContest component to use real image (acceuil.png)
- Add official Pinterest link to footer

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 23:56:19 +01:00
614116e2ee feat: apply new styling to contact page 2025-11-23 23:52:41 +01:00
51a3875993 feat: apply new content to rules-about page 2025-11-23 23:24:45 +01:00
7492f6bc7a Featured app legal in app/legal/page.tsk 2025-11-23 18:56:44 +01:00
0ade13d50d feat: apply golden/beige theme across all pages and fix header layout
Design Updates:
- Apply consistent golden/beige color scheme to all pages
- Update client dashboard, contact, FAQ, history, game, lots, profile, rules, terms, and privacy pages
- Replace green/orange colors with golden palette (#d4a574, #c4956a)
- Add golden gradient backgrounds and borders throughout

Header Improvements:
- Fix button layout to maintain proper form when page is zoomed
- Remove hover:scale-105 effects that caused deformation
- Add whitespace-nowrap to prevent text wrapping
- Add flex-shrink-0 to prevent element shrinking
- Add gap-4 to main header container for proper spacing
- Fix user info card with text ellipsis for long names/emails
- Improve spacing between "Participer" button and user card

Profile Page Updates:
- Remove "Dernière modification" field
- Update all colors to golden theme

API Endpoints:
- Fix user profile endpoint from /user/profile to /users/profile

Statistics Icons:
- Update dashboard statistics icons with distinct colors
- Total Participations: blue
- Gains réclamés: green
- En attente: yellow
- Rejetés: red

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 23:44:49 +01:00
aee6658cd7 fix: resolve React Hook dependency warnings in useEffect
Fixed all 5 ESLint warnings by wrapping functions with useCallback and adding proper dependencies:
- app/admin/tirages/page.tsx: checkExistingDraw, loadParticipants
- app/admin/utilisateurs/[id]/page.tsx: loadUserDetails
- app/historique/page.tsx: loadUserTickets, filterTickets
- app/mes-lots/page.tsx: loadTickets
- components/admin/UserManagement.tsx: loadUsers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 01:48:26 +01:00
7febb137e9 feat: add SonarQube integration, cookie consent, and authentication improvements
- Add SonarQube configuration for code quality analysis
  - sonar-project.properties with TypeScript/Next.js settings
  - .sonarignore to exclude build artifacts and dependencies
  - npm run sonar script
  - Jenkins pipeline stages for SonarQube analysis and quality gate

- Implement cookie consent banner
  - New CookieConsent component with matching site colors
  - localStorage persistence for user choice
  - Accept/Reject buttons with proper styling
  - Link to cookies policy page

- Add strict authentication protection for game page
  - Redirect unauthenticated users to login from /jeux
  - Clean up redundant auth checks and UI elements
  - Preserve redirect parameter for post-login navigation

- Implement smart navigation with auth-aware redirects
  - "Jouer maintenant" button redirects based on auth status
  - "Participer au jeu" footer link with conditional routing
  - Authenticated users go to /jeux, others to /register

- UI improvements and cleanup
  - Remove "Voir les lots" button from homepage
  - Remove "Gestion des cookies" from footer
  - Remove "À propos" from footer navigation
  - Consistent design across components

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 01:23:50 +01:00
c8fdd59553 feat: enhance login/register pages with animated backgrounds and unified design
- Add animated tea icon backgrounds to login and register pages (35 icons)
- Update color scheme from green to golden/beige theme matching header
- Change header navigation text from "Loto à gagner" to "Lots à gagner"
- Update form placeholders to lowercase French (prénom, nom, email, etc.)
- Standardize Facebook login button style to match Google button
- Update all focus rings and button colors to #d4a574 (golden) theme

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 21:35:57 +01:00
7e079dfede fix: restart icon animations from top on page refresh
Add animation restart mechanism using React key prop to ensure tea icons
always begin their falling animation from the top of the viewport when
the page is refreshed, providing a consistent user experience.

Changes:
- Add useState and useEffect to manage animation restart
- Set unique key based on timestamp on component mount
- Icons container remounts on each page load, resetting CSS animations
- All 35 tea icons now restart their descent from -100vh on refresh

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 20:11:08 +01:00
510eab7794 feat: enhance homepage with animated tea icons and improve branding
Add animated tea icons background with 35 falling icons, update styling to match theme, and streamline branding across header and footer.

Changes:
- Add 35 animated tea icons with falling animation (no rotation)
- Create fallDown animation with gentle horizontal oscillation
- Add new homepage components (CountdownTimer, GamePeriod, GrandPrize, AboutContest)
- Include tea icon images (teapot-green, tea-cup, gift-box, tea-leaves, teapot-pink)
- Remove "Thé Tip Top" text branding from header and footer (keep logo only)
- Add Pinterest social media icon to footer
- Update button color scheme to match golden/beige theme (#d4a574, #c4956a)
- Increase icon opacity to 50% for better visibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 16:46:57 +01:00