Put the ticket token into the registration export

This commit is contained in:
Henne Vogelsang 2025-06-10 12:21:56 +02:00
parent 9a398da9c8
commit aaff07e48b

View file

@ -3,7 +3,7 @@
wb = xlsx_package.workbook
wb.add_worksheet(name: 'registrations') do |sheet|
bold_style = wb.styles.add_style(b: true)
row = ['Attended', 'Name', 'Nickname', 'Affilιation', 'Email']
row = ['Attended', 'Name', 'Nickname', 'Affilιation', 'Email', 'Ticket Token']
@conference.questions.each do |question|
row << question.title
@ -18,6 +18,7 @@ wb.add_worksheet(name: 'registrations') do |sheet|
row << registration.nickname
row << registration.affiliation
row << registration.email
row << registration.user.physical_tickets.by_conference(@conference).first&.token
@conference.questions.each do |question|
qa = registration.qanswers.find_by(question: question)
answer = ( qa ? qa.answer.title : '' )