Merge pull request #12743 from wandji20/wb-OFN-12214

(Fix) chore(deps): bump wicked_pdf from 2.6.3 to 2.8.0 [OFN-12214]
This commit is contained in:
Konrad
2024-08-22 17:34:20 +02:00
committed by GitHub
14 changed files with 16 additions and 24 deletions

View File

@@ -835,7 +835,7 @@ GEM
websocket-extensions (0.1.5)
whenever (1.0.0)
chronic (>= 0.6.3)
wicked_pdf (2.6.3)
wicked_pdf (2.8.1)
activesupport
wkhtmltopdf-binary (0.12.6.7)
xml-simple (1.1.8)

View File

@@ -0,0 +1 @@
@import './mail/all.scss';

View File

@@ -0,0 +1,3 @@
@import '../../../webpacker/css/admin/globals/palette.scss';
@import 'email';
@import 'payments_list';

View File

@@ -61,15 +61,6 @@ module ApplicationHelper
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
def cache_with_locale(key = nil, options = {}, &block)
cache(cache_key_with_locale(key, I18n.locale), options) do
yield(block)

View File

@@ -5,7 +5,7 @@
%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
%title
= Spree::Config[:site_name]
= stylesheet_pack_tag 'mail'
= stylesheet_link_tag 'mail'
%body{:bgcolor => "#FFFFFF" }
- unless @hide_ofn_navigation
%table.head-wrap{:bgcolor => "#f2f2f2"}

View File

@@ -1,4 +1,4 @@
= pdf_stylesheet_pack_tag "mail"
= wicked_pdf_stylesheet_link_tag "mail"
%table{:width => "100%"}
%tbody

View File

@@ -1,4 +1,4 @@
= pdf_stylesheet_pack_tag "mail"
= wicked_pdf_stylesheet_link_tag "mail"
%table{:width => "100%"}
%tbody

View File

@@ -1,4 +1,4 @@
= pdf_stylesheet_pack_tag "mail"
= wicked_pdf_stylesheet_link_tag "mail"
%table{:width => "100%"}
%tbody

View File

@@ -1,3 +0,0 @@
@import '../admin/globals/palette.scss';
@import 'email';
@import 'payments_list';

View File

@@ -1 +0,0 @@
@import "../css/mail/all.scss";

View File

@@ -216,6 +216,7 @@ module Openfoodnetwork
config.assets.precompile += ['web/all.js']
config.assets.precompile += ['darkswarm/all.js']
config.assets.precompile += ['shared/*']
config.assets.precompile += ['mail.scss']
config.assets.precompile += ['*.jpg', '*.jpeg', '*.png', '*.gif' '*.svg']
# Highlight code that triggered database queries in logs.

View File

@@ -535,10 +535,10 @@ RSpec.describe '
# header
expect(page).to have_content "Item Qty"
expect(page).to have_content "Weight / VOL."
expect(page).to have_content "Price Per unit (Excl. tax)"
expect(page).to have_content "Total price (Excl. tax)"
expect(page).to have_content "Price Per unit (Excl."
expect(page).to have_content "Total price (Excl."
expect(page).to have_content "Tax rate"
expect(page).to have_content "Total price (Incl. tax)"
expect(page).to have_content "Total price (Incl."
# first line item, no tax
expect(page).to have_content Spree::Product.first.name.to_s
expect(page).to have_content "($12,540.00 / kg)" # unit price
@@ -639,10 +639,10 @@ RSpec.describe '
# header
expect(page).to have_content "Item Qty"
expect(page).to have_content "Weight / VOL."
expect(page).to have_content "Price Per unit (Excl. tax)"
expect(page).to have_content "Total price (Excl. tax)"
expect(page).to have_content "Price Per unit (Excl."
expect(page).to have_content "Total price (Excl."
expect(page).to have_content "Tax rate"
expect(page).to have_content "Total price (Incl. tax)"
expect(page).to have_content "Total price (Incl."
# first line item, no tax
expect(page).to have_content Spree::Product.first.name.to_s
expect(page).to have_content "($12,540.00 / kg)" # unit price