Browse Source

Revert "Handle back link for checking file page"

This reverts commit d3f775eaaa.
pull/2629/head
Manny Dinssa 2 years ago
parent
commit
a552b52a4a
  1. 2
      app/controllers/bulk_upload_lettings_logs_controller.rb
  2. 2
      app/controllers/bulk_upload_sales_logs_controller.rb
  3. 8
      app/models/forms/bulk_upload_lettings/checking_file.rb
  4. 2
      app/models/forms/bulk_upload_lettings/upload_your_file.rb
  5. 8
      app/models/forms/bulk_upload_sales/checking_file.rb
  6. 2
      app/models/forms/bulk_upload_sales/upload_your_file.rb

2
app/controllers/bulk_upload_lettings_logs_controller.rb

@ -55,7 +55,7 @@ private
when "upload-your-file"
Forms::BulkUploadLettings::UploadYourFile.new(form_params.merge(current_user:, request:))
when "checking-file"
Forms::BulkUploadLettings::CheckingFile.new(form_params.merge(request:))
Forms::BulkUploadLettings::CheckingFile.new(form_params)
else
raise "Page not found for path #{params[:id]}"
end

2
app/controllers/bulk_upload_sales_logs_controller.rb

@ -53,7 +53,7 @@ private
when "upload-your-file"
Forms::BulkUploadSales::UploadYourFile.new(form_params.merge(current_user:, request:))
when "checking-file"
Forms::BulkUploadSales::CheckingFile.new(form_params.merge(request:))
Forms::BulkUploadSales::CheckingFile.new(form_params)
else
raise "Page not found for path #{params[:id]}"
end

8
app/models/forms/bulk_upload_lettings/checking_file.rb

@ -6,19 +6,13 @@ module Forms
include Rails.application.routes.url_helpers
attribute :year, :integer
attribute :organisation_id, :integer
def view_path
"bulk_upload_lettings_logs/forms/checking_file"
end
def back_path
organisation_id = request.query_parameters[:organisation_id]
if organisation_id.present?
lettings_logs_organisation_path(organisation_id)
else
bulk_upload_lettings_log_path(id: "start")
end
bulk_upload_lettings_log_path(id: "start")
end
def year_combo

2
app/models/forms/bulk_upload_lettings/upload_your_file.rb

@ -36,7 +36,7 @@ module Forms
end
def next_path
bulk_upload_lettings_log_path(id: "checking-file", form: { year:, organisation_id: })
bulk_upload_lettings_log_path(id: "checking-file", form: { year: })
end
def save!

8
app/models/forms/bulk_upload_sales/checking_file.rb

@ -6,19 +6,13 @@ module Forms
include Rails.application.routes.url_helpers
attribute :year, :integer
attribute :organisation_id, :integer
def view_path
"bulk_upload_sales_logs/forms/checking_file"
end
def back_path
organisation_id = request.query_parameters[:organisation_id]
if organisation_id.present?
sales_logs_organisation_path(organisation_id)
else
bulk_upload_sales_log_path(id: "start")
end
bulk_upload_sales_log_path(id: "start")
end
def year_combo

2
app/models/forms/bulk_upload_sales/upload_your_file.rb

@ -34,7 +34,7 @@ module Forms
end
def next_path
bulk_upload_sales_log_path(id: "checking-file", form: { year:, organisation_id: })
bulk_upload_sales_log_path(id: "checking-file", form: { year: })
end
def save!

Loading…
Cancel
Save