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:
@@ -1,21 +1,21 @@
|
||||
<% if flash.any? %>
|
||||
<div class="flash-messages-container" style="position: relative; width: 100%; display: flex; justify-content: center; padding: var(--space-4); margin-top: var(--space-4);">
|
||||
<div style="width: 100%; max-width: 600px;">
|
||||
<% flash.each do |type, message| %>
|
||||
<div class="notification <%= flash_class(type) %>"
|
||||
data-controller="flash-message"
|
||||
style="display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); margin-bottom: var(--space-3); font-weight: 500; width: 100%; box-sizing: border-box;">
|
||||
<div class="notification-icon" style="display: flex; align-items: center; flex-shrink: 0;">
|
||||
<%= flash_icon(type) %>
|
||||
<div class="container">
|
||||
<div class="relative w-full flex justify-center p-4 mt-4">
|
||||
<div class="w-full max-w-xl">
|
||||
<% flash.each do |type, message| %>
|
||||
<div class="notification <%= flash_class(type) %> flex items-center gap-3 p-4 rounded-lg mb-3 font-medium w-full box-border"
|
||||
data-controller="flash-message">
|
||||
<div class="notification-icon flex items-center shrink-0">
|
||||
<%= flash_icon(type) %>
|
||||
</div>
|
||||
<span class="flex-1"><%= message %></span>
|
||||
<button data-action="click->flash-message#close"
|
||||
class="bg-transparent border-none cursor-pointer p-1 text-inherit opacity-70 transition-opacity duration-200">
|
||||
<i data-lucide="x" class="w-4 h-4"></i>
|
||||
</button>
|
||||
</div>
|
||||
<span style="flex: 1;"><%= message %></span>
|
||||
<button data-action="click->flash-message#close"
|
||||
style="background: none; border: none; cursor: pointer; padding: var(--space-1); color: inherit; opacity: 0.7; transition: opacity 0.2s;">
|
||||
<i data-lucide="x" style="width: 16px; height: 16px;"></i>
|
||||
</button>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user