From 829b7880a5a03259b417e81618467be53b80e3af Mon Sep 17 00:00:00 2001 From: Arthur Campbell Date: Thu, 27 Apr 2023 14:42:07 +0100 Subject: [PATCH] remove reminder comments --- app/controllers/sales_logs_controller.rb | 2 +- app/models/form_handler.rb | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/controllers/sales_logs_controller.rb b/app/controllers/sales_logs_controller.rb index 3a83e5b41..5e9777a3c 100644 --- a/app/controllers/sales_logs_controller.rb +++ b/app/controllers/sales_logs_controller.rb @@ -44,7 +44,7 @@ class SalesLogsController < LogsController end def email_csv - all_orgs = params["organisation_select"] == "all" # what's this for? params['organisation_select'] appears to always be nil + all_orgs = params["organisation_select"] == "all" EmailCsvJob.perform_later(current_user, search_term, @session_filters, all_orgs, nil, codes_only_export?, "sales") redirect_to csv_confirmation_sales_logs_path end diff --git a/app/models/form_handler.rb b/app/models/form_handler.rb index ea43578de..cdebdc679 100644 --- a/app/models/form_handler.rb +++ b/app/models/form_handler.rb @@ -40,14 +40,6 @@ class FormHandler } end - # there is a problem with this that is potentially more general, which is what we plan to do about - # forms that are 2+ years old. - # eg. if there is a question/attribute on the 21/22 form that no longer exists, we will not export that already - # What is the status of old forms on the web app? I believe we are not allowed to edit but are we allowed to view? - # If yes that might be a problem. - # If not I suggest that it might be easier in this method to replace line 1 with: - # sales_forms = [2021..2023].each { |year| Form.new(nil, year, SALES_SECTIONS, sales) } - # sidenote, why do we save a reference to the next years sales log in the FormHandler? def ordered_sales_questions_for_all_years sales_forms = forms.filter { |name, _form| name.end_with? "sales" }.values ordered_questions = sales_forms.pop.questions.uniq(&:id)