Fix Fontawesome styles inclusion in PDF reports [SCI-11302] (#8059)

This commit is contained in:
Alex Kriuchykhin 2024-11-21 15:10:26 +01:00 committed by Oleksii Kriuchykhin
parent 22a9714aa0
commit 7dc201ed45
2 changed files with 2 additions and 9 deletions

View file

@ -64,12 +64,6 @@ module ReportsHelper
"<span class=\"label step-label-#{style}\">[#{text}]</span>".html_safe
end
def font_awesome_links
[{ url: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/fontawesome.min.css' },
{ url: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/regular.min.css' },
{ url: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/solid.min.css' }]
end
def filter_steps_for_report(steps, settings)
include_completed_steps = settings.dig('task', 'protocol', 'completed_steps')
include_uncompleted_steps = settings.dig('task', 'protocol', 'uncompleted_steps')

View file

@ -92,7 +92,8 @@ module Reports
'application',
'reports_pdf',
'bootstrap_pack',
'handsontable.formula'
'handsontable.formula',
'fontawesome'
]
javascript_files = [
@ -119,8 +120,6 @@ module Reports
{ content: fetch_asset_content("#{file_name}.css") }
end
@style_tag_options.concat(font_awesome_links)
@script_tag_options = javascript_files.map do |file_name|
{ content: fetch_asset_content("#{file_name}.js") }
end