Commit Graph

14 Commits

Author SHA1 Message Date
kbe
bc47027c22 refactor: Convert ticket views to use only Tailwind CSS
- Rewrite ticket show view to use pure Tailwind CSS classes
- Update color scheme from gray-* to slate-* for modern look
- Replace indigo gradients with violet for better consistency
- Enhance spacing, typography, and visual hierarchy
- Add ticket_view route and controller action for PDF-like display
- Implement responsive QR code display with proper sizing
- Update status badge colors for better semantic meaning
- Improve accessibility with better button layouts and focus states

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 00:33:24 +02:00
kbe
7ef934d8a8 fix: Replace Prawn with Grover for PDF ticket generation
- Replace Prawn PDF generation with Grover (Chrome headless) for better compatibility
- Add HTML-based ticket template with embedded CSS styling
- Implement robust Grover loading with fallback to HTML download
- Add QR code generation methods to Ticket model
- Remove legacy TicketPdfGenerator service and tests
- Update PDF generation in TicketsController with proper error handling

The new implementation provides:
- Better HTML/CSS rendering for ticket layouts
- More reliable PDF generation using Chrome engine
- Fallback mechanism for better user experience
- Cleaner separation of template rendering and PDF conversion

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-06 00:04: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
15e3c7dff5 style: correct coding style with rubocop linter 2025-09-05 12:02:44 +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
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
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
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
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