From 8ec12f035de9169d9602a0d8fad1f83c57384114 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Sat, 1 Feb 2025 21:43:58 -0800 Subject: [PATCH] add temp file to compare diffs --- .../_total_purchased_tmp.haml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 app/views/conference_registrations/_total_purchased_tmp.haml diff --git a/app/views/conference_registrations/_total_purchased_tmp.haml b/app/views/conference_registrations/_total_purchased_tmp.haml new file mode 100644 index 000000000..fb3796a48 --- /dev/null +++ b/app/views/conference_registrations/_total_purchased_tmp.haml @@ -0,0 +1,45 @@ +------------ SnapCon: +.col-md-12 + - @total_price_per_currency.each do |currency, total_price| + %h4 + Total Purchased (#{currency}): + = humanized_money_with_symbol(total_price) + %ul + - @total_price_per_ticket_per_currency.select { |(id, curr)| curr == currency }.each do |(ticket_id, curr), total_amount| + - purchase = @purchases.find { |p| p.ticket_id == ticket_id && p.currency == curr } + %li + - title = purchase.title.titleize.gsub(/(?i)\bticket\b/, 'Tickets') + - title = title.include?('Tickets') ? title : "#{title} Tickets" + = "#{@total_quantity[[ticket_id, currency]]} #{title} for " + = humanized_money_with_symbol(total_amount) + .btn-group{ role: 'group' } + = link_to 'View all tickets', + conference_physical_tickets_path(@conference.short_title), + class: 'btn btn-success' + = link_to 'Get more tickets', + conference_tickets_path(@conference.short_title), + class: 'btn btn-default' + + + +----------- OSEM: +Total Purchased: += "(#{@tickets.first.price.symbol}#{humanized_money @total_price})" +%ul + .col-md-12 + - @ticket_payments.each_pair do |ticket_id, tickets| + %li + = @total_quantity[ticket_id] + = tickets.first.title + = pluralize(@total_quantity[ticket_id], 'Ticket') + for + = tickets.first.price.symbol + = humanized_money @total_price_per_ticket[ticket_id] + %br +.btn-group{ role: 'group' } + = link_to 'View all tickets', + conference_physical_tickets_path(@conference.short_title), + class: 'btn btn-success' + = link_to 'Get more tickets', + conference_tickets_path(@conference.short_title), + class: 'btn btn-default'