Browse Source

Separate and update bulk upload sales guidance

pull/1703/head
Kat 3 years ago
parent
commit
401adb034a
  1. 7
      app/models/forms/bulk_upload_sales/prepare_your_file.rb
  2. 3
      app/views/bulk_upload_sales_logs/forms/prepare_your_file_2022.html.erb
  3. 37
      app/views/bulk_upload_sales_logs/forms/prepare_your_file_2023.html.erb

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

@ -8,7 +8,12 @@ module Forms
attribute :year, :integer attribute :year, :integer
def view_path def view_path
"bulk_upload_sales_logs/forms/prepare_your_file" case year
when 2022
"bulk_upload_sales_logs/forms/prepare_your_file_2022"
else
"bulk_upload_sales_logs/forms/prepare_your_file_2023"
end
end end
def back_path def back_path

3
app/views/bulk_upload_sales_logs/forms/prepare_your_file.html.erb → app/views/bulk_upload_sales_logs/forms/prepare_your_file_2022.html.erb

@ -12,8 +12,7 @@
<h2 class="govuk-heading-s">Download template</h2> <h2 class="govuk-heading-s">Download template</h2>
<ul class="govuk-list govuk-list--bullet"> <ul class="govuk-list govuk-list--bullet">
<li>If your organisation is new to using bulk upload or you have updated your HMS export use <%= govuk_link_to "this template (improved question ordering)", @form.template_path %></li> <li>Download and use <%= govuk_link_to "this template", @form.old_template_path %>.</li>
<li>If your organisation was using bulk upload on the previous CORE website and hasn't changed its HMS to be compatible with the new CORE service, use <%= govuk_link_to "this template", @form.old_template_path %></li>
</ul> </ul>
<h2 class="govuk-heading-s">Create your file</h2> <h2 class="govuk-heading-s">Create your file</h2>

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

@ -0,0 +1,37 @@
<% content_for :before_content do %>
<%= govuk_back_link href: @form.back_path %>
<% end %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= form_with model: @form, scope: :form, url: bulk_upload_sales_log_path(id: "prepare-your-file"), method: :patch do |f| %>
<%= f.hidden_field :year %>
<span class="govuk-caption-l">Upload sales logs in bulk (<%= @form.year_combo %>)</span>
<h1 class="govuk-heading-l">Prepare your file</h1>
<h2 class="govuk-heading-s">Download template</h2>
<ul class="govuk-list govuk-list--bullet">
<li><%= govuk_link_to "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 "Legacy template", @form.old_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>
<li>If your organisation was using bulk upload on the previous CORE website and hasn't changed its HMS to be compatible with the new CORE service, use <%= govuk_link_to "this template", @form.old_template_path %></li>
</ul>
<h2 class="govuk-heading-s">Create your file</h2>
<ul class="govuk-list govuk-list--bullet">
<li>Fill in the template with CORE data from your housing management system according to the <%= govuk_link_to "Sales #{@form.year_combo} Bulk Upload Specification", @form.specification_path %></li>
<li><strong>Username field:</strong> To assign a log to someone else, enter the email address they use to log into CORE</li>
<li>If you have to manually enter large volumes of data into the bulk upload template, we recommend creating logs directly in the service instead. <%= govuk_link_to "Find out more about exporting your data", bulk_upload_sales_log_path(id: "guidance", form: { year: @form.year }) %></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.</li>
</ul>
<h2 class="govuk-heading-s">Save your file</h2>
<ul class="govuk-list govuk-list--bullet">
<li>Save your file as a CSV</li>
<li>Your file should now be ready to upload</li>
</ul>
<%= f.govuk_submit %>
<% end %>
</div>
</div>
Loading…
Cancel
Save