Browse Source

Make outstanding amount question conditional

pull/31/head
baarkerlounger 4 years ago
parent
commit
66ca7eb938
  1. 13
      config/forms/2021_2022.json
  2. 7
      db/migrate/20211005115813_add_conditional_fields_to_case_logs.rb
  3. 3
      db/schema.rb

13
config/forms/2021_2022.json

@ -1187,7 +1187,7 @@
"step": 1, "step": 1,
"readonly": true "readonly": true
}, },
"outstanding_amount": { "outstanding_rent_or_charges": {
"check_answer_label": "After housing benefit and/or housing element of UC payment is received, will there be an outstanding amount for basic rent and/or benefit eligible charges?", "check_answer_label": "After housing benefit and/or housing element of UC payment is received, will there be an outstanding amount for basic rent and/or benefit eligible charges?",
"header": "After housing benefit and/or housing element of UC payment is received, will there be an outstanding amount for basic rent and/or benefit eligible charges?", "header": "After housing benefit and/or housing element of UC payment is received, will there be an outstanding amount for basic rent and/or benefit eligible charges?",
"hint_text": "", "hint_text": "",
@ -1195,7 +1195,18 @@
"answer_options": { "answer_options": {
"0": "Yes", "0": "Yes",
"1": "No" "1": "No"
},
"conditional_for": {
"outstanding_amount": ["Yes"]
} }
},
"outstanding_amount": {
"check_answer_label": "Outstanding amount",
"header": "What do you expect the amount to be?",
"hint_text": "If the amount is unknown you can estimate",
"type": "numeric",
"min": 0,
"step": 1
} }
} }
} }

7
db/migrate/20211005115813_add_conditional_fields_to_case_logs.rb

@ -0,0 +1,7 @@
class AddConditionalFieldsToCaseLogs < ActiveRecord::Migration[6.1]
def change
change_table :case_logs, bulk: true do |t|
t.column :outstanding_rent_or_charges, :string
end
end
end

3
db/schema.rb

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_09_24_143031) do ActiveRecord::Schema.define(version: 2021_10_05_115813) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@ -108,6 +108,7 @@ ActiveRecord::Schema.define(version: 2021_09_24_143031) do
t.string "cbl_letting" t.string "cbl_letting"
t.string "chr_letting" t.string "chr_letting"
t.string "cap_letting" t.string "cap_letting"
t.string "outstanding_rent_or_charges"
end end
end end

Loading…
Cancel
Save