Commit Graph

192 Commits

Author SHA1 Message Date
kbe
b228d5a174 chore: Breadcrumb on ticket edit page 2025-09-16 16:22:09 +02:00
kbe
61ad8c64d4 Fix modal overlay issue and improve modal structure
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-16 08:44:21 +02:00
kbe
4e06f91acb Fix modal positioning and improve Stimulus controller
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-16 08:43:00 +02:00
kbe
28eddb22ab Refactor duplication feature to use Stimulus controller and fix modal issues
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-15 21:23:29 +02:00
kbe
a34eb7aa38 Add duplication options with JavaScript modal and conditional ticket type cloning
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-15 21:20:22 +02:00
kbe
aa68885b84 Add event duplication feature with ticket types cloning
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-15 21:17:24 +02:00
kbe
c1dde7914c refactor: remove 1€ fees on payment 2025-09-15 21:09:57 +02:00
kbe
dbb972e490 feat: Add countdown when order expire in less than 5 minutes 2025-09-15 21:09:19 +02:00
kbe
049e5505ef refactor(pricing): implement hybrid fee model (€0.50 + 1.5%) deducted from promoter payout
- Remove 1€ fixed fee from orders and Stripe invoices
- Add platform_fee_cents, promoter_payout_cents methods to Order model
- Update views to show clean ticket totals without added fees
- Update tests for new fee calculation logic
- Update pricing docs with implemented model
2025-09-15 20:07:51 +02:00
kbe
d6184b6c84 refactor: extract cart storage to dedicated API controller with dynamic frontend URLs
All checks were successful
Ruby on Rails Test / rails-test (push) Successful in 1m7s
- Added dedicated CartsController for session-based cart storage
- Refactored routes to use POST /api/v1/carts/store
- Updated ticket selection JS to use dynamic data attributes for URLs
- Fixed CSRF protection in API and checkout payment increment
- Made checkout button URLs dynamic via data attributes
- Updated tests for new cart storage endpoint
- Removed obsolete store_cart from EventsController
2025-09-15 19:52:01 +02:00
kbe
4cde466f9a Add comprehensive unit test coverage for controllers, models, and services
- Translate French comments to English in controllers and tests
- Fix test failures: route helpers, validations, MySQL transaction issues
- Add Timecop for time-dependent tests and update database config for isolation
2025-09-15 19:27:06 +02:00
kbe
ee43996a77 feat(book after start): prepare to rework event to allow ticket sell
after start
2025-09-15 19:07:19 +02:00
kbe
f0d32bf3f1 Improve mobile responsiveness 2025-09-15 19:06:15 +02:00
kbe
d1ef962f74 feat: Improve mobile responsiveness for promoter event detail page
- Restructure header layout with separated title and action buttons
- Make all action buttons full-width on mobile (w-full sm:w-auto)
- Add responsive text sizing and proper truncation for long titles
- Improve status banners with flexible layouts for mobile
- Enhance content cards with responsive padding (p-4 sm:p-6)
- Add better text wrapping and overflow handling throughout
- Optimize sidebar with responsive font sizes and spacing
- Ensure consistent touch targets and button accessibility

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 18:23:45 +02:00
kbe
e84d9aad5b feat: Improve mobile responsiveness for promoter events page
- Add responsive header with stacked layout on mobile
- Implement dual layout system: table for desktop, cards for mobile
- Make all action buttons full-width and accessible on mobile
- Add proper spacing and touch targets for mobile UX
- Ensure "Créer un événement" button is full-width on mobile
- Improve empty state responsiveness

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 18:08:05 +02:00
kbe
24126eb834 style: lint code
All checks were successful
Ruby on Rails Test / rails-test (push) Successful in 1m55s
2025-09-15 17:41:35 +02:00
kbe
9a1976b6af Add breadcrumb to settings page 2025-09-15 17:41:23 +02:00
kbe
a8c7e82507 Merge branch 'feat/promoters' into develop
All checks were successful
Ruby on Rails Test / rails-test (push) Successful in 2m19s
2025-09-15 17:21:03 +02:00
kbe
889afd0d01 Change available tickets details 2025-09-15 17:18:14 +02:00
kbe
82f0fab1f5 Disable authentication for API
Some checks failed
Ruby on Rails Test / rails-test (push) Has been cancelled
2025-09-15 17:15:49 +02:00
kbe
91e6425c1e feat: Settings page to update profile 2025-09-11 16:07:25 +02:00
kbe
f54742b041 feat: Add booking control during events
- Add allow_booking_during_event boolean field to events (defaults to false)
- Implement booking_allowed? method to check if tickets can be purchased
- Add event_started? and event_ended? helper methods
- Include new option in event edit form with clear explanation
- Display booking policy status on event show page
- Add visual indicator when booking is disabled during ongoing events
- Update controller to permit new parameter

