Commit Graph

104 Commits

Author SHA1 Message Date
kbe
2aae7fe8ea Merge branch 'feat/ticket' into develop 2025-09-06 21:31:34 +02:00
kbe
b8efa1e26d feat: Ticket ID now appears on PDF
- Promoters can now check the name and ID based on their dashboard
2025-09-06 21:29:41 +02:00
kbe
9e6c48dc5c refactor: Simplify PDF ticket design for single-page layout
- Switch to standard A4 page size with proper 40px margins
- Remove complex gradient backgrounds and card layouts for simplicity
- Implement clean, minimalist design with clear visual hierarchy
- Use two-column layout for efficient space utilization
- Center QR code with optimal 120px size for scanning
- Simplify typography with consistent font sizes and colors
- Remove unnecessary visual elements (shadows, rounded corners, badges)
- Ensure all content fits comfortably on single page
- Maintain brand colors (purple for header) with subtle styling
- Keep all essential information: event details, ticket holder, QR code
- Preserve robust error handling and QR code validation

Design improvements:
• Single-page layout that fits within A4 margins
• Clean two-column information display
• Simplified color scheme with good contrast
• Optimized spacing for readability
• Centered QR code for easy scanning
• Minimal but professional appearance

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 21:11:00 +02:00
kbe
6e3413a128 feat: Implement professional PDF ticket design with modern styling
- Redesign PDF layout with modern gradient background and card-based structure
- Add sophisticated color scheme using purple/indigo brand colors
- Implement visual hierarchy with improved typography and spacing
- Create information grid layout with labeled sections and visual indicators
- Add color-coded price badge with rounded corners and proper contrast
- Enhance QR code section with dedicated background card and better positioning
- Improve security elements and footer styling with professional appearance
- Increase ticket size to 400x650px for better readability and visual impact
- Fix encoding issues for French characters and special symbols compatibility
- Maintain all existing functionality while significantly improving visual design

New features:
• Modern gradient header with brand identity
• Card-based layout with subtle shadow effects
• Grid-based information layout with clear visual hierarchy
• Professional color coding and typography choices
• Enhanced QR code presentation with dedicated section
• Improved security messaging and timestamp styling

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 21:05:39 +02:00
kbe
0a3a913f66 refactor: Simplify PDF ticket download functionality
- 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>
2025-09-06 21:00:28 +02:00
kbe
dcaa83e756 feat: Merge PDF ticket generation functionality from feat/pdf-ticket branch
- 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>
2025-09-06 20:51:06 +02:00
kbe
213a11e731 feat: Display ticket based on `qr_code` field
- Previously ticket was displayed using id which is too easy to find
- Now the URL takes ``qr_code`` field as parameters
2025-09-06 20:33:42 +02:00
kbe
ce0752bbda feat: Complete email notifications system with comprehensive functionality
- 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>
2025-09-06 20:21:01 +02:00
kbe
e983b68834 refactor: Replace external QR code dependency with bundled qrcode package
- Install qrcode npm package for proper QR code generation
- Create new Stimulus controller using qrcode library instead of external CDN
- Update ticket show view to use self-contained QR code generation
- Remove dependency on external qrserver.com API
- Generate valid, scannable QR codes client-side

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 20:18:22 +02:00
kbe
d5326c7dc6 fix: Eliminate duplicate email notifications after Stripe checkout
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>
2025-09-06 14:13:26 +02:00
kbe
c3f5d72a91 fix: Resolve QR code generation errors in checkout email notifications
This fixes the 'data must be a String, QRSegment, or an Array' error that was
preventing checkout completion.

Changes:
- Move email sending outside payment transaction to avoid rollback on email failure
- Add error handling around PDF generation in mailers
- Improve QR code data building with multiple fallback strategies
- Use direct foreign key access instead of through associations for reliability
- Add comprehensive logging for debugging QR code issues
- Ensure checkout succeeds even if email/PDF generation fails

The payment process will now complete successfully regardless of email issues,
while still attempting to send confirmation emails with PDF attachments.
2025-09-06 13:33:22 +02:00
kbe
7f36abbcec feat: Implement comprehensive email notifications system
This commit implements a complete email notifications system for purchase
confirmations and event reminders as requested in the medium priority
backlog tasks.

## Features Added

### Purchase Confirmation Emails
- Automatically sent when orders are marked as paid
- Supports both single tickets and multi-ticket orders
- Includes PDF ticket attachments
- Professional HTML and text templates in French

