diff --git a/app/views/spree/shipment_mailer/shipped_email.html.haml b/app/views/spree/shipment_mailer/shipped_email.html.haml index 39a174d388..cd8a9eb15d 100644 --- a/app/views/spree/shipment_mailer/shipped_email.html.haml +++ b/app/views/spree/shipment_mailer/shipped_email.html.haml @@ -1,22 +1,18 @@ -%p +%h3 = t('.dear_customer') -%p +%p.lead = t('.instructions', distributor: @shipment.order.distributor.name) %p - = "============================================================" - %br - = t('.shipment_summary') - %br - = "============================================================" + %strong + = t('.shipment_summary') -%p +%p{ style: "font-family: monospace, serif;" } - @shipment.manifest.each do |item| = item.variant.sku = item.variant.product.name = item.variant.options_text - %br - = "============================================================" + %br - if @shipment.tracking %p @@ -26,5 +22,5 @@ %p = t('.track_link', url: @shipment.tracking_url) -%p +%p.lead = t('.thanks') diff --git a/spec/mailers/previews/shipment_preview.rb b/spec/mailers/previews/shipment_preview.rb new file mode 100644 index 0000000000..69721c1e9f --- /dev/null +++ b/spec/mailers/previews/shipment_preview.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +require 'open_food_network/scope_variant_to_hub' + +module Spree + class ShipmentPreview < ActionMailer::Preview + def shipped + ShipmentMailer.shipped_email(Shipment.last) + end + end +end