Browse Source

rebased

pull/704/head
JG 3 years ago
parent
commit
99be53a43f
  1. 4
      app/views/locations/details.html.erb
  2. 4
      app/views/locations/new.html.erb
  3. 1
      db/migrate/20220630114748_add_name_to_locations.rb
  4. 5
      db/schema.rb
  5. 6
      db/seeds.rb

4
app/views/locations/details.html.erb

@ -37,7 +37,7 @@
:name,
legend: { text: "What is this type of scheme?", size: "m" } %>
<% wheelchair_user_selection = Location.wheelchair_adaptations.keys.map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) } %>
<% wheelchair_user_selection = Location.wheelchair_adaptations.keys.reverse.map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) } %>
<%= f.govuk_collection_radio_buttons :wheelchair_adaptation,
wheelchair_user_selection,
@ -48,7 +48,7 @@
<%= govuk_section_break(visible: true, size: "m") %>
<% another_location_selection = %w[No Yes].map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) } %>
<% another_location_selection = %w[Yes no].map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) } %>
<%= f.govuk_collection_radio_buttons :add_another_location,
another_location_selection,

4
app/views/locations/new.html.erb

@ -37,7 +37,7 @@
:name,
legend: { text: "What is this type of scheme?", size: "m" } %>
<% wheelchair_user_selection = Location.wheelchair_adaptations.keys.map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) } %>
<% wheelchair_user_selection = Location.wheelchair_adaptations.keys.reverse.map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) } %>
<%= f.govuk_collection_radio_buttons :wheelchair_adaptation,
wheelchair_user_selection,
@ -48,7 +48,7 @@
<%= govuk_section_break(visible: true, size: "m") %>
<% another_location_selection = %w[No Yes].map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) } %>
<% another_location_selection = %w[Yes No].map { |key, _| OpenStruct.new(id: key, name: key.to_s.humanize) } %>
<%= f.govuk_collection_radio_buttons :add_another_location,
another_location_selection,

1
db/migrate/20220630114748_add_name_to_locations.rb

@ -1,6 +1,5 @@
class AddNameToLocations < ActiveRecord::Migration[7.0]
change_table :locations, bulk: true do |t|
t.string :name
t.integer :total_units
end
end

5
db/schema.rb

@ -191,9 +191,9 @@ ActiveRecord::Schema[7.0].define(version: 2022_07_04_135746) do
t.integer "joint"
t.bigint "created_by_id"
t.integer "illness_type_0"
t.integer "retirement_value_check"
t.integer "tshortfall_known"
t.integer "sheltered"
t.integer "retirement_value_check"
t.integer "pregnancy_value_check"
t.integer "hhtype"
t.integer "new_old"
@ -246,7 +246,6 @@ ActiveRecord::Schema[7.0].define(version: 2022_07_04_135746) do
t.string "county"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "name"
t.integer "total_units"
t.integer "type_of_unit"
t.index ["scheme_id"], name: "index_locations_on_scheme_id"
@ -254,7 +253,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_07_04_135746) do
create_table "logs_exports", force: :cascade do |t|
t.datetime "created_at", default: -> { "CURRENT_TIMESTAMP" }
t.datetime "started_at", precision: nil, null: false
t.datetime "started_at", null: false
t.integer "base_number", default: 1, null: false
t.integer "increment_number", default: 1, null: false
t.boolean "empty_export", default: false, null: false

6
db/seeds.rb

@ -114,8 +114,6 @@ unless Rails.env.test?
location_code: "S254-CU193AA",
postcode: "CU19 3AA",
name: "Rectory Road",
address_line1: "Rectory Road",
address_line2: "North Chaim",
type_of_unit: 4,
type_of_building: "Purpose-built",
county: "Mid Sussex",
@ -127,8 +125,6 @@ unless Rails.env.test?
location_code: "S254-DM250DC",
postcode: "DM25 0DC",
name: "Smithy Lane",
address_line1: "Smithy Lane",
address_line2: "North Kellieworth",
type_of_unit: 1,
type_of_building: "Converted from previous residential or non-residential property",
county: "Fife",
@ -140,8 +136,6 @@ unless Rails.env.test?
location_code: "S254-YX130WP",
postcode: "YX13 0WP",
name: "Smithy Lane",
address_line1: "Smithy Lane",
address_line2: "East Darwin",
type_of_unit: 2,
type_of_building: "Converted from previous residential or non-residential property",
county: "Rochford",

Loading…
Cancel
Save