- Updated all breadcrumbs to match the style used in events index page - Simplified breadcrumb design with cleaner, more consistent look - Maintained proper navigation paths for all pages - Improved overall UI consistency across the application Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
185 lines
10 KiB
Plaintext
185 lines
10 KiB
Plaintext
<div class="min-h-screen bg-gradient-to-br from-purple-50 to-indigo-50 py-8">
|
|
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
<!-- Breadcrumb -->
|
|
<nav class="mb-8" aria-label="Breadcrumb">
|
|
<ol class="flex items-center space-x-2 text-sm">
|
|
<%= link_to root_path, class: "text-gray-500 hover:text-purple-600 transition-colors" do %>
|
|
<svg class="w-4 h-4 inline-block mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/>
|
|
</svg>
|
|
Accueil
|
|
<% end %>
|
|
<svg class="w-4 h-4 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
|
|
</svg>
|
|
<%= link_to dashboard_path, class: "text-gray-500 hover:text-purple-600 transition-colors" do %>
|
|
Tableau de bord
|
|
<% end %>
|
|
<svg class="w-4 h-4 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
|
|
</svg>
|
|
<li class="font-medium text-gray-900" aria-current="page">Commande #<%= @order&.id || 'Inconnue' %></li>
|
|
</ol>
|
|
</nav>
|
|
|
|
<!-- Header -->
|
|
<div class="text-center mb-8">
|
|
<div class="mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4">
|
|
<svg class="w-8 h-8 text-purple-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
|
|
</svg>
|
|
</div>
|
|
<h1 class="text-3xl font-bold text-gray-900 mb-2">Détails de la Commande</h1>
|
|
</div>
|
|
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
|
<!-- Event & Order Details -->
|
|
<div class="bg-white rounded-2xl shadow-xl p-6 md:p-8">
|
|
<div class="border-b border-gray-200 pb-6 mb-6">
|
|
<h2 class="text-2xl font-bold text-gray-900 mb-2">Détails de Votre Commande</h2>
|
|
<% if @order %>
|
|
<div class="flex items-center text-sm text-gray-600 space-x-4">
|
|
<div class="flex items-center">
|
|
<svg class="w-4 h-4 mr-2 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
|
|
</svg>
|
|
<div class="flex flex-col">
|
|
<span class="font-medium">Commande n°<%= @order.id %></span>
|
|
<span class="text-xs text-gray-500"><%= @order.created_at.strftime("%d %B %Y") %></span>
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center">
|
|
<svg class="w-4 h-4 mr-1 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
</svg>
|
|
<span class="text-red-600 font-medium">
|
|
Paiement annulé
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<% else %>
|
|
<p class="text-gray-600">Aucune commande trouvée.</p>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% if @order %>
|
|
<!-- Event Information -->
|
|
<div class="mb-6">
|
|
<h3 class="text-lg font-semibold text-gray-900 mb-3">Événement</h3>
|
|
<div class="bg-purple-50 rounded-lg p-4 border border-purple-200">
|
|
<h4 class="font-semibold text-purple-900 text-lg"><%= @order.event.name %></h4>
|
|
<div class="mt-2 space-y-1 text-sm text-purple-700">
|
|
<% if @order.event.start_time %>
|
|
<div class="flex items-center">
|
|
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
</svg>
|
|
<%= @order.event.start_time.strftime("%d %B %Y à %H:%M") %>
|
|
</div>
|
|
<% end %>
|
|
<% if @order.event.venue_name.present? %>
|
|
<div class="flex items-center">
|
|
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"/>
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"/>
|
|
</svg>
|
|
<%= @order.event.venue_name %>
|
|
</div>
|
|
<% end %>
|
|
<% if @order.event.venue_address.present? %>
|
|
<div class="flex items-center">
|
|
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"/>
|
|
</svg>
|
|
<%= @order.event.venue_address %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Summary -->
|
|
<div class="space-y-4">
|
|
<h3 class="text-lg font-semibold text-gray-900 mb-4">Récapitulatif</h3>
|
|
|
|
<% @order.tickets.each do |ticket| %>
|
|
<div class="flex items-center justify-between py-3 border-b border-gray-100 last:border-b-0">
|
|
<div class="flex-1 min-w-0">
|
|
<h4 class="text-sm font-medium text-gray-900 truncate"><%= ticket.ticket_type.name %></h4>
|
|
<div class="flex items-center text-xs text-gray-500 mt-1">
|
|
<svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>
|
|
</svg>
|
|
<%= ticket.first_name %> <%= ticket.last_name %>
|
|
</div>
|
|
<div class="flex items-center text-xs text-red-600 mt-1">
|
|
<svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
</svg>
|
|
En attente de paiement
|
|
</div>
|
|
</div>
|
|
<div class="text-right">
|
|
<div class="text-lg font-semibold text-gray-900"><%= ticket.price_euros %>€</div>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<!-- Total -->
|
|
<div class="border-t border-gray-200 pt-6 mt-6">
|
|
<div class="flex items-center justify-between text-lg">
|
|
<span class="font-medium text-gray-900">Total à payer</span>
|
|
<span class="font-bold text-2xl text-red-600">
|
|
<%= @order.total_amount_euros %>€
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<!-- Actions & Ticket Access -->
|
|
<div class="bg-white rounded-2xl shadow-xl p-6 md:p-8 h-fit">
|
|
<% if @order&.can_retry_payment? %>
|
|
<!-- Payment Required -->
|
|
<div class="border-b border-gray-200 pb-6 mb-6">
|
|
<h2 class="text-xl font-bold text-gray-900 mb-2">Paiement Requis</h2>
|
|
<p class="text-sm text-gray-600">Votre commande nécessite un paiement</p>
|
|
</div>
|
|
|
|
<div class="mb-6">
|
|
<%= link_to checkout_order_path(@order), class: "block w-full text-center py-3 px-4 bg-orange-600 hover:bg-orange-700 text-white font-medium rounded-lg transition-colors" do %>
|
|
<div class="flex items-center justify-center">
|
|
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"/>
|
|
</svg>
|
|
Procéder au Paiement
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<!-- Navigation Actions -->
|
|
<div class="border-t border-gray-200 pt-6 mt-6">
|
|
<div class="space-y-3">
|
|
<%= link_to dashboard_path, class: "block w-full text-center py-3 px-4 bg-purple-600 hover:bg-purple-700 text-white font-medium rounded-lg transition-colors" do %>
|
|
<div class="flex items-center justify-center">
|
|
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"/>
|
|
</svg>
|
|
Retour au Tableau de Bord
|
|
</div>
|
|
<% end %>
|
|
<%= link_to event_path(@order.event.slug, @order.event), class: "block w-full text-center py-3 px-4 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors" do %>
|
|
<div class="flex items-center justify-center">
|
|
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/>
|
|
</svg>
|
|
Voir l'Événement Complet
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |