mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Packing Report: use field name as columns headers in spreadsheet export
This commit is contained in:
committed by
Jean-Baptiste Bellet
parent
2008c10c6f
commit
b7991e5ae8
@@ -35,6 +35,13 @@ module Reporting
|
||||
{ price: :currency, 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
|
||||
|
||||
private
|
||||
|
||||
def select_fields
|
||||
|
||||
Reference in New Issue
Block a user