mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #9945 from jibees/9944-translate-columns-in-packing-and-xero-reports
Packing reports: translate columns name in the columns selector component
This commit is contained in:
@@ -15,7 +15,7 @@ module Reporting
|
||||
end
|
||||
|
||||
def html_render?
|
||||
@report.params[:report_format].in?(['', 'pdf'])
|
||||
@report.params[:report_format].in?([nil, '', 'pdf'])
|
||||
end
|
||||
|
||||
def display_header_row?
|
||||
|
||||
@@ -29,13 +29,6 @@ module Reporting
|
||||
{ quantity: :quantity }
|
||||
end
|
||||
|
||||
def custom_headers
|
||||
return {} if html_render?
|
||||
|
||||
# Use non translated headers to avoid breaking changes
|
||||
@custom_headers ||= report_data.columns.index_by(&:itself).symbolize_keys
|
||||
end
|
||||
|
||||
def default_params
|
||||
# Prevent breaking change in this report by hidding new columns by default
|
||||
{ fields_to_hide: ["phone", "price"],
|
||||
|
||||
Reference in New Issue
Block a user