- Replace Prawn PDF generation with Grover (Chrome headless) for better compatibility - Add HTML-based ticket template with embedded CSS styling - Implement robust Grover loading with fallback to HTML download - Add QR code generation methods to Ticket model - Remove legacy TicketPdfGenerator service and tests - Update PDF generation in TicketsController with proper error handling The new implementation provides: - Better HTML/CSS rendering for ticket layouts - More reliable PDF generation using Chrome engine - Fallback mechanism for better user experience - Cleaner separation of template rendering and PDF conversion 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
14 lines
580 B
Plaintext
14 lines
580 B
Plaintext
<% content_for :title, "Ticket ##{ticket.id}" %>
|
|
|
|
<div style="font-family: Arial, sans-serif; max-width: 350px; margin: 20px auto; padding: 20px; border: 1px solid #ccc;">
|
|
<div style="text-align: center;">
|
|
<h1 style="color: #2D1B69;">ApéroNight</h1>
|
|
</div>
|
|
<h2><%= ticket.event.name %></h2>
|
|
<p>Ticket Holder: <%= ticket.first_name %> <%= ticket.last_name %></p>
|
|
<p>Ticket Type: <%= ticket.ticket_type.name %></p>
|
|
<p>Price: €<%= ticket.price_euros %></p>
|
|
<div style="text-align: center; margin-top: 20px;">
|
|
<%= raw ticket.generate_qr_svg %>
|
|
</div>
|
|
</div> |