mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-02 02:11:33 +00:00
Removed other filter rows. They weren't working and maybe not even relevant. The idea was to include order cycles and distributor ids as well, but it wasn't really requested so I'm taking it out.
This commit is contained in:
@@ -14,7 +14,6 @@ module Reporting
|
||||
rows.concat(title_rows)
|
||||
rows.concat(date_range_rows)
|
||||
rows.concat(printed_rows)
|
||||
rows.concat(other_filter_rows)
|
||||
rows << [] if rows.any? # spacer only if something was added
|
||||
rows
|
||||
end
|
||||
@@ -62,15 +61,6 @@ module Reporting
|
||||
[[I18n.t("printed", default: "Printed"), Time.now.utc.strftime('%F %T %Z')]]
|
||||
end
|
||||
|
||||
def other_filter_rows
|
||||
q = indifferent_ransack.except(*DATE_FROM_KEYS, *DATE_TO_KEYS)
|
||||
q.each_with_object([]) do |(k, v), rows|
|
||||
next if v.blank?
|
||||
|
||||
rows << [k.to_s.humanize, v.is_a?(Array) ? v.join(', ') : v.to_s]
|
||||
end
|
||||
end
|
||||
|
||||
def params
|
||||
(report.params || {}).with_indifferent_access
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user