diff --git a/app/views/schemes/locations.html.erb b/app/views/schemes/locations.html.erb index 76ea99f76..938286066 100644 --- a/app/views/schemes/locations.html.erb +++ b/app/views/schemes/locations.html.erb @@ -9,3 +9,61 @@ <%= render SubNavigationComponent.new( items: scheme_items(request.path, @scheme.id, @scheme.locations.count), ) %> + +
+
+
+ <% @scheme.locations.each do |location| %> +
+

+ <%= "#{location.address_line1}, #{location.address_line2}" %> +

+
+
+
+
+
+ Location code +
+
+ <%= location.location_code %> +
+
+
+
+ Postcode +
+
+ <%= location.postcode %> +
+
+
+
+ Type of unit +
+
+ <%= location.type_of_unit %> +
+
+
+
+ Type of building +
+
+ <%= location.type_of_building %> +
+
+
+
+ Wheelchair adaptation +
+
+ <%= location.wheelchair_adaptation %> +
+
+
+
+ <% end %> +
+
+
diff --git a/db/seeds.rb b/db/seeds.rb index 1f027cc34..f90628229 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -115,7 +115,16 @@ unless Rails.env.test? created_at: Time.zone.now, ) - Location.create(scheme: scheme, location_code: "7XYZ") + Location.create( + scheme: scheme, + location_code: "7XYZ", + postcode: "ZX1 177", + address_line1: "1 High street", + address_line2: "London", + type_of_unit: "unit", + type_of_building: "building", + wheelchair_adaptation: 0, + ) end pp "Seeded 3 dummy schemes" diff --git a/spec/factories/location.rb b/spec/factories/location.rb index 580cbe372..ead2ba64d 100644 --- a/spec/factories/location.rb +++ b/spec/factories/location.rb @@ -2,6 +2,11 @@ FactoryBot.define do factory :location do location_code { Faker::Name.initials(number: 10) } postcode { Faker::Address.postcode } + address_line1 { Faker::Address.street_name } + address_line2 { Faker::Address.city } + type_of_unit { Faker::Lorem.word } + type_of_building { Faker::Lorem.word } + wheelchair_adaptation { 0 } scheme end end