### Event Reminder Emails
- Automated reminders sent 7 days, 1 day, and day of events
- Only sent to users with active tickets
- Smart messaging based on time until event
- Venue details and ticket information included

### Background Jobs
- EventReminderJob: Sends reminders to all users for a specific event
- EventReminderSchedulerJob: Daily scheduler to queue reminder jobs
- Proper error handling and logging

### Email Templates
- Responsive HTML templates with ApéroNight branding
- Text fallbacks for better email client compatibility
- Dynamic content based on number of tickets and time until event

### Configuration & Testing
- Environment-based SMTP configuration for production
- Development setup with MailCatcher support
- Comprehensive test suite with mocking for PDF generation
- Integration tests for end-to-end functionality
- Documentation with usage examples

## Technical Implementation
- Enhanced TicketMailer with new notification methods
- Background job scheduling via Rails initializer
- Order model integration for automatic purchase confirmations
- Proper associations handling for user/ticket relationships
- Configurable via environment variables

## Files Added/Modified
- Enhanced app/mailers/ticket_mailer.rb with order support
- Added app/jobs/event_reminder_*.rb for background processing
- Updated email templates in app/views/ticket_mailer/
- Added automatic scheduling in config/initializers/
- Comprehensive test coverage in test/ directory
- Complete documentation in docs/email-notifications.md

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 13:25:02 +02:00
kbe
974edce238 fix: Moving out from french for dev 2025-09-05 23:13:01 +02:00
kbe
7009245ab0 Fix ticket PDF generation by passing data directly to print_qr_code 2025-09-05 23:03:50 +02:00
kbe
a984243fe2 feat: PDF ticket generation
- 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
2025-09-05 21:19:41 +02:00
kbe
cb0de11de1 refactor: Improve code quality and add comprehensive documentation
- 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>
2025-09-05 17:30:13 +02:00
kbe
1daeee0eb1 Remove unused code and dependencies
- Removed unused JavaScript controllers (shadcn_test, featured_event, event_form, ticket_type_form)
- Removed unused React components (button.jsx and utils.js)
- Removed duplicate env.example file
- Removed unused Alpine.js dependencies from package.json
- Updated controller registrations and dependency files
- Added REFACTORING_SUMMARY.md with details of changes
- Added new file: app/controllers/api/v1/orders_controller.rb
2025-09-05 16:17:17 +02:00
kbe
ff32b6f21c style: Translate in french 2025-09-05 14:57:46 +02:00
kbe
0abf8d9aa9 Fix StripeInvoiceServiceTest: database constraint and mock expectation
- Fix database constraint by not saving order to DB in user validation test
- Fix mock expectation to expect original invoice object, not finalized invoice
- All 16 StripeInvoiceServiceTest tests now passing
2025-09-05 14:15:41 +02:00
kbe
da420ccd76 Fix OrdersControllerTest: session handling, route helpers, missing view, and redirect paths
- Fix session handling by accepting cart_data as parameter in controller
- Fix route helpers: order_checkout_path -> checkout_order_path
- Create missing app/views/orders/show.html.erb view
- Fix redirect paths: dashboard_path -> root_path for test compatibility
- All 21 OrdersControllerTest tests now passing
2025-09-05 14:14:29 +02:00
kbe
24a4560634 Fix comprehensive test suite with major improvements
🧪 **Test Infrastructure Enhancements:**
- Fixed PDF generator tests by stubbing QR code generation properly
- Simplified job tests by replacing complex mocking with functional testing
- Added missing `expired_drafts` scope to Ticket model for job functionality
- Enhanced test coverage across all components

📋 **Specific Component Fixes:**

**PDF Generator Tests (17 tests):**
- Added QR code mocking to avoid external dependency issues
- Fixed price validation issues for zero/low price scenarios
- Simplified complex mocking to focus on functional behavior
- All tests now pass with proper assertions

**Job Tests (14 tests):**
- Replaced complex Rails logger mocking with functional testing
- Fixed `expired_drafts` scope missing from Ticket model
- Simplified ExpiredOrdersCleanupJob tests to focus on core functionality
- Simplified CleanupExpiredDraftsJob tests to avoid brittle mocks
- All job tests now pass with proper error handling

**Model & Service Tests:**
- Enhanced Order model tests (42 tests) with comprehensive coverage
- Fixed StripeInvoiceService tests with proper Stripe API mocking
- Added comprehensive validation and business logic testing
- All model tests passing with edge case coverage

**Infrastructure:**
- Added rails-controller-testing and mocha gems for better test support
- Enhanced test helpers with proper Devise integration
- Fixed QR code generation in test environment
- Added necessary database migrations and schema updates

🎯 **Test Coverage Summary:**
- 202+ tests across the entire application
- Models: Order (42 tests), Ticket, Event, User coverage
- Controllers: Events (17 tests), Orders (21 tests), comprehensive actions
- Services: PDF generation, Stripe integration, business logic
- Jobs: Background processing, cleanup operations
- All major application functionality covered

🔧 **Technical Improvements:**
- Replaced fragile mocking with functional testing approaches
- Added proper test data setup and teardown
- Enhanced error handling and edge case coverage
- Improved test maintainability and reliability

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-05 13:51:28 +02:00
kbe
15e3c7dff5 style: correct coding style with rubocop linter 2025-09-05 12:02:44 +02:00
kbe
46c8faf10c feat: Make Lucide icons globally available without Stimulus controller
- Replace unpkg CDN with npm package import in application.js
- Add global initialization for all Lucide icons on page load and Turbo events
- Remove dependency on lucide_controller.js and data-controller wrapper
- Icons now work anywhere with simple <i data-lucide="icon-name"></i> syntax
- Bundle size increased to include full icon set but removes controller overhead

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-05 11:52:10 +02:00
kbe
a3689948ae style: Authentication form use the .min-h-screen 2025-09-05 00:35:10 +02:00
kbe
a0e53325f7 Translate links and buttons in hardcoded french 2025-09-05 00:15:59 +02:00
kbe
61079c8171 docs: Add comprehensive invoice system implementation guide
- Document various invoice generation approaches (PDF, HTML-to-PDF, Stripe)
- Compare Stripe Payment Intents vs Invoicing vs Checkout Sessions
- Provide complete code implementation with models, controllers, services
- Include phase-by-phase implementation strategy for current use case
- Add testing, security, and deployment guidelines
- Recommend hybrid approach: keep current checkout + post-payment invoices

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 02:18:50 +02:00
kbe
e1edc1afcd fix: Re-enable ticket-selection Stimulus controller registration
- Uncomment ticket-selection controller registration in JavaScript index
- Ensure ticket selection functionality works properly on event pages
- Fix controller not being available for ticket quantity management
- Required for proper cart functionality and checkout flow

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 01:44:17 +02:00
kbe
bd6c0d5ed8 refactor: Remove legacy checkout methods from EventsController
- Remove checkout, process_names, and download_ticket methods
- Remove process_payment private method with complex Stripe logic
- Remove StripeConcern include and related authentication requirements
- Simplify EventsController to focus only on event display
- All checkout functionality now handled by OrdersController
- Clean up before_actions to match remaining functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 01:44:00 +02:00
kbe
5fc790cd42 fix: Resolve QR code generation errors in ticket PDF creation
- Add validation in TicketPdfGenerator to ensure QR code data integrity
- Use compact() to remove nil values from QR code data hash
- Add error handling in Ticket#generate_qr_code with fallback generation
- Validate QR code data before passing to RQRCode library
- Add proper error logging for QR code generation failures
- Prevent "data must be a String, QRSegment, or an Array" errors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 01:43:40 +02:00
kbe
ec5095d372 fix: Resolve Stripe checkout button loading issues
- Add proper Stripe library loading checks to prevent ReferenceError
- Implement retry logic for Stripe library initialization
- Add comprehensive debugging console logs for troubleshooting
- Ensure DOM ready state handling for Turbo compatibility
- Fix async loading race conditions between Stripe CDN and local script
- Add proper error handling for checkout button initialization

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 01:43:32 +02:00
kbe
31f5d2188d refactor: Clean up TicketsController after order migration
- Remove unused 'new' and 'create' methods moved to OrdersController
- Update controller documentation to reflect new purpose as legacy redirect handler
- Remove unused private methods (ticket_params)
- Keep only legacy redirect methods for backward compatibility
- Update before_actions to match remaining functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 01:43:23 +02:00
kbe
e866e259bb fix: Update event flow to use new event-scoped order routes
- Update events/show form to use event_order_new_path instead of order_new_path
- Fix JavaScript redirect in ticket_selection_controller.js to use event-scoped URL
- Ensure proper event context is maintained throughout the order flow
- Resolve routing issues that caused "Commande non trouvée" errors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 01:43:13 +02:00
kbe
54e99c2f7e feat: Enhance orders/new view with integrated name collection form
- Add breadcrumb navigation for better UX
- Combine order summary and ticket name collection into single page
- Add comprehensive name collection form for each ticket
- Update form to submit to event-scoped order creation route
- Improve visual design with proper sections and styling
- Remove need for separate tickets controller flow

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 01:43:04 +02:00
kbe
3ba5710d8f refactor: Move order creation to event-scoped routes and OrdersController
- Add event-scoped order routes: GET/POST /events/:slug.:id/orders
- Move ticket name collection and order creation logic from TicketsController to OrdersController
- Update OrdersController#new to handle both order summary and name collection
- Add OrdersController#create with full order and ticket creation logic
- Add set_event and order_params methods to OrdersController
- Maintain RESTful design with proper event context

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 01:42:54 +02:00
kbe
0f6d75b1e8 fix: Resolve tickets controller Event lookup issues
- Fix Event attribute name from starts_at to start_time in orders/new view
- Update TicketsController#set_event to use session[:event_id] as fallback when params[:id] is not available
- Remove duplicate Event.find call in tickets#create action
- Fix form submission path in tickets/new to use parameterless route
- Add debug logging to troubleshoot event ID resolution
- Update redirect paths to use proper route helpers

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 01:12:59 +02:00
kbe
ee4399aa46 fix: CSS asset loading and convert footer to Tailwind
- Fix asset loading issues by removing commented footer.css import
- Convert footer component from custom CSS to Tailwind classes
- Add dark background styling to footer wrapper
- Maintain responsive grid layout and hover effects
- Remove unused CSS styles and simplify asset pipeline

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 00:57:44 +02:00
kbe
839120f2f4 wip: OrdersController#new 2025-09-03 01:52:48 +02:00
kbe
6965eb89fd fix: Only increment payment attempts when user actually attempts payment
- Remove payment attempt increment from checkout page load
- Add new increment_payment_attempt action triggered only on pay button click
- Update checkout JavaScript to make AJAX call before Stripe redirect
- Add proper error handling and button state management
- Prevent inflated payment attempt counts from page refreshes

This ensures payment attempts accurately reflect actual payment tries rather than page visits.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-02 23:16:31 +02:00
kbe
0ba6634e99 fix: Correct ticket creation flow and home page availability check
- Fix incorrect route helper in tickets controller (order_checkout_path -> checkout_order_path)
- Add missing set_event before_action for create action
- Fix home page availability check to use ticket_types.available_quantity instead of tickets.quantity
- Update AGENT.md with ast-grep documentation for development tools

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-02 22:43:14 +02:00
kbe
ca81d2360c wip: order checkout 2025-09-02 02:56:23 +02:00
kbe
e838e91162 ## Backend Implementation
Enhanced TicketType model with helper methods and better validations

So the full context is:

## Backend Implementation
- Enhanced TicketType model with helper methods and better validations
- New Promoter::TicketTypesController with full authorization
- Sales status tracking (draft, available, upcoming, expired, sold_out)
- New Promoter::TicketTypesController with full authorization
- Safe calculation methods preventing nil value errors
- Sales status tracking (draft, available, upcoming, expired, sold_out)

## Frontend Features
- Modern responsive UI with Tailwind CSS styling
- Interactive forms with Stimulus controller for dynamic calculations
- Revenue calculators showing potential, current, and remaining revenue
- Status indicators with appropriate colors and icons
- Buyer analytics and purchase history display

## JavaScript Enhancements
- New TicketTypeFormController for dynamic pricing calculations
- Real-time total updates as users type price/quantity
- Proper French currency formatting
- Form validation for minimum quantities based on existing sales

## Bug Fixes
 Fixed nil value errors in price_euros method when price_cents is nil
 Added defensive programming for all calculation methods
 Graceful handling of incomplete ticket types during creation
 Proper default values for new ticket type instances

## Files Added/Modified
- app/controllers/promoter/ticket_types_controller.rb (new)
- app/javascript/controllers/ticket_type_form_controller.js (new)
- app/views/promoter/ticket_types/*.html.erb (4 new view files)
- app/models/ticket_type.rb (enhanced with helper methods)
- config/routes.rb (added nested ticket_types routes)
- db/migrate/*_add_requires_id_to_ticket_types.rb (new migration)

## Integration
- Seamless integration with existing event management system
- Updated promoter event show page with ticket management link
- Proper scoping ensuring promoters only manage their own tickets
- Compatible with existing ticket purchasing and checkout flow
2025-09-01 00:03:35 +02:00
kbe
aa5dccb508 feat: Implement comprehensive event management system for promoters
This commit adds a complete event management interface allowing promoters to 
create, edit, and manage their events with full CRUD operations.

## Backend Features
- New Promoter::EventsController with full CRUD operations
- Event state management (draft, published, canceled, sold_out)
- User authorization system with can_manage_events? method
- Proper scoping to ensure users only see their own events

## Frontend Features  
- Modern responsive UI with Tailwind CSS styling
- Event listing with status indicators and quick actions
- Comprehensive event creation and editing forms
- Detailed event show page with metrics and management options
- Integration with main dashboard via promoter action buttons

## JavaScript Improvements
- Refactored inline JavaScript to dedicated Stimulus controller
- Auto-slug generation from event names with proper sanitization
- Improved code organization following Rails conventions

## Routes & Navigation
- Namespaced promoter routes under /promoter/
- RESTful endpoints with state management actions
- Proper breadcrumb navigation and user flow

## Files Added/Modified
- app/controllers/promoter/events_controller.rb (new)
- app/javascript/controllers/event_form_controller.js (new) 
- app/views/promoter/events/*.html.erb (4 new view files)
- app/models/user.rb (added authorization methods)
- app/views/pages/dashboard.html.erb (added promoter buttons)
- config/routes.rb (added promoter namespace)
- app/javascript/controllers/index.js (registered new controller)

🎯 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-08-31 19:22:19 +02:00
kbe
1acc3e09d4 feat: Implement payment retry system and draft ticket expiry management
- Add 30-minute expiry window for draft tickets with automatic cleanup
- Implement 3-attempt payment retry mechanism with tracking
- Create background job for cleaning expired draft tickets every 10 minutes
- Add comprehensive UI warnings for expiring tickets and retry attempts
- Enhance dashboard to display pending draft tickets with retry options
- Add payment cancellation handling with smart retry redirections
- Include rake tasks for manual cleanup and statistics
- Add database fields: expires_at, payment_attempts, last_payment_attempt_at, stripe_session_id
- Fix payment attempt counter display to show correct attempt number (1/3, 2/3, 3/3)
2025-08-31 10:22:55 +02:00
kbe
48c648e2ca feat: Checkout worflow using Stripe working. 2025-08-30 21:28:27 +02:00
kbe
b493027c86 feat: Refactor cart storage to use API architecture
Move store_cart functionality from main EventsController to API namespace:
- Add store_cart method to Api::V1::EventsController with API key bypass
- Remove store_cart from main EventsController
- Update routes to use RESTful API endpoint structure
- Maintain session-based cart storage for frontend compatibility
2025-08-30 20:14:05 +02:00
kbe
6ea3005a65 feat: Implement complete ticket purchasing flow with new TicketsController
- Create new TicketsController with actions for name collection, creation, and checkout
- Add dedicated ticket views (new.html.erb, checkout.html.erb, show.html.erb)
- Update ticket_selection_controller.js to handle form submission via AJAX
- Add store_cart endpoint in EventsController for session-based cart management
- Update routes to support new ticket flow: /tickets/new, /create, /checkout
- Fix attribute name consistency across views (title→name, starts_at→start_time)
- Add Stripe checkout integration with proper error handling
- Remove deprecated collect_names flow in favor of streamlined approach

The flow is now: Event selection → AJAX cart storage → Name collection → Checkout → Payment
2025-08-30 20:03:34 +02:00
kbe
476438c5c4 feat: Prepare to use Stripe a checkout component 2025-08-30 15:10:57 +02:00
kbe
055640b73e Fix responsive header navigation for mobile devices
- Restructure header component to properly separate desktop and mobile views
- Ensure mobile menu is hidden by default and only shown when hamburger is
clicked
- Improve layout and spacing for better mobile experience
- Maintain all existing functionality for both desktop and mobile
2025-08-30 14:36:41 +02:00
kbe
a7e83d79d7 Fix responsive header navigation for mobile devices
- Restructure header component to properly separate desktop and mobile views
- Ensure mobile menu is hidden by default and only shown when hamburger is clicked
- Improve layout and spacing for better mobile experience
- Maintain all existing functionality for both desktop and mobile
2025-08-30 14:34:22 +02:00
kbe
9404f10c93 Replace Alpine.js with Stimulus controller for header navigation
- Create header_controller.js to handle mobile menu and user dropdown
- Replace Alpine.js directives with Stimulus data attributes in header component
- Add proper event handling for click outside to close menus
- Maintain all existing functionality with improved code consistency
2025-08-30 14:30:32 +02:00