<% content_for :title, "Billet ##{@ticket.id} - #{@ticket.event.name}" %>

ApéroNight

<%= @ticket.event.name %>

Porteur du billet: <%= @ticket.first_name %> <%= @ticket.last_name %>
Type de billet: <%= @ticket.ticket_type.name %>
Prix: <%= number_to_currency(@ticket.price_euros, unit: "€", separator: ",", delimiter: " ", format: "%n %u") %>
Date & Heure:
<%= @ticket.event.start_time.strftime("%d %B %Y") %>
<%= @ticket.event.start_time.strftime("%H:%M") %>
Lieu :
<%= @ticket.event.venue_name %>
<% if @ticket.event.venue_address.present? %>
<%= @ticket.event.venue_address %>
<% end %>

Code QR du billet

<%= raw @ticket.generate_qr_svg %>

QR: <%= @ticket.qr_code[0..7] %>...

Ce billet est valide pour une seule entrée.

Présentez ce billet à l'entrée du lieu.

Généré le <%= Time.current.strftime('%d %B %Y à %H:%M') %>

<%= link_to ticket_path(@ticket), class: "flex-1 flex items-center justify-center bg-slate-100 hover:bg-slate-200 text-slate-700 py-2.5 px-3 rounded-lg text-sm font-medium transition-colors duration-200" do %> Vue détaillée <% end %> <% if @ticket.status == 'active' %> <%= link_to download_ticket_path(@ticket.id), class: "flex-1 flex items-center justify-center bg-purple-600 hover:bg-purple-700 text-white py-2.5 px-3 rounded-lg text-sm font-medium transition-colors duration-200 shadow-sm hover:shadow-md" do %> PDF <% end %> <% end %>
<%= link_to dashboard_path, class: "inline-flex items-center text-purple-600 hover:text-purple-800 text-sm font-medium transition-colors duration-200" do %> Retour au tableau de bord <% end %>