diff --git a/app/helpers/logs_helper.rb b/app/helpers/logs_helper.rb index c9667d96d..f813ab041 100644 --- a/app/helpers/logs_helper.rb +++ b/app/helpers/logs_helper.rb @@ -76,4 +76,11 @@ module LogsHelper def unique_answers_to_be_cleared(bulk_upload) bulk_upload.bulk_upload_errors.reject { |e| e.category == "not_answered" }.uniq(&:field) end + + def answers_to_be_deleted_title_text(bulk_upload) + unique_answers_to_be_cleared_count = unique_answers_to_be_cleared(bulk_upload).count + this_or_these = unique_answers_to_be_cleared_count == 1 ? "This" : "These" + + "#{this_or_these} #{pluralize(unique_answers_to_be_cleared(@bulk_upload).count, "answer")} will be deleted if you upload the #{"log".pluralize(@bulk_upload.logs.count)}" + end end diff --git a/app/views/bulk_upload_lettings_results/deletion_report.html.erb b/app/views/bulk_upload_lettings_results/deletion_report.html.erb index 348248bde..eb9a0840c 100644 --- a/app/views/bulk_upload_lettings_results/deletion_report.html.erb +++ b/app/views/bulk_upload_lettings_results/deletion_report.html.erb @@ -5,7 +5,7 @@
The following cells contain data this is incorrect.
If you upload the logs, these answers will be deleted. You will have to re-enter the data on the site and resolve these errors.
@@ -18,7 +18,7 @@The following cells contain data this is incorrect.
If you upload the logs, these answers will be deleted. You will have to re-enter the data on the site and resolve these errors.
@@ -18,7 +18,7 @@