@ -8,6 +8,7 @@
</div>
<div class="govuk-summary-card__content">
<% potential_errors, critical_errors = bulk_upload_errors.partition { |error| error.category == "soft_validation" } %>
<h2 class="govuk-heading-m">Critical errors</h2>
<p class="govuk-body">These errors must be fixed to complete your logs.</p>
<%= govuk_table do |table| %>
@ -20,11 +21,11 @@
<% end %>
<%= table.with_body do |body| %>
<% bulk_upload_errors.reject { |error| error.category == "soft_validation" } .each do |error| %>
<% critical_errors .each do |error| %>
<% body.with_row do |row| %>
<% row.with_cell(text: error.cell) %>
<% row.with_cell(text: question_for_field(error.field)) %>
<% row.with_cell(header: true, text: error.error) %>
<% row.with_cell(text: error.error, html_attributes: {class: "govuk-!-font-weight-bold"} ) %>
<% row.with_cell(text: error.field.humanize) %>
<% end %>
<% end %>
@ -32,7 +33,6 @@
<% end %>
<% end %>
<% potential_errors = bulk_upload_errors.select { |error| error.category == "soft_validation" } %>
<% if potential_errors.any? %>
<h2 class="govuk-heading-m">Potential errors</h2>
<p class="govuk-body">The following groups of cells might have conflicting data. Check the answers and fix any incorrect data.<br><br>If the answers are correct, fix the critical errors and reupload the file. You'll need to confirm that the following data is correct when the file only contains potential errors.</p>
@ -56,7 +56,7 @@
<% row.with_cell(text: error.cell) %>
<% row.with_cell(text: question_for_field(error.field)) %>
<% if index == 0 %>
<% row.with_cell(header: true, text: error_message, rowspan: errors.size) %>
<% row.with_cell(text: error_message, rowspan: errors.size, html_attributes: {class: "govuk-!-font-weight-bold"} ) %>
<% end %>
<% row.with_cell(text: error.field.humanize) %>
<% end %>