Browse Source

Remove mentions of legacy template and update bu path methods

pull/2676/head
Kat 2 years ago
parent
commit
2843eeec33
  1. 8
      app/models/forms/bulk_upload_lettings/guidance.rb
  2. 21
      app/models/forms/bulk_upload_lettings/prepare_your_file.rb
  3. 8
      app/models/forms/bulk_upload_sales/guidance.rb
  4. 21
      app/models/forms/bulk_upload_sales/prepare_your_file.rb
  5. 4
      app/views/bulk_upload_lettings_logs/forms/prepare_your_file_2023.html.erb
  6. 1
      app/views/bulk_upload_sales_logs/forms/prepare_your_file_2023.html.erb
  7. 2
      app/views/bulk_upload_shared/guidance.html.erb

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

@ -24,10 +24,6 @@ module Forms
end
end
def lettings_legacy_template_path
Forms::BulkUploadLettings::PrepareYourFile.new.legacy_template_path
end
def lettings_template_path
Forms::BulkUploadLettings::PrepareYourFile.new(year:).template_path
end
@ -36,10 +32,6 @@ module Forms
Forms::BulkUploadLettings::PrepareYourFile.new(year:).specification_path
end
def sales_legacy_template_path
Forms::BulkUploadSales::PrepareYourFile.new.legacy_template_path
end
def sales_template_path
Forms::BulkUploadSales::PrepareYourFile.new(year:).template_path
end

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

@ -32,29 +32,12 @@ module Forms
bulk_upload_lettings_log_path(id: "upload-your-file", form: { year:, needstype:, organisation_id: }.compact)
end
def legacy_template_path
case year
when 2023
download_23_24_lettings_bulk_upload_legacy_template_path
end
end
def template_path
case year
when 2023
download_23_24_lettings_bulk_upload_template_path
when 2024
download_24_25_lettings_bulk_upload_template_path
end
download_mandatory_collection_resource_path(year:, log_type: "lettings", resource_type: "bulk_upload_template")
end
def specification_path
case year
when 2023
download_23_24_lettings_bulk_upload_specification_path
when 2024
download_24_25_lettings_bulk_upload_specification_path
end
download_mandatory_collection_resource_path(year:, log_type: "lettings", resource_type: "bulk_upload_specification")
end
def year_combo

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

@ -24,10 +24,6 @@ module Forms
end
end
def lettings_legacy_template_path
Forms::BulkUploadLettings::PrepareYourFile.new.legacy_template_path
end
def lettings_template_path
Forms::BulkUploadLettings::PrepareYourFile.new(year:).template_path
end
@ -36,10 +32,6 @@ module Forms
Forms::BulkUploadLettings::PrepareYourFile.new(year:).specification_path
end
def sales_legacy_template_path
Forms::BulkUploadSales::PrepareYourFile.new.legacy_template_path
end
def sales_template_path
Forms::BulkUploadSales::PrepareYourFile.new(year:).template_path
end

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

@ -31,29 +31,12 @@ module Forms
bulk_upload_sales_log_path(id: "upload-your-file", form: { year:, organisation_id: }.compact)
end
def legacy_template_path
case year
when 2023
download_23_24_sales_bulk_upload_legacy_template_path
end
end
def template_path
case year
when 2023
download_23_24_sales_bulk_upload_template_path
when 2024
download_24_25_sales_bulk_upload_template_path
end
download_mandatory_collection_resource_path(year:, log_type: "sales", resource_type: "bulk_upload_template")
end
def specification_path
case year
when 2023
download_23_24_sales_bulk_upload_specification_path
when 2024
download_24_25_sales_bulk_upload_specification_path
end
download_mandatory_collection_resource_path(year:, log_type: "sales", resource_type: "bulk_upload_specification")
end
def year_combo

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

@ -18,10 +18,6 @@
<li>
<%= govuk_link_to "Download the new template", @form.template_path %>: In this template, the questions are in the same order as the 2023/24 paper form and web form.
</li>
<li>
<%= govuk_link_to "Download the legacy template", @form.legacy_template_path %>: In this template, the questions are in the same order as the 2022/23 template, with new questions added on to the end.
</li>
</ul>
<p class="govuk-body govuk-!-margin-bottom-2">There are 7 or 8 rows of content in the templates. These rows are called the ‘headers’. They contain the CORE form questions and guidance about which questions are required and how to format your answers.</p>

1
app/views/bulk_upload_sales_logs/forms/prepare_your_file_2023.html.erb

@ -16,7 +16,6 @@
<p class="govuk-body govuk-!-margin-bottom-2">Use one of these templates to upload logs for 2023/24:</p>
<ul class="govuk-list govuk-list--bullet">
<li><%= govuk_link_to "Download the new template", @form.template_path %>: In this template, the questions are in the same order as the 2023/24 paper form and web form.</li>
<li><%= govuk_link_to "Download the legacy template", @form.legacy_template_path %>: In this template, the questions are in the same order as the 2022/23 template, with new questions added on to the end.</li>
</ul>
<p class="govuk-body govuk-!-margin-bottom-2">There are 7 or 8 rows of content in the templates. These rows are called the ‘headers’. They contain the CORE form questions and guidance about which questions are required and how to format your answers.</p>

2
app/views/bulk_upload_shared/guidance.html.erb

@ -52,8 +52,6 @@
<p class="govuk-body"><%= govuk_link_to "Download the sales bulk upload template (2023 to 2024) – New question ordering", @form.sales_template_path %></p>
<p class="govuk-body"><strong>Legacy template</strong>: In this template, the questions are in the same order as the 2022/23 template, with new questions added on to the end. Use this template if you have not updated your system to match the new template yet.</p>
<p class="govuk-body"><%= govuk_link_to "Download the lettings bulk upload template (2023 to 2024) - Legacy version", @form.lettings_legacy_template_path %></p>
<p class="govuk-body"><%= govuk_link_to "Download the sales bulk upload template (2023 to 2024) – Legacy version", @form.sales_legacy_template_path %></p>
<% else %>
<p class="govuk-body"><%= govuk_link_to "Download the lettings bulk upload template (2024 to 2025)", @form.lettings_template_path %></p>
<p class="govuk-body"><%= govuk_link_to "Download the sales bulk upload template (2024 to 2025)", @form.sales_template_path %></p>

Loading…
Cancel
Save