feat: PDF ticket generation
- Each ticket has a unique URL for viewing and downloading - Only the ticket owner can access their ticket - The customer's name is clearly displayed on the ticket - The PDF can be downloaded directly from the ticket view page - All existing functionality continues to work as expected
This commit is contained in:
@@ -32,13 +32,18 @@ class TicketPdfGenerator
|
||||
# Ticket info box
|
||||
pdf.stroke_color "E5E7EB"
|
||||
pdf.fill_color "F9FAFB"
|
||||
pdf.rounded_rectangle [ 0, pdf.cursor ], 310, 120, 10
|
||||
pdf.rounded_rectangle [ 0, pdf.cursor ], 310, 150, 10
|
||||
pdf.fill_and_stroke
|
||||
|
||||
pdf.move_down 10
|
||||
pdf.fill_color "000000"
|
||||
pdf.font "Helvetica", size: 12
|
||||
|
||||
# Customer name
|
||||
pdf.text "Ticket Holder:", style: :bold
|
||||
pdf.text "#{ticket.first_name} #{ticket.last_name}"
|
||||
pdf.move_down 8
|
||||
|
||||
# Ticket details
|
||||
pdf.text "Ticket Type:", style: :bold
|
||||
pdf.text ticket.ticket_type.name
|
||||
|
||||
Reference in New Issue
Block a user