Browse Source

Add mobility type and admin district back to location summary views (#800)

pull/802/head
baarkerlounger 2 years ago committed by GitHub
parent
commit
df9aa4b464
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      app/views/locations/index.html.erb
  2. 8
      app/views/schemes/check_answers.html.erb
  3. 2
      spec/requests/locations_controller_spec.rb

8
app/views/locations/index.html.erb

@ -37,6 +37,12 @@
<% row.cell(header: true, text: "Common unit type", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Mobility type", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Local authority", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Available from", html_attributes: {
scope: "col",
}) %>
@ -49,6 +55,8 @@
<% row.cell(text: simple_format(location_cell(location, "/schemes/#{@scheme.id}/locations/#{location.id}/edit-name"), { class: "govuk-!-font-weight-bold" }, wrapper_tag: "div")) %>
<% row.cell(text: location.units) %>
<% row.cell(text: simple_format("<span>#{location.type_of_unit}</span>")) %>
<% row.cell(text: location.mobility_type) %>
<% row.cell(text: location.location_admin_district) %>
<% row.cell(text: location.startdate&.to_formatted_s(:govuk_date)) %>
<% end %>
<% end %>

8
app/views/schemes/check_answers.html.erb

@ -52,6 +52,12 @@
<% row.cell(header: true, text: "Common unit type", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Mobility type", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Local authority", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Available from", html_attributes: {
scope: "col",
}) %>
@ -64,6 +70,8 @@
<% row.cell(text: simple_format(location_cell(location, "/schemes/#{@scheme.id}/locations/#{location.id}/edit"), { class: "govuk-!-font-weight-bold" }, wrapper_tag: "div")) %>
<% row.cell(text: location.units) %>
<% row.cell(text: simple_format("<span>#{location.type_of_unit}</span>")) %>
<% row.cell(text: location.mobility_type) %>
<% row.cell(text: location.location_admin_district) %>
<% row.cell(text: location.startdate&.to_formatted_s(:govuk_date)) %>
<% end %>
<% end %>

2
spec/requests/locations_controller_spec.rb

@ -804,6 +804,8 @@ RSpec.describe LocationsController, type: :request do
expect(page).to have_content(location.id)
expect(page).to have_content(location.postcode)
expect(page).to have_content(location.type_of_unit)
expect(page).to have_content(location.mobility_type)
expect(page).to have_content(location.location_admin_district)
expect(page).to have_content(location.startdate&.to_formatted_s(:govuk_date))
end
end

Loading…
Cancel
Save