- Add comprehensive promotion code methods to Order model
- Implement Stripe invoice integration for promotion code discounts
- Display promotion codes on invoice with proper discount breakdown
- Fix and enhance all unit tests for promotion code functionality
- Add discount calculation with capping to prevent negative totals
- Ensure promotion codes work across entire order lifecycle
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
On the event page, promoter can choose to mark the event as "sold out" using the status field or as "published". Only published event can be marked as sold out if promoter thinks he cannot handle all the people available.
- 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
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
- 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
- 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>
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>
- 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
- 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
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>
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>
- Added 1€ service fee to order total calculation in Order model
- Updated checkout page to display fee breakdown (subtotal + 1€ fee = total)
- Updated payment success page to show fee breakdown
- Updated order show page to display fee breakdown
- Updated payment cancel page to show fee breakdown
- Modified Stripe session creation to include service fee as separate line item
- Updated order model tests to account for the 1€ service fee
- Enhanced overall pricing transparency for users
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
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>
- 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
- 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
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>
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>
- Added 1€ service fee to order total calculation in Order model
- Updated checkout page to display fee breakdown (subtotal + 1€ fee = total)
- Updated payment success page to show fee breakdown
- Updated order show page to display fee breakdown
- Updated payment cancel page to show fee breakdown
- Modified Stripe session creation to include service fee as separate line item
- Updated order model tests to account for the 1€ service fee
- Enhanced overall pricing transparency for users
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add orders index action to OrdersController with pagination support
- Simplify dashboard to focus on user orders and actions
- Redesign order show page with improved layout and ticket access
- Remove complex event metrics in favor of streamlined order management
- Add direct links to ticket downloads and better order navigation
- Improve responsive design and user experience across order views
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Rename download_ticket action to download for consistency
- Use QR code lookup consistently in both show and download actions
- Simplify routes to use QR code pattern for both viewing and downloading
- Remove complex dual-lookup logic in favor of consistent QR code access
- Clean up route constraints and duplicate route definitions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add TicketPdfGenerator service for creating PDF tickets with QR codes
- Implement download_ticket action in TicketsController
- Update ticket routes to support both ID and QR code access
- Add to_pdf method to Ticket model using TicketPdfGenerator
- Resolve conflicts between email notifications and PDF ticket features
- Maintain backward compatibility with existing QR code routes
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Implement comprehensive email notification system for ticket purchases and event reminders
- Add event reminder job with configurable scheduling
- Enhance ticket mailer with QR code generation and proper formatting
- Update order model with email delivery tracking
- Add comprehensive test coverage for all email functionality
- Configure proper mailer settings and disable annotations
- Update backlog to reflect completed email features
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Previously, users received multiple emails after successful payment:
- One email per individual ticket (via orders_controller.rb)
- One order-level email with all tickets (via order.rb mark_as_paid!)
This resulted in N+1 emails for N tickets purchased.
Changes:
- Removed individual ticket email sending from orders_controller.rb
- Kept single comprehensive order email in order.rb
- Updated test to reflect that email failures don't prevent order completion
- Users now receive exactly one email with all tickets as PDF attachments
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Each ticket has a unique URL for viewing and downloading
- Only the ticket owner can access their ticket
- The customer's name is clearly displayed on the ticket
- The PDF can be downloaded directly from the ticket view page
- All existing functionality continues to work as expected
- Remove unused create_stripe_session method from TicketsController
- Replace hardcoded API key with environment variable for security
- Fix typo in ApplicationHelper comment
- Improve User model validation constraints for better UX
- Add comprehensive YARD-style documentation across models, controllers, services, and helpers
- Enhance error handling in cleanup jobs with proper exception handling
- Suppress Prawn font warnings in PDF generator
- Update refactoring summary with complete change documentation
All tests pass (200 tests, 454 assertions, 0 failures)
RuboCop style issues resolved automatically
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>