diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e4e18601c7..8a507bfa98 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -48,4 +48,13 @@ module ApplicationHelper classes << "off-canvas" unless @hide_menu classes << @shopfront_layout end + + def pdf_stylesheet_pack_tag(source) + if running_in_development? + options = { media: "all", host: "#{Webpacker.dev_server.host}:#{Webpacker.dev_server.port}" } + stylesheet_pack_tag(source, **options) + else + wicked_pdf_stylesheet_pack_tag(source) + end + end end diff --git a/app/views/spree/admin/orders/invoice.html.haml b/app/views/spree/admin/orders/invoice.html.haml index 196a1a4777..55ad2104fb 100644 --- a/app/views/spree/admin/orders/invoice.html.haml +++ b/app/views/spree/admin/orders/invoice.html.haml @@ -1,4 +1,4 @@ -= wicked_pdf_stylesheet_pack_tag "mail" += pdf_stylesheet_pack_tag "mail" %table{:width => "100%"} %tbody diff --git a/app/views/spree/admin/orders/invoice2.html.haml b/app/views/spree/admin/orders/invoice2.html.haml index 68ebcbfd68..2f1b152cdf 100644 --- a/app/views/spree/admin/orders/invoice2.html.haml +++ b/app/views/spree/admin/orders/invoice2.html.haml @@ -1,4 +1,4 @@ -= wicked_pdf_stylesheet_pack_tag "mail" += pdf_stylesheet_pack_tag "mail" %table{:width => "100%"} %tbody