This allows promoters to control whether attendees can purchase tickets
after an event has started, providing flexibility for different event types.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 08:49:01 +02:00
kbe
21919c813e Merge branch 'develop' into feat/promoters 2025-09-11 08:41:23 +02:00
kbe
8ecfc7bf99 feat: Display error message when event does not have any ticket type
Some checks failed
Ruby on Rails Test / rails-test (push) Failing after 2m18s
2025-09-11 08:35:54 +02:00
kbe
28ef801c9a feat: Add warning for publishing events without ticket types
Some checks failed
Ruby on Rails Test / rails-test (push) Has been cancelled
- Add prominent warning banner on event show page for draft events with no ticket types
- Disable publish button when no ticket types are configured
- Include helpful tooltip and direct link to configure ticket types
- Improve UX by preventing invalid publish attempts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 08:35:05 +02:00
kbe
55b39e93bf enhance: Implement dynamic message template system with progress tracking
Some checks failed
Ruby on Rails Test / rails-test (push) Failing after 13m31s
- Add comprehensive message template system with 5 distinct message types
- Implement progress tracking for multi-strategy geocoding attempts
- Add dismissible messages with auto-timeout functionality
- Enhance visual design with proper spacing, shadows, and animations
- Add specialized geocoding success messages with location details
- Improve user experience with contextual progress indicators
- Support HTML content in messages for better formatting

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 22:01:26 +02:00
kbe
9bebdef5a5 feat: Implement comprehensive geocoding improvements with loading indicators
- Add multi-strategy geocoding fallback system for better address resolution
- Implement loading spinners and visual feedback for all geocoding operations
- Move geocoding messages to venue section for better visibility
- Add dynamic message template system with proper styling
- Optimize backend to trust frontend coordinates and reduce API calls
- Add rate limiting and proper User-Agent headers for Nominatim compliance
- Improve error handling and user feedback throughout geocoding flow

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 21:24:28 +02:00
kbe
d5c0276fcc chore: Code lint 2025-09-10 20:51:17 +02:00
kbe
10c93fff2f feat: Implement the promoter event creation
Some checks failed
Ruby on Rails Test / rails-test (push) Failing after 1m50s
- Promoter can now create an event in draft mode
- Place is found based on address and long/lat are automatically
  deducted from it
- Slug is forged using the *slug* npm package instead of custom code
2025-09-10 20:49:06 +02:00
kbe
332827c6da feat: Add comprehensive address-first geolocation system for events
This implementation provides automatic geocoding and map integration:

- **Event Model Enhancements:**
  - Automatic geocoding callback using OpenStreetMap Nominatim API
  - 3-tier fallback system: exact coordinates → city-based → country default
  - Fallback coordinates for major French cities (Paris, Lyon, Marseille, etc.)
  - Robust error handling that prevents event creation failures

- **User-Friendly Event Forms:**
  - Address-first approach - users just enter addresses
  - Hidden coordinate fields (auto-generated behind scenes)
  - Real-time geocoding with 1.5s debounce
  - "Ma position" button for current location with reverse geocoding
  - "Prévisualiser" button to show map links
  - Smart feedback system (loading, success, warnings, errors)

- **Enhanced Event Show Page:**
  - Map provider links (OpenStreetMap, Google Maps, Apple Plans)
  - Warning badges when approximate coordinates are used
  - Address-based URLs for better map integration

- **Comprehensive JavaScript Controller:**
  - Debounced auto-geocoding to minimize API calls
  - Multiple geocoding strategies (manual vs automatic)
  - Promise-based geolocation with proper error handling
  - Dynamic map link generation with address + coordinates

- **Failure Handling:**
  - Events never fail to save due to missing coordinates
  - Fallback to city-based coordinates when exact geocoding fails
  - User-friendly warnings when approximate locations are used
  - Maintains existing coordinates on update failures

🤖 Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2025-09-10 20:49:06 +02:00
kbe
46d042b85e feat: Implement comprehensive promoter system with dashboard and role-based access
This commit implements a complete promoter system that allows professional users
(is_professionnal: true) to manage events with advanced analytics and controls.

## Key Features Added:

### Role-Based Access Control
- Update User#can_manage_events? to use is_professionnal field
- Add promoter? alias method for semantic clarity
- Restrict event management to professional users only

### Enhanced Navigation
- Add conditional "Créer un événement" and "Mes événements" links
- Display promoter navigation only for professional users
- Include responsive mobile navigation with appropriate icons
- Maintain clean UI for regular users

### Comprehensive Promoter Dashboard
- Revenue metrics with total earnings calculation
- Tickets sold counter across all events
- Published vs draft events statistics
- Monthly revenue trend chart (6 months)
- Recent events widget with quick management actions
- Recent orders table with customer information

### Advanced Analytics
- Real-time revenue calculations from order data
- Monthly revenue trends with visual progress bars
- Event performance metrics and status tracking
- Customer order history and transaction details

### Event Management Workflow
- Verified existing event CRUD operations are comprehensive
- Maintains easy-to-use interface for event creation/editing
- State management system (draft → published → cancelled)
- Quick action buttons for common operations

### Documentation
- Comprehensive implementation guide in docs/
- Technical details and architecture explanations
- Future enhancement recommendations
- Testing and deployment considerations

## Technical Implementation:

- Optimized database queries to prevent N+1 problems
- Proper eager loading for dashboard performance
- Responsive design with Tailwind CSS components
- Clean separation of promoter vs regular user features
- Maintainable code structure following Rails conventions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 20:49:06 +02:00
kbe
48ec78197b Move increment_payment_attempt to API namespace and update JavaScript
- Add API route for increment_payment_attempt in config/routes.rb
- Update API OrdersController to handle increment_payment_attempt and skip API key authentication
- Update JavaScript code in checkout view to use API endpoint without CSRF tokens
- Remove CSRF token from API requests as it's not required for API endpoints
- Maintain backward compatibility by keeping original method in OrdersController
2025-09-10 20:49:06 +02:00
kbe
31009560c2 Link to homepage on and more comments in controller 2025-09-10 20:49:06 +02:00
kbe
16c277d0a9 chore: Remove links to non working themes 2025-09-10 20:49:06 +02:00
kbe
6951efdc85 feat: Update from breadcrumb on the current page 2025-09-10 20:49:06 +02:00
kbe
d1fb766fef feat: Use invoice emitter details from env var 2025-09-10 20:49:06 +02:00
kbe
a69faf0582 Make invoice emitter configurable via environment variables
Add environment variables for invoice company details to allow customization without code changes. Update invoice view and Stripe service to use these configurable values.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 20:49:06 +02:00
kbe
9b0228e7ee Fix link_to helper syntax error in orders checkout page
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-10 20:49:06 +02:00
kbe
c5c64a87b8 Setup container system for all pages with max-width constraint while maintaining full-width backgrounds
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-10 20:49:06 +02:00
kbe
4b671a211b Update all views to use new design system components and styling
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-10 20:49:06 +02:00
kbe
e4d778355e Update breadcrumbs to use dynamic component with new design system colors
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-10 20:49:06 +02:00
kbe
eefa6c3ce2 Update design system to match Aperonight design guidelines - Replace gradient buttons with solid color buttons
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-09-10 20:49:06 +02:00
kbe
ab436d8c5c Improve design system 2025-09-10 20:49:06 +02:00
kbe
6b47114015 Restyle of the homepage 2025-09-10 20:49:06 +02:00
kbe
39636039f5 In mailer use application name 2025-09-10 20:49:06 +02:00
kbe
5fa31f4311 Fix failing tests and improve email template consistency
- Fix onboarding controller test by using consistent application name
- Fix ticket mailer template error by correcting variable reference (@user.first_name)
- Update event reminder template to use configurable app name
- Refactor mailer tests to properly handle multipart email content
- Update test assertions to match actual template content
- Remove duplicate migration for onboarding field
- Add documentation for test fixes and solutions
2025-09-10 20:49:06 +02:00
kbe
070e8d0f2a Remove company information section from onboarding
Completely remove the enterprise/company information functionality from
the onboarding flow to simplify the user experience:

- Remove company information toggle section and form fields from view
- Delete unused Stimulus toggle controller (toggle_section_controller.js)
- Update onboarding controller to only process first/last name parameters
- Remove company_name from permitted parameters and validation logic
- Update tests to remove company name assertions and test cases
- Simplify onboarding to only collect essential personal information

The onboarding now focuses solely on collecting required first and last
names, providing a cleaner and faster user experience.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 20:49:05 +02:00
kbe
89bda03f45 feat: Implement comprehensive onboarding system for new users
Add complete user onboarding flow that redirects new users to complete their
profile before accessing the application:

- Add onboarding_completed boolean field to users with migration
- Create OnboardingController with form validation and completion logic
- Design professional onboarding UI with progressive disclosure for company info
- Implement Stimulus controller for toggling company information section
- Add application-wide redirect middleware for incomplete users
- Create comprehensive test suite for all onboarding functionality
- Update test fixtures and helpers to support onboarding in existing tests

The onboarding collects required first/last name and optional company information.
Users are redirected to onboarding after login until profile is completed.
Features smooth animations, full-width form button, and clean UX design.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 20:49:05 +02:00
kbe
935974b70a Fix service fee missing from Stripe invoices
The StripeInvoiceService was only creating line items for tickets but missing
the 1€ service fee, causing a discrepancy where customers paid 26€ via Stripe
checkout but the generated invoice only showed 25€.

- Add service fee line item to Stripe invoices in StripeInvoiceService
- Update all related tests to expect two line items (tickets + service fee)
- Fix order controller test to account for service fee in total calculation

Now Stripe invoices properly match the amount paid: tickets + 1€ service fee.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 20:49:05 +02:00
kbe
f0de3dac8a Add invoice functionality for orders with Stripe integration 2025-09-10 20:49:05 +02:00