Détails de la Commande

Informations

Commande n°<%= @order.id %> <%= @order.created_at.strftime("%d %B %Y") %>
<% if @order.status == 'paid' || @order.status == 'completed' %> <% else %> <% end %> <%= case @order.status when 'paid' then 'Payé' when 'completed' then 'Terminé' else @order.status.humanize end %>

Événement

<%= @order.event.name %>

<% if @order.event.start_time %>
<%= @order.event.start_time.strftime("%d %B %Y à %H:%M") %>
<% end %> <% if @order.event.venue_name.present? %>
<%= @order.event.venue_name %>
<% end %> <% if @order.event.venue_address.present? %>
<%= @order.event.venue_address %>
<% end %>

Récapitulatif

<% @tickets.each do |ticket| %>

<%= ticket.ticket_type.name %>

<%= ticket.first_name %> <%= ticket.last_name %>
<% if @order.status == 'paid' || @order.status == 'completed' %>
Actif
<% end %>
<%= ticket.price_euros %>€
<% end %>
Sous-total <%= @order.total_amount_euros - 1.0 %>€
Frais de service 1.00€
Total <%= @order.status == 'paid' || @order.status == 'completed' ? 'payé' : 'à payer' %> <%= @order.total_amount_euros %>€
<% if @order.status == 'paid' || @order.status == 'completed' %>

Consulter la Facture

Téléchargez ou consultez la facture de votre commande.

<%= link_to invoice_order_path(@order), class: "inline-flex items-center px-4 py-2 bg-blue-600 text-white font-medium rounded-lg hover:bg-blue-700 transition-colors" do %> Voir la facture <% end %>
<% end %>
<% if @order.status == 'paid' || @order.status == 'completed' %>

Accédez à Vos Billets

Téléchargez ou consultez vos billets

Télécharger Vos Billets

Gardez vos billets sur votre téléphone ou imprimez-les.

<% @tickets.each_with_index do |ticket, index| %>
<%= link_to ticket_path(ticket.qr_code), class: "flex-1 flex items-center text-purple-700 hover:text-purple-800 font-medium" do %>
<%= index + 1 %>
<%= ticket.first_name %> <%= ticket.last_name %> <% end %> <%= link_to ticket_download_path(ticket.qr_code), class: "ml-3 p-2 text-purple-600 hover:text-purple-800 hover:bg-purple-200 rounded-lg transition-colors", title: "Télécharger le billet PDF" do %> <% end %>
<% end %>

Le Jour de l'Événement

Présentez votre billet (QR code) à l'entrée. Arrivez un peu en avance !

<% else %>

Paiement Requis

Votre commande nécessite un paiement

<% if @order.can_retry_payment? %>
<%= 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 %>
Procéder au Paiement
<% end %>
<% end %> <% end %>
<%= 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 %>
Retour au tableau de bord
<% 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 %>
Voir la page d'évenement
<% end %>