Browse Source

CLDC-3632 Bulk upload hide empty critical errors table (#2627)

* Make critical errors table conditionally shown

* Add the same margin to buttons, just like in lettings logs and sales logs page
pull/2643/head^2
Manny Dinssa 4 months ago committed by GitHub
parent
commit
b47738c4be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      app/components/bulk_upload_error_row_component.html.erb
  2. 2
      app/views/schemes/index.html.erb
  3. 2
      app/views/users/index.html.erb

3
app/components/bulk_upload_error_row_component.html.erb

@ -9,6 +9,8 @@
<div class="govuk-summary-card__content">
<% potential_errors, critical_errors = bulk_upload_errors.partition { |error| error.category == "soft_validation" } %>
<% if critical_errors.any? %>
<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| %>
@ -32,6 +34,7 @@
<% end %>
<% end %>
<% end %>
<% end %>
<% if potential_errors.any? %>
<h2 class="govuk-heading-m">Potential errors</h2>

2
app/views/schemes/index.html.erb

@ -6,7 +6,9 @@
<%= render partial: "organisations/headings", locals: current_user.support? ? { main: "Supported housing schemes", sub: nil } : { main: "Supported housing schemes", sub: current_user.organisation.name } %>
<% if SchemePolicy.new(current_user, nil).create? %>
<div class="govuk-button-group govuk-!-margin-bottom-6">
<%= govuk_button_link_to "Create a new supported housing scheme", new_scheme_path, html: { method: :post } %>
</div>
<% end %>
<div class="app-filter-layout" data-controller="filter-layout">
<%= render partial: "schemes/scheme_filters" %>

2
app/views/users/index.html.erb

@ -6,7 +6,9 @@
<%= render partial: "organisations/headings", locals: current_user.support? ? { main: "Users", sub: nil } : { main: "Users", sub: current_user.organisation.name } %>
<% if current_user.data_coordinator? || current_user.support? %>
<div class="govuk-button-group govuk-!-margin-bottom-6">
<%= govuk_button_link_to "Invite user", new_user_path, html: { method: :get } %>
</div>
<% end %>
<div class="app-filter-layout" data-controller="filter-layout">
<%= render partial: "users/user_filters" %>

Loading…
Cancel
Save