Browse Source
* Add checked answers values as true if they are passed back as case log params from the form * Allow changing/unticking saved checkbox values * rubocop * Save keys for checkboxes instead of labels * Add conditional effects keys and table fields * Add reasonable preference reason keys and table fields * Redo the migrations * Move method call around * Update case_log params before checking them with page_params * Reload case log rather than multiple lookups * Refactor checkbox question selection * Refactor out the need to get list of checkbox questions * Spec merging of answers across different question types * Update readme to include checkbox question data model assumptions * Fix postcode duplication Co-authored-by: baarkerlounger <db@slothlife.xyz>pull/39/head^2
kosiakkatrina
3 years ago
committed by
GitHub
14 changed files with 216 additions and 46 deletions
@ -0,0 +1,13 @@ |
|||||||
|
class AddAccessibilityFields < ActiveRecord::Migration[6.1] |
||||||
|
def change |
||||||
|
change_table :case_logs, bulk: true do |t| |
||||||
|
t.column :accessibility_requirements_fully_wheelchair_accessible_housing, :boolean |
||||||
|
t.column :accessibility_requirements_wheelchair_access_to_essential_rooms, :boolean |
||||||
|
t.column :accessibility_requirements_level_access_housing, :boolean |
||||||
|
t.column :accessibility_requirements_other_disability_requirements, :boolean |
||||||
|
t.column :accessibility_requirements_no_disability_requirements, :boolean |
||||||
|
t.column :accessibility_requirements_do_not_know, :boolean |
||||||
|
t.column :accessibility_requirements_prefer_not_to_say, :boolean |
||||||
|
end |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,17 @@ |
|||||||
|
class AddConditionEffectsFields < ActiveRecord::Migration[6.1] |
||||||
|
def change |
||||||
|
change_table :case_logs, bulk: true do |t| |
||||||
|
t.column :condition_effects_vision, :boolean |
||||||
|
t.column :condition_effects_hearing, :boolean |
||||||
|
t.column :condition_effects_mobility, :boolean |
||||||
|
t.column :condition_effects_dexterity, :boolean |
||||||
|
t.column :condition_effects_stamina, :boolean |
||||||
|
t.column :condition_effects_learning, :boolean |
||||||
|
t.column :condition_effects_memory, :boolean |
||||||
|
t.column :condition_effects_mental_health, :boolean |
||||||
|
t.column :condition_effects_social_or_behavioral, :boolean |
||||||
|
t.column :condition_effects_other, :boolean |
||||||
|
t.column :condition_effects_prefer_not_to_say, :boolean |
||||||
|
end |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,11 @@ |
|||||||
|
class AddReasonablePreferenceReasonFields < ActiveRecord::Migration[6.1] |
||||||
|
def change |
||||||
|
change_table :case_logs, bulk: true do |t| |
||||||
|
t.column :reasonable_preference_reason_homeless, :boolean |
||||||
|
t.column :reasonable_preference_reason_unsatisfactory_housing, :boolean |
||||||
|
t.column :reasonable_preference_reason_medical_grounds, :boolean |
||||||
|
t.column :reasonable_preference_reason_avoid_hardship, :boolean |
||||||
|
t.column :reasonable_preference_reason_do_not_know, :boolean |
||||||
|
end |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,14 @@ |
|||||||
|
class RenameEconomicStatusFields < ActiveRecord::Migration[6.1] |
||||||
|
def change |
||||||
|
change_table :case_logs, bulk: true do |t| |
||||||
|
t.rename :person_2_economic, :person_2_economic_status |
||||||
|
t.rename :person_3_economic, :person_3_economic_status |
||||||
|
t.rename :person_4_economic, :person_4_economic_status |
||||||
|
t.rename :person_5_economic, :person_5_economic_status |
||||||
|
t.rename :person_6_economic, :person_6_economic_status |
||||||
|
t.rename :person_7_economic, :person_7_economic_status |
||||||
|
t.rename :person_8_economic, :person_8_economic_status |
||||||
|
t.rename :postcode, :property_postcode |
||||||
|
end |
||||||
|
end |
||||||
|
end |
Loading…
Reference in new issue