mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Report Refactor 1: Customers
This commit is contained in:
committed by
Jean-Baptiste Bellet
parent
e55462d18b
commit
1fee45035c
@@ -10,7 +10,7 @@ module OpenFoodNetwork
|
||||
@compile_table = compile_table
|
||||
end
|
||||
|
||||
def header
|
||||
def table_headers
|
||||
if is_mailing_list?
|
||||
[I18n.t(:report_header_email),
|
||||
I18n.t(:report_header_first_name),
|
||||
@@ -28,7 +28,7 @@ module OpenFoodNetwork
|
||||
end
|
||||
end
|
||||
|
||||
def table
|
||||
def table_rows
|
||||
return [] unless @compile_table
|
||||
|
||||
orders.map do |order|
|
||||
@@ -93,7 +93,7 @@ module OpenFoodNetwork
|
||||
private
|
||||
|
||||
def is_mailing_list?
|
||||
params[:report_type] == "mailing_list"
|
||||
params[:report_subtype] == "mailing_list"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user