Browse Source

feat: add specification files and links for sales/lettings

pull/1335/head
natdeanlewissoftwire 3 years ago
parent
commit
65fc660278
  1. 4
      app/controllers/bulk_upload_lettings_logs_controller.rb
  2. 4
      app/controllers/bulk_upload_sales_logs_controller.rb
  3. 4
      app/models/forms/bulk_upload_lettings/prepare_your_file.rb
  4. 4
      app/models/forms/bulk_upload_sales/prepare_your_file.rb
  5. 4
      app/views/bulk_upload_shared/guidance.html.erb
  6. BIN
      public/files/Lettings 2022-23 Bulk Upload Specification.csv
  7. BIN
      public/files/Sales 2022-23 Bulk Upload Specification.csv

4
app/controllers/bulk_upload_lettings_logs_controller.rb

@ -22,7 +22,9 @@ class BulkUploadLettingsLogsController < ApplicationController
end
def guidance
@template_path = Forms::BulkUploadLettings::PrepareYourFile.new.template_path
path_form = Forms::BulkUploadLettings::PrepareYourFile.new
@template_path = path_form.template_path
@specification_path = path_form.specification_path
render "bulk_upload_shared/guidance"
end

4
app/controllers/bulk_upload_sales_logs_controller.rb

@ -22,7 +22,9 @@ class BulkUploadSalesLogsController < ApplicationController
end
def guidance
@template_path = Forms::BulkUploadSales::PrepareYourFile.new.template_path
path_form = Forms::BulkUploadSales::PrepareYourFile.new
@template_path = path_form.template_path
@specification_path = path_form.specification_path
render "bulk_upload_shared/guidance"
end

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

@ -29,6 +29,10 @@ module Forms
"/files/bulk-upload-lettings-template-v1.xlsx"
end
def specification_path
"/files/Lettings 2022-23 Bulk Upload Specification.csv"
end
def year_combo
"#{year}/#{year + 1 - 2000}"
end

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

@ -27,6 +27,10 @@ module Forms
"/files/bulk-upload-sales-template-v1.xlsx"
end
def specification_path
"/files/Sales 2022-23 Bulk Upload Specification.csv"
end
def year_combo
"#{year}/#{year + 1 - 2000}"
end

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

@ -33,7 +33,7 @@
<p class="govuk-!-font-weight-bold">It can take HMS providers a while to update these per new collection year, so you may have to wait for updates to export, or adjust your data manually post-export.</p>
<% end %>
<%= govuk_details(summary_text: "My organisation does not have a CMS") do %>
<p class="govuk-body">Your organisation’s IT team may be able to export CSV data for you - find out more about data specifications. This document outlines:</p>
<p class="govuk-body">Your organisation’s IT team may be able to export CSV data for you - <%= govuk_link_to "find out more about data specification", @specification_path %>. This document outlines:</p>
<ul class="govuk-list govuk-list--bullet">
<li>required fields</li>
<li>each field's valid response</li>
@ -45,7 +45,7 @@
<div class="govuk-!-padding-bottom-4">
<h2 class="govuk-heading-s">Getting help</h2>
<p class="govuk-body">There is no step-by-step bulk upload guide like there is with single log upload. However, you can download <%= govuk_link_to "our template", @template_path %>, which you can copy-paste data into from your systems column-by-column. You can also view a post-upload report showing any data errors, and our data specification can help fix these.</p>
<p class="govuk-body">There is no step-by-step bulk upload guide like there is with single log upload. However, you can download <%= govuk_link_to "our template", @template_path %>, which you can copy-paste data into from your systems column-by-column. You can also view a post-upload report showing any data errors, and our <%= govuk_link_to "data specification", @specification_path %> can help fix these.</p>
<p class="govuk-body">If you still need support mapping data in the way we need, DLUHC’s helpdesk can help. If your data is across multiple systems, or is hard to export as a single file in the correct format, you could try different exports, or copy-pasting data by hand.</p>
</div>
</div>

BIN
public/files/Lettings 2022-23 Bulk Upload Specification.csv

Binary file not shown.
Can't render this file because it contains an unexpected character in line 2 and column 94.

BIN
public/files/Sales 2022-23 Bulk Upload Specification.csv

Binary file not shown.
Can't render this file because it contains an unexpected character in line 1 and column 628.
Loading…
Cancel
Save