From 572524e20c189a29f302a29f746bead44a9a2d95 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Tue, 2 Aug 2022 13:17:14 +0100 Subject: [PATCH] Add mobility type and admin district back to location summary views --- app/views/locations/index.html.erb | 8 ++++++++ app/views/schemes/check_answers.html.erb | 8 ++++++++ spec/requests/locations_controller_spec.rb | 2 ++ 3 files changed, 18 insertions(+) diff --git a/app/views/locations/index.html.erb b/app/views/locations/index.html.erb index 04e4c4bf6..9a3585cf8 100644 --- a/app/views/locations/index.html.erb +++ b/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("#{location.type_of_unit}")) %> + <% 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 %> diff --git a/app/views/schemes/check_answers.html.erb b/app/views/schemes/check_answers.html.erb index a9a6033c9..1659e16d6 100644 --- a/app/views/schemes/check_answers.html.erb +++ b/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("#{location.type_of_unit}")) %> + <% 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 %> diff --git a/spec/requests/locations_controller_spec.rb b/spec/requests/locations_controller_spec.rb index ce1abfe1b..b981d7ffd 100644 --- a/spec/requests/locations_controller_spec.rb +++ b/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