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
This commit is contained in:
kbe
2025-08-30 19:03:29 +02:00
parent 476438c5c4
commit 48547f3aad
38 changed files with 1151 additions and 297 deletions

View File

@@ -18,7 +18,7 @@ export default class extends Controller {
// Auto-dismiss after 2 seconds
this.timeout = setTimeout(() => {
this.close()
}, 2000)
}, 5000)
}
// Clean up the timeout when the controller disconnects
@@ -32,7 +32,7 @@ export default class extends Controller {
close() {
// Add opacity transition classes
this.element.classList.add('opacity-0', 'transition-opacity', 'duration-300')
// Remove element after transition completes
setTimeout(() => {
this.element.remove()