Skip to content

Commit

Permalink
Close #2114 Remove the QR code on the order_mailer page
Browse files Browse the repository at this point in the history
  • Loading branch information
Sreyleak-Deth committed Dec 5, 2024
1 parent b011684 commit d8becb9
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 22 deletions.
1 change: 0 additions & 1 deletion app/controllers/spree_cm_commissioner/orders_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ class SpreeCmCommissioner::OrdersController < Spree::BaseController

def show
@order = Spree::Order.search_by_qr_data!(params[:id])
@show_qr = true
@product_type = @order.products.first&.product_type || 'accommodation'

render :template => 'spree/order_mailer/confirm_email'
Expand Down
1 change: 0 additions & 1 deletion app/mailers/spree/order_mailer_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def confirm_email(order, resend: false)

@current_store = @order.store
@product_type = @order.products.first&.product_type || 'accommodation'
@show_qr = false

subject = (resend ? "[#{Spree.t(:resend).upcase}] " : '')
subject += "#{@current_store&.name} Booking Confirmation ##{@order.number}"
Expand Down
2 changes: 1 addition & 1 deletion app/views/spree/order_mailer/confirm_email.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<tr>
<td>
<div class="f-fallback">
<%= render 'spree_cm_commissioner/order_mailer/greeting', order: @order, show_qr: @show_qr %>
<%= render 'spree_cm_commissioner/order_mailer/greeting', order: @order %>
<div class="content">
<%= render 'spree_cm_commissioner/order_mailer/order_total', order: @order %>
<%= render 'spree_cm_commissioner/order_mailer/your_booking', order: @order, show_booking_header: true %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="greeting-card" class="content-cell flex">
<div id="greeting-card">
<div>
<%= image_tag "mailer/bookme-plus.png", class: "icon-bookme-plus"%>
<div class="booking-confirm"><%= I18n.t('mail.order_mailer.booking_confirm')%></div>
Expand All @@ -7,11 +7,4 @@
<%= I18n.t('mail.order_mailer.booking_event', order_number: order.number || 'NA') %>
</div>
</div>

<% if show_qr %>
<div class="qr-container">
<%= image_tag main_app.url_for("/i/#{order.qr_data}"), class: 'qr-code' %>
<p>Show your QR to enter</p>
</div>
<% end %>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,6 @@
margin-bottom: 0.25rem;
margin-top: 1.25rem;
}
#confirm-email .qr-container {
padding: 20px 20px 0;
text-align: center;
}

#confirm-email .qr-container .qr-code {
width: 200px;
border-radius: 26px;
background-color: #fff;
margin-bottom: 12px;
}
#confirm-email #greeting-card .booking-confirm {
font-size: 1.5rem;
padding: 0.625rem 0;
Expand Down

0 comments on commit d8becb9

Please sign in to comment.