8 changed files with 118 additions and 11 deletions
@ -0,0 +1,31 @@ |
|||||||
|
<% content_for :before_content do %> |
||||||
|
<%= govuk_back_link(href: :back) %> |
||||||
|
<% end %> |
||||||
|
|
||||||
|
<div class="govuk-grid-row"> |
||||||
|
<div class="govuk-grid-column-two-thirds"> |
||||||
|
<span class="govuk-caption-l">Bulk upload for sales (<%= @bulk_upload.year_combo %>)</span> |
||||||
|
<h1 class="govuk-heading-l"><%= pluralize(unique_answers_to_be_cleared(@bulk_upload).count, "answer") %> will be deleted if you upload the <%= "log".pluralize(@bulk_upload.logs.count) %></h1> |
||||||
|
|
||||||
|
<p>The following cells contain data this is incorrect.</p> |
||||||
|
<p>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.</p> |
||||||
|
<p>If you do not want these answers to be deleted, correct the data in the CSV and upload the file again.</p> |
||||||
|
|
||||||
|
<h2 class="govuk-heading-m">File: <%= @bulk_upload.filename %></h2> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="govuk-grid-row"> |
||||||
|
<div class="govuk-grid-column-full"> |
||||||
|
<% @bulk_upload.bulk_upload_errors.order_by_row.order_by_cell.group_by(&:row).each do |_row, errors_for_row| %> |
||||||
|
<%= render BulkUploadErrorRowComponent.new(bulk_upload_errors: errors_for_row.reject { |e| e.category == :not_answered }) %> |
||||||
|
<% end %> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="govuk-button-group"> |
||||||
|
<%= form_with model: @form, scope: :form, url: page_bulk_upload_sales_resume_path(@bulk_upload, page: "confirm"), method: :patch do |f| %> |
||||||
|
<%= f.govuk_submit "Clear this data and upload the logs" %> |
||||||
|
<%= govuk_button_link_to "I have fixed these errors and I want to reupload the file", start_bulk_upload_sales_logs_path, secondary: true %> |
||||||
|
<% end %> |
||||||
|
</div> |
||||||
Loading…
Reference in new issue