mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-23 05:28:53 +00:00
Packing Report: Refactor view to be reusable by other reports
For now this view is used only in the context of packing, but later we would move all existing rpeort to use same view
This commit is contained in:
committed by
Jean-Baptiste Bellet
parent
1ff98a1d8a
commit
d53d38906a
@@ -30,7 +30,7 @@ module Admin
|
||||
assign_view_data
|
||||
load_form_options
|
||||
|
||||
render report_type
|
||||
render "show"
|
||||
end
|
||||
|
||||
def assign_view_data
|
||||
@@ -39,6 +39,9 @@ module Admin
|
||||
@report_subtypes = report_class.report_subtypes.map do |subtype|
|
||||
[t("packing.#{subtype}_report", scope: i18n_scope), subtype]
|
||||
end
|
||||
if @report_type == "packing"
|
||||
@report_message = I18n.t("spree.admin.reports.customer_names_message.customer_names_tip")
|
||||
end
|
||||
end
|
||||
|
||||
def load_form_options
|
||||
|
||||
Reference in New Issue
Block a user