load fields_to_show from DB when user access the report

This commit is contained in:
Mohamed ABDELLANI
2022-11-16 12:08:32 +01:00
parent 9561140466
commit 709dfa42bc
2 changed files with 20 additions and 5 deletions

View File

@@ -51,11 +51,7 @@ module Admin
# Initialize data
params[:display_summary_row] = true if request.get?
@params_fields_to_show = if request.get?
@report.columns.keys - @report.fields_to_hide
else
params[:fields_to_show]
end
@params_fields_to_show = render_options.options[:fields_to_show]
@data = Reporting::FrontendData.new(spree_current_user)
end