Browse Source

Update year combo format

CLDC-3661-change-year-format
Kat 1 week ago
parent
commit
bf29da857a
  1. 2
      app/helpers/filters_helper.rb
  2. 2
      app/helpers/review_helper.rb
  3. 2
      app/helpers/tasklist_helper.rb
  4. 2
      app/models/bulk_upload.rb
  5. 2
      app/models/forms/bulk_upload_lettings/checking_file.rb
  6. 2
      app/models/forms/bulk_upload_lettings/needstype.rb
  7. 2
      app/models/forms/bulk_upload_lettings/prepare_your_file.rb
  8. 2
      app/models/forms/bulk_upload_lettings/upload_your_file.rb
  9. 2
      app/models/forms/bulk_upload_lettings/year.rb
  10. 2
      app/models/forms/bulk_upload_sales/checking_file.rb
  11. 2
      app/models/forms/bulk_upload_sales/prepare_your_file.rb
  12. 2
      app/models/forms/bulk_upload_sales/upload_your_file.rb
  13. 2
      app/models/forms/bulk_upload_sales/year.rb
  14. 6
      app/models/validations/sales/setup_validations.rb
  15. 6
      app/models/validations/setup_validations.rb
  16. 2
      app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2023.html.erb
  17. 2
      app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb
  18. 2
      app/views/bulk_upload_lettings_results/show.html.erb
  19. 2
      app/views/bulk_upload_lettings_results/summary.html.erb
  20. 2
      app/views/bulk_upload_lettings_resume/chosen.html.erb
  21. 2
      app/views/bulk_upload_lettings_resume/completed.html.erb
  22. 2
      app/views/bulk_upload_lettings_resume/confirm.html.erb
  23. 2
      app/views/bulk_upload_lettings_resume/deletion_report.html.erb
  24. 2
      app/views/bulk_upload_lettings_resume/fix_choice.html.erb
  25. 2
      app/views/bulk_upload_lettings_soft_validations_check/chosen.html.erb
  26. 2
      app/views/bulk_upload_lettings_soft_validations_check/confirm.html.erb
  27. 2
      app/views/bulk_upload_lettings_soft_validations_check/confirm_soft_errors.html.erb
  28. 2
      app/views/bulk_upload_sales_results/show.html.erb
  29. 2
      app/views/bulk_upload_sales_results/summary.html.erb
  30. 2
      app/views/bulk_upload_sales_resume/chosen.html.erb
  31. 2
      app/views/bulk_upload_sales_resume/completed.html.erb
  32. 2
      app/views/bulk_upload_sales_resume/confirm.html.erb
  33. 2
      app/views/bulk_upload_sales_resume/deletion_report.html.erb
  34. 2
      app/views/bulk_upload_sales_resume/fix_choice.html.erb
  35. 2
      app/views/bulk_upload_sales_soft_validations_check/chosen.html.erb
  36. 2
      app/views/bulk_upload_sales_soft_validations_check/confirm.html.erb
  37. 2
      app/views/bulk_upload_sales_soft_validations_check/confirm_soft_errors.html.erb
  38. 4
      config/locales/en.yml
  39. 4
      config/locales/validations/sales/setup.en.yml
  40. 4
      spec/requests/bulk_upload_lettings_results_controller_spec.rb
  41. 8
      spec/requests/bulk_upload_lettings_resume_controller_spec.rb
  42. 2
      spec/requests/bulk_upload_lettings_soft_validations_check_controller_spec.rb
  43. 2
      spec/requests/bulk_upload_sales_results_controller_spec.rb
  44. 8
      spec/requests/bulk_upload_sales_resume_controller_spec.rb
  45. 2
      spec/requests/bulk_upload_sales_soft_validations_check_controller_spec.rb

2
app/helpers/filters_helper.rb

@ -287,7 +287,7 @@ private
end end
def year_combo(year) def year_combo(year)
"#{year}/#{year - 2000 + 1}" "#{year} to #{year + 1}"
end end
def formatted_years_filter(session_filters) def formatted_years_filter(session_filters)

2
app/helpers/review_helper.rb

@ -6,7 +6,7 @@ module ReviewHelper
"You can review and make changes to this log until #{log.form.submission_deadline.to_formatted_s(:govuk_date)}.".html_safe "You can review and make changes to this log until #{log.form.submission_deadline.to_formatted_s(:govuk_date)}.".html_safe
else else
start_year = log.startdate ? collection_start_year_for_date(log.startdate) : log.form.start_date.year start_year = log.startdate ? collection_start_year_for_date(log.startdate) : log.form.start_date.year
"This log is from the #{start_year}/#{start_year + 1} collection window, which is now closed." "This log is from the #{start_year} to #{start_year + 1} collection window, which is now closed."
end end
end end

2
app/helpers/tasklist_helper.rb

@ -55,7 +55,7 @@ module TasklistHelper
else else
start_year = log.startdate ? collection_start_year_for_date(log.startdate) : log.form.start_date.year start_year = log.startdate ? collection_start_year_for_date(log.startdate) : log.form.start_date.year
"This log is from the #{start_year}/#{start_year + 1} collection window, which is now closed." "This log is from the #{start_year} to #{start_year + 1} collection window, which is now closed."
end end
end end

2
app/models/bulk_upload.rb

@ -59,7 +59,7 @@ class BulkUpload < ApplicationRecord
end end
def year_combo def year_combo
"#{year}/#{year - 2000 + 1}" "#{year} to #{year + 1}"
end end
def end_year def end_year

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

@ -21,7 +21,7 @@ module Forms
end end
def year_combo def year_combo
"#{year}/#{year + 1 - 2000}" "#{year} to #{year + 1}"
end end
def save! def save!

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

@ -28,7 +28,7 @@ module Forms
end end
def year_combo def year_combo
"#{year}/#{year + 1 - 2000}" "#{year} to #{year + 1}"
end end
def save! def save!

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

@ -41,7 +41,7 @@ module Forms
end end
def year_combo def year_combo
"#{year}/#{year + 1 - 2000}" "#{year} to #{year + 1}"
end end
def save! def save!

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

@ -25,7 +25,7 @@ module Forms
end end
def year_combo def year_combo
"#{year}/#{year + 1 - 2000}" "#{year} to #{year + 1}"
end end
def next_path def next_path

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

@ -16,7 +16,7 @@ module Forms
def options def options
possible_years.map do |year| possible_years.map do |year|
OpenStruct.new(id: year, name: "#{year}/#{year + 1}") OpenStruct.new(id: year, name: "#{year} to #{year + 1}")
end end
end end

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

@ -21,7 +21,7 @@ module Forms
end end
def year_combo def year_combo
"#{year}/#{year + 1 - 2000}" "#{year} to #{year + 1}"
end end
def save! def save!

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

@ -40,7 +40,7 @@ module Forms
end end
def year_combo def year_combo
"#{year}/#{year + 1 - 2000}" "#{year} to #{year + 1}"
end end
def save! def save!

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

@ -24,7 +24,7 @@ module Forms
end end
def year_combo def year_combo
"#{year}/#{year + 1 - 2000}" "#{year} to #{year + 1}"
end end
def next_path def next_path

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

@ -16,7 +16,7 @@ module Forms
def options def options
possible_years.map do |year| possible_years.map do |year|
OpenStruct.new(id: year, name: "#{year}/#{year + 1}") OpenStruct.new(id: year, name: "#{year} to #{year + 1}")
end end
end end

6
app/models/validations/sales/setup_validations.rb

@ -80,18 +80,14 @@ private
if FormHandler.instance.sales_in_crossover_period? if FormHandler.instance.sales_in_crossover_period?
I18n.t( I18n.t(
"validations.sales.setup.saledate.must_be_within.previous_and_current_collection_year", "validations.sales.setup.saledate.must_be_within.previous_and_current_collection_year",
previous_start_year_short: previous_collection_start_date.strftime("%y"), previous_end_year_long: previous_collection_end_date.strftime("#{previous_collection_end_date.day.ordinalize} %B %Y"),
previous_end_year_short: previous_collection_end_date.strftime("%y"),
previous_start_year_long: previous_collection_start_date.strftime("#{previous_collection_start_date.day.ordinalize} %B %Y"), previous_start_year_long: previous_collection_start_date.strftime("#{previous_collection_start_date.day.ordinalize} %B %Y"),
current_end_year_short: current_collection_end_date.strftime("%y"),
current_end_year_long: current_collection_end_date.strftime("#{current_collection_end_date.day.ordinalize} %B %Y"), current_end_year_long: current_collection_end_date.strftime("#{current_collection_end_date.day.ordinalize} %B %Y"),
) )
else else
I18n.t( I18n.t(
"validations.sales.setup.saledate.must_be_within.current_collection_year", "validations.sales.setup.saledate.must_be_within.current_collection_year",
current_start_year_short: current_collection_start_date.strftime("%y"),
current_start_year_long: current_collection_start_date.strftime("#{current_collection_start_date.day.ordinalize} %B %Y"), current_start_year_long: current_collection_start_date.strftime("#{current_collection_start_date.day.ordinalize} %B %Y"),
current_end_year_short: current_collection_end_date.strftime("%y"),
current_end_year_long: current_collection_end_date.strftime("#{current_collection_end_date.day.ordinalize} %B %Y"), current_end_year_long: current_collection_end_date.strftime("#{current_collection_end_date.day.ordinalize} %B %Y"),
) )
end end

6
app/models/validations/setup_validations.rb

@ -130,17 +130,13 @@ private
if FormHandler.instance.lettings_in_crossover_period? if FormHandler.instance.lettings_in_crossover_period?
I18n.t( I18n.t(
"validations.setup.startdate.previous_and_current_collection_year", "validations.setup.startdate.previous_and_current_collection_year",
previous_start_year_short: previous_collection_start_date.strftime("%y"), previous_end_year_long: previous_collection_end_date.strftime("#{previous_collection_end_date.day.ordinalize} %B %Y"),
previous_end_year_short: previous_collection_end_date.strftime("%y"),
previous_start_year_long: previous_collection_start_date.strftime("#{previous_collection_start_date.day.ordinalize} %B %Y"), previous_start_year_long: previous_collection_start_date.strftime("#{previous_collection_start_date.day.ordinalize} %B %Y"),
current_end_year_short: current_collection_end_date.strftime("%y"),
current_end_year_long:, current_end_year_long:,
) )
else else
I18n.t( I18n.t(
"validations.setup.startdate.current_collection_year", "validations.setup.startdate.current_collection_year",
current_start_year_short: current_collection_start_date.strftime("%y"),
current_end_year_short: current_collection_end_date.strftime("%y"),
current_start_year_long: current_collection_start_date.strftime("#{current_collection_start_date.day.ordinalize} %B %Y"), current_start_year_long: current_collection_start_date.strftime("#{current_collection_start_date.day.ordinalize} %B %Y"),
current_end_year_long:, current_end_year_long:,
) )

2
app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2023.html.erb

@ -31,7 +31,7 @@
<li>If you are using the new template, keep the headers. If you are using the legacy template, you can either keep or remove the headers. If you remove the headers, you should also remove the blank column A.</li> <li>If you are using the new template, keep the headers. If you are using the legacy template, you can either keep or remove the headers. If you remove the headers, you should also remove the blank column A.</li>
</ul> </ul>
<%= govuk_inset_text(text: "You can upload both general needs and supported housing logs in the same file for 2023/24 data.") %> <%= govuk_inset_text(text: "You can upload both general needs and supported housing logs in the same file for 2023 to 2024 data.") %>
<h2 class="govuk-heading-s">Save your file</h2> <h2 class="govuk-heading-s">Save your file</h2>

2
app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2024.html.erb

@ -27,7 +27,7 @@
<li>If you have reordered the headers, keep the headers in the file.</li> <li>If you have reordered the headers, keep the headers in the file.</li>
</ul> </ul>
<%= govuk_inset_text(text: "You can upload both general needs and supported housing logs in the same file for 2024/25 data.") %> <%= govuk_inset_text(text: "You can upload both general needs and supported housing logs in the same file for 2024 to 2025 data.") %>
<h2 class="govuk-heading-s">Save your file</h2> <h2 class="govuk-heading-s">Save your file</h2>

2
app/views/bulk_upload_lettings_results/show.html.erb

@ -6,7 +6,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">We found <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> in your file</h1> <h1 class="govuk-heading-l">We found <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> in your file</h1>
<div class="govuk-body"> <div class="govuk-body">

2
app/views/bulk_upload_lettings_results/summary.html.erb

@ -2,7 +2,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">Fix <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> and upload file again</h1> <h1 class="govuk-heading-l">Fix <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> and upload file again</h1>
<p class="govuk-body"> <p class="govuk-body">

2
app/views/bulk_upload_lettings_resume/chosen.html.erb

@ -4,7 +4,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">You need to fix logs from your bulk upload</h1> <h1 class="govuk-heading-l">You need to fix logs from your bulk upload</h1>
<p class="govuk-body">You have chosen to create logs from your recent bulk upload. To view and complete these logs, return to the list of lettings logs.</p> <p class="govuk-body">You have chosen to create logs from your recent bulk upload. To view and complete these logs, return to the list of lettings logs.</p>

2
app/views/bulk_upload_lettings_resume/completed.html.erb

@ -4,7 +4,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">These logs are complete</h1> <h1 class="govuk-heading-l">These logs are complete</h1>
<p class="govuk-body">You have created logs from your bulk upload, and the logs are complete. Return to lettings logs to view them.</p> <p class="govuk-body">You have created logs from your bulk upload, and the logs are complete. Return to lettings logs to view them.</p>

2
app/views/bulk_upload_lettings_resume/confirm.html.erb

@ -4,7 +4,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">Are you sure you want to upload all logs from this bulk upload?</h1> <h1 class="govuk-heading-l">Are you sure you want to upload all logs from this bulk upload?</h1>
<p class="govuk-body"> <p class="govuk-body">

2
app/views/bulk_upload_lettings_resume/deletion_report.html.erb

@ -4,7 +4,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l"><%= answers_to_be_deleted_title_text(@bulk_upload) %></h1> <h1 class="govuk-heading-l"><%= answers_to_be_deleted_title_text(@bulk_upload) %></h1>
<p>The following cells contain data this is incorrect.</p> <p>The following cells contain data this is incorrect.</p>

2
app/views/bulk_upload_lettings_resume/fix_choice.html.erb

@ -3,7 +3,7 @@
<%= form_with model: @form, scope: :form, url: page_bulk_upload_lettings_resume_path(@bulk_upload, page: "fix-choice"), method: :patch do |f| %> <%= form_with model: @form, scope: :form, url: page_bulk_upload_lettings_resume_path(@bulk_upload, page: "fix-choice"), method: :patch do |f| %>
<%= f.govuk_error_summary %> <%= f.govuk_error_summary %>
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">How would you like to fix the errors?</h1> <h1 class="govuk-heading-l">How would you like to fix the errors?</h1>
<div class="govuk-body-l"> <div class="govuk-body-l">

2
app/views/bulk_upload_lettings_soft_validations_check/chosen.html.erb

@ -4,7 +4,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">These logs are complete</h1> <h1 class="govuk-heading-l">These logs are complete</h1>
<p class="govuk-body">You have created logs from your bulk upload, and the logs are complete. Return to lettings logs to view them.</p> <p class="govuk-body">You have created logs from your bulk upload, and the logs are complete. Return to lettings logs to view them.</p>

2
app/views/bulk_upload_lettings_soft_validations_check/confirm.html.erb

@ -4,7 +4,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">You have chosen to upload all logs from this bulk upload.</h1> <h1 class="govuk-heading-l">You have chosen to upload all logs from this bulk upload.</h1>
<p class="govuk-body"><%= logs_and_soft_validations_warning(@bulk_upload) %></p> <p class="govuk-body"><%= logs_and_soft_validations_warning(@bulk_upload) %></p>

2
app/views/bulk_upload_lettings_soft_validations_check/confirm_soft_errors.html.erb

@ -3,7 +3,7 @@
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<%= f.govuk_error_summary %> <%= f.govuk_error_summary %>
<span class="govuk-caption-l">Bulk upload for lettings (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload lettings logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">Check these <%= pluralize(@bulk_upload.bulk_upload_errors.count, "answer") %> </h1> <h1 class="govuk-heading-l">Check these <%= pluralize(@bulk_upload.bulk_upload_errors.count, "answer") %> </h1>
<p class="govuk-body-l">Some data from your bulk upload might not be right. Check your file for any errors in the fields below.</p> <p class="govuk-body-l">Some data from your bulk upload might not be right. Check your file for any errors in the fields below.</p>

2
app/views/bulk_upload_sales_results/show.html.erb

@ -6,7 +6,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk Upload for sales (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload sales logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">We found <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> in your file</h1> <h1 class="govuk-heading-l">We found <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> in your file</h1>
<div class="govuk-body"> <div class="govuk-body">

2
app/views/bulk_upload_sales_results/summary.html.erb

@ -2,7 +2,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload sales logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">Fix <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> and upload file again</h1> <h1 class="govuk-heading-l">Fix <%= pluralize(@bulk_upload.bulk_upload_errors.count, "error") %> and upload file again</h1>
<p class="govuk-body"> <p class="govuk-body">

2
app/views/bulk_upload_sales_resume/chosen.html.erb

@ -4,7 +4,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload sales logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">You need to fix logs from your bulk upload</h1> <h1 class="govuk-heading-l">You need to fix logs from your bulk upload</h1>
<p class="govuk-body">You have chosen to create logs from your recent bulk upload. To view and complete these logs, return to the list of sales logs.</p> <p class="govuk-body">You have chosen to create logs from your recent bulk upload. To view and complete these logs, return to the list of sales logs.</p>

2
app/views/bulk_upload_sales_resume/completed.html.erb

@ -4,7 +4,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload sales logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">These logs are complete</h1> <h1 class="govuk-heading-l">These logs are complete</h1>
<p class="govuk-body">You have created logs from your bulk upload, and the logs are complete. Return to sales logs to view them.</p> <p class="govuk-body">You have created logs from your bulk upload, and the logs are complete. Return to sales logs to view them.</p>

2
app/views/bulk_upload_sales_resume/confirm.html.erb

@ -4,7 +4,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload sales logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">Are you sure you want to upload all logs from this bulk upload?</h1> <h1 class="govuk-heading-l">Are you sure you want to upload all logs from this bulk upload?</h1>
<p class="govuk-body"> <p class="govuk-body">

2
app/views/bulk_upload_sales_resume/deletion_report.html.erb

@ -4,7 +4,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload sales logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l"><%= answers_to_be_deleted_title_text(@bulk_upload) %></h1> <h1 class="govuk-heading-l"><%= answers_to_be_deleted_title_text(@bulk_upload) %></h1>
<p>The following cells contain data this is incorrect.</p> <p>The following cells contain data this is incorrect.</p>

2
app/views/bulk_upload_sales_resume/fix_choice.html.erb

@ -3,7 +3,7 @@
<%= form_with model: @form, scope: :form, url: page_bulk_upload_sales_resume_path(@bulk_upload, page: "fix-choice"), method: :patch do |f| %> <%= form_with model: @form, scope: :form, url: page_bulk_upload_sales_resume_path(@bulk_upload, page: "fix-choice"), method: :patch do |f| %>
<%= f.govuk_error_summary %> <%= f.govuk_error_summary %>
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload sales logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">How would you like to fix the errors?</h1> <h1 class="govuk-heading-l">How would you like to fix the errors?</h1>
<div class="govuk-body-l"> <div class="govuk-body-l">

2
app/views/bulk_upload_sales_soft_validations_check/chosen.html.erb

@ -4,7 +4,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload sales logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">These logs are complete</h1> <h1 class="govuk-heading-l">These logs are complete</h1>
<p class="govuk-body">You have created logs from your bulk upload, and the logs are complete. Return to sales logs to view them.</p> <p class="govuk-body">You have created logs from your bulk upload, and the logs are complete. Return to sales logs to view them.</p>

2
app/views/bulk_upload_sales_soft_validations_check/confirm.html.erb

@ -4,7 +4,7 @@
<div class="govuk-grid-row"> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload sales logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">You have chosen to upload all logs from this bulk upload.</h1> <h1 class="govuk-heading-l">You have chosen to upload all logs from this bulk upload.</h1>
<p class="govuk-body"><%= logs_and_soft_validations_warning(@bulk_upload) %></p> <p class="govuk-body"><%= logs_and_soft_validations_warning(@bulk_upload) %></p>

2
app/views/bulk_upload_sales_soft_validations_check/confirm_soft_errors.html.erb

@ -3,7 +3,7 @@
<div class="govuk-grid-column-two-thirds"> <div class="govuk-grid-column-two-thirds">
<%= f.govuk_error_summary %> <%= f.govuk_error_summary %>
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span> <span class="govuk-caption-l">Upload sales logs in bulk (<%= @bulk_upload.year_combo %>)</span>
<h1 class="govuk-heading-l">Check these <%= pluralize(@bulk_upload.bulk_upload_errors.count, "answer") %> </h1> <h1 class="govuk-heading-l">Check these <%= pluralize(@bulk_upload.bulk_upload_errors.count, "answer") %> </h1>
<p class="govuk-body-l">Some data from your bulk upload might not be right. Check your file for any errors in the fields below.</p> <p class="govuk-body-l">Some data from your bulk upload might not be right. Check your file for any errors in the fields below.</p>

4
config/locales/en.yml

@ -287,9 +287,9 @@ en:
startdate: startdate:
current_collection_year: current_collection_year:
"Enter a date within the %{current_start_year_short}/%{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}." "Enter a date within the %{current_start_year_long} to %{current_end_year_long} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
previous_and_current_collection_year: previous_and_current_collection_year:
"Enter a date within the %{previous_start_year_short}/%{previous_end_year_short} or %{previous_end_year_short}/%{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}." "Enter a date within the %{previous_start_year_long} to %{previous_end_year_long} or %{previous_end_year_long} to %{current_end_year_long} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
later_than_14_days_after: "The tenancy start date must not be later than 14 days from today’s date." later_than_14_days_after: "The tenancy start date must not be later than 14 days from today’s date."
before_scheme_end_date: "The tenancy start date must be before the end date for this supported housing scheme." before_scheme_end_date: "The tenancy start date must be before the end date for this supported housing scheme."
after_void_date: "Enter a tenancy start date that is after the void date." after_void_date: "Enter a tenancy start date that is after the void date."

4
config/locales/validations/sales/setup.en.yml

@ -7,9 +7,9 @@ en:
next_two_weeks: "Sale completion date must not be later than 14 days from today’s date." next_two_weeks: "Sale completion date must not be later than 14 days from today’s date."
must_be_within: must_be_within:
current_collection_year: current_collection_year:
"Enter a date within the %{current_start_year_short}/%{current_end_year_short} collection year, which is between %{current_start_year_long} and %{current_end_year_long}." "Enter a date within the %{current_start_year_long} to %{current_end_year_long} collection year, which is between %{current_start_year_long} and %{current_end_year_long}."
previous_and_current_collection_year: previous_and_current_collection_year:
"Enter a date within the %{previous_start_year_short}/%{previous_end_year_short} or %{previous_end_year_short}/%{current_end_year_short} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}." "Enter a date within the %{previous_start_year_long} to %{previous_end_year_long} or %{previous_end_year_long} to %{current_end_year_long} collection years, which is between %{previous_start_year_long} and %{current_end_year_long}."
invalid: invalid:
merged_organisations: merged_organisations:
"Enter a date when the owning organisation was active. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}." "Enter a date when the owning organisation was active. %{owning_organisation} became inactive on %{merge_date} and was replaced by %{absorbing_organisation}."

4
spec/requests/bulk_upload_lettings_results_controller_spec.rb

@ -16,7 +16,7 @@ RSpec.describe BulkUploadLettingsResultsController, type: :request do
get "/lettings-logs/bulk-upload-results/#{bulk_upload.id}/summary" get "/lettings-logs/bulk-upload-results/#{bulk_upload.id}/summary"
expect(response).to be_successful expect(response).to be_successful
expect(response.body).to include("Bulk upload for lettings (#{bulk_upload.year_combo})") expect(response.body).to include("Upload lettings logs in bulk (#{bulk_upload.year_combo})")
end end
it "renders the bulk upload filename" do it "renders the bulk upload filename" do
@ -90,7 +90,7 @@ RSpec.describe BulkUploadLettingsResultsController, type: :request do
get "/lettings-logs/bulk-upload-results/#{bulk_upload.id}" get "/lettings-logs/bulk-upload-results/#{bulk_upload.id}"
expect(response).to be_successful expect(response).to be_successful
expect(response.body).to include("Bulk upload for lettings (#{bulk_upload.year_combo})") expect(response.body).to include("Upload lettings logs in bulk (#{bulk_upload.year_combo})")
end end
it "renders correct number of errors" do it "renders correct number of errors" do

8
spec/requests/bulk_upload_lettings_resume_controller_spec.rb

@ -60,7 +60,7 @@ RSpec.describe BulkUploadLettingsResumeController, type: :request do
expect(response).to be_successful expect(response).to be_successful
expect(response.body).to include("Bulk upload for lettings") expect(response.body).to include("Upload lettings logs in bulk")
expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include(bulk_upload.year_combo)
expect(response.body).to include("View the error report") expect(response.body).to include("View the error report")
expect(response.body).to include("How would you like to fix the errors?") expect(response.body).to include("How would you like to fix the errors?")
@ -120,7 +120,7 @@ RSpec.describe BulkUploadLettingsResumeController, type: :request do
expect(response).to be_successful expect(response).to be_successful
expect(response.body).to include("Bulk upload for lettings") expect(response.body).to include("Upload lettings logs in bulk")
expect(response.body).to include("Cancel") expect(response.body).to include("Cancel")
end end
end end
@ -218,7 +218,7 @@ RSpec.describe BulkUploadLettingsResumeController, type: :request do
expect(response).to be_successful expect(response).to be_successful
expect(response.body).to include("Bulk upload for lettings") expect(response.body).to include("Upload lettings logs in bulk")
expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include(bulk_upload.year_combo)
expect(response.body).to include("These 2 answers will be deleted if you upload the log") expect(response.body).to include("These 2 answers will be deleted if you upload the log")
expect(response.body).to include(bulk_upload.filename) expect(response.body).to include(bulk_upload.filename)
@ -260,7 +260,7 @@ RSpec.describe BulkUploadLettingsResumeController, type: :request do
expect(response).to be_successful expect(response).to be_successful
expect(response.body).to include("Bulk upload for lettings") expect(response.body).to include("Upload lettings logs in bulk")
expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include(bulk_upload.year_combo)
expect(response.body).to include("These 2 answers will be deleted if you upload the log") expect(response.body).to include("These 2 answers will be deleted if you upload the log")
expect(response.body).to include(bulk_upload.filename) expect(response.body).to include(bulk_upload.filename)

2
spec/requests/bulk_upload_lettings_soft_validations_check_controller_spec.rb

@ -14,7 +14,7 @@ RSpec.describe BulkUploadLettingsSoftValidationsCheckController, type: :request
it "shows the soft validation errors with confirmation question" do it "shows the soft validation errors with confirmation question" do
get "/lettings-logs/bulk-upload-soft-validations-check/#{bulk_upload.id}/confirm-soft-errors" get "/lettings-logs/bulk-upload-soft-validations-check/#{bulk_upload.id}/confirm-soft-errors"
expect(response.body).to include("Bulk upload for lettings") expect(response.body).to include("Upload lettings logs in bulk")
expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include(bulk_upload.year_combo)
expect(response.body).to include("Check these 2 answers") expect(response.body).to include("Check these 2 answers")
expect(response.body).to include(bulk_upload.filename) expect(response.body).to include(bulk_upload.filename)

2
spec/requests/bulk_upload_sales_results_controller_spec.rb

@ -52,7 +52,7 @@ RSpec.describe BulkUploadSalesResultsController, type: :request do
get "/sales-logs/bulk-upload-results/#{bulk_upload.id}" get "/sales-logs/bulk-upload-results/#{bulk_upload.id}"
expect(response).to be_successful expect(response).to be_successful
expect(response.body).to include("Bulk Upload for sales (#{bulk_upload.year_combo})") expect(response.body).to include("Upload sales logs in bulk (#{bulk_upload.year_combo})")
end end
it "renders correct number of errors" do it "renders correct number of errors" do

8
spec/requests/bulk_upload_sales_resume_controller_spec.rb

@ -60,7 +60,7 @@ RSpec.describe BulkUploadSalesResumeController, type: :request do
expect(response).to be_successful expect(response).to be_successful
expect(response.body).to include("Bulk upload for sales") expect(response.body).to include("Upload sales logs in bulk")
expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include(bulk_upload.year_combo)
expect(response.body).to include("View the error report") expect(response.body).to include("View the error report")
expect(response.body).to include("How would you like to fix the errors?") expect(response.body).to include("How would you like to fix the errors?")
@ -120,7 +120,7 @@ RSpec.describe BulkUploadSalesResumeController, type: :request do
expect(response).to be_successful expect(response).to be_successful
expect(response.body).to include("Bulk upload for sales") expect(response.body).to include("Upload sales logs in bulk")
expect(response.body).to include("Cancel") expect(response.body).to include("Cancel")
end end
end end
@ -218,7 +218,7 @@ RSpec.describe BulkUploadSalesResumeController, type: :request do
expect(response).to be_successful expect(response).to be_successful
expect(response.body).to include("Bulk upload for sales") expect(response.body).to include("Upload sales logs in bulk")
expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include(bulk_upload.year_combo)
expect(response.body).to include("These 2 answers will be deleted if you upload the log") expect(response.body).to include("These 2 answers will be deleted if you upload the log")
expect(response.body).to include(bulk_upload.filename) expect(response.body).to include(bulk_upload.filename)
@ -260,7 +260,7 @@ RSpec.describe BulkUploadSalesResumeController, type: :request do
expect(response).to be_successful expect(response).to be_successful
expect(response.body).to include("Bulk upload for sales") expect(response.body).to include("Upload sales logs in bulk")
expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include(bulk_upload.year_combo)
expect(response.body).to include("These 2 answers will be deleted if you upload the log") expect(response.body).to include("These 2 answers will be deleted if you upload the log")
expect(response.body).to include(bulk_upload.filename) expect(response.body).to include(bulk_upload.filename)

2
spec/requests/bulk_upload_sales_soft_validations_check_controller_spec.rb

@ -14,7 +14,7 @@ RSpec.describe BulkUploadSalesSoftValidationsCheckController, type: :request do
it "shows the soft validation errors with confirmation question" do it "shows the soft validation errors with confirmation question" do
get "/sales-logs/bulk-upload-soft-validations-check/#{bulk_upload.id}/confirm-soft-errors" get "/sales-logs/bulk-upload-soft-validations-check/#{bulk_upload.id}/confirm-soft-errors"
expect(response.body).to include("Bulk upload for sales") expect(response.body).to include("Upload sales logs in bulk")
expect(response.body).to include(bulk_upload.year_combo) expect(response.body).to include(bulk_upload.year_combo)
expect(response.body).to include("Check these 2 answers") expect(response.body).to include("Check these 2 answers")
expect(response.body).to include(bulk_upload.filename) expect(response.body).to include(bulk_upload.filename)

Loading…
Cancel
Save