From a7652131786cd77292217b47cce821938fbda2fc Mon Sep 17 00:00:00 2001 From: Jack S <113976590+bibblobcode@users.noreply.github.com> Date: Fri, 30 Sep 2022 14:44:52 +0100 Subject: [PATCH] Format JSON files to improve readability (#923) --- config/forms/2021_2022.json | 585 +++++++++-- config/forms/2022_2023.json | 589 ++++++++--- config/forms/schema/2021_2022.json | 16 +- config/forms/schema/generic.json | 21 +- spec/fixtures/forms/2021_2022.json | 1251 ++++++++++++----------- spec/fixtures/forms/2022_2023.json | 96 +- spec/fixtures/forms/test_validator.json | 6 +- 7 files changed, 1712 insertions(+), 852 deletions(-) diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json index 2ed0f3fdc..4292d1d3a 100644 --- a/config/forms/2021_2022.json +++ b/config/forms/2021_2022.json @@ -32,15 +32,19 @@ } }, "conditional_for": { - "postcode_full": [1] + "postcode_full": [ + 1 + ] }, "hidden_in_check_answers": { - "depends_on": [{ - "postcode_known": 0 - }, - { - "postcode_known": 1 - }] + "depends_on": [ + { + "postcode_known": 0 + }, + { + "postcode_known": 1 + } + ] } }, "postcode_full": { @@ -772,7 +776,11 @@ ] }, "void_date_value_check": { - "depends_on": [{ "voiddate_in_soft_range?": true }], + "depends_on": [ + { + "voiddate_in_soft_range?": true + } + ], "title_text": { "translation": "soft_validations.void_date.title_text" }, @@ -839,7 +847,9 @@ } }, "conditional_for": { - "mrcdate": [1] + "mrcdate": [ + 1 + ] } }, "mrcdate": { @@ -901,7 +911,11 @@ ] }, "property_major_repairs_value_check": { - "depends_on": [{ "major_repairs_date_in_soft_range?": true }], + "depends_on": [ + { + "major_repairs_date_in_soft_range?": true + } + ], "title_text": { "translation": "soft_validations.major_repairs_date.title_text" }, @@ -989,7 +1003,9 @@ } }, "conditional_for": { - "tenancyother": [3] + "tenancyother": [ + 3 + ] } }, "tenancyother": { @@ -1031,7 +1047,9 @@ } }, "conditional_for": { - "tenancyother": [3] + "tenancyother": [ + 3 + ] } }, "tenancyother": { @@ -1153,10 +1171,18 @@ "width": 2 } }, - "depends_on": [{ "declaration": 1 }] + "depends_on": [ + { + "declaration": 1 + } + ] }, "no_females_pregnant_household_lead_hhmemb_value_check": { - "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true + } + ], "title_text": { "translation": "soft_validations.pregnancy.title", "arguments": [ @@ -1255,7 +1281,9 @@ } }, "conditional_for": { - "age1": [0] + "age1": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -1285,10 +1313,18 @@ } } }, - "depends_on": [{ "declaration": 1 }] + "depends_on": [ + { + "declaration": 1 + } + ] }, "no_females_pregnant_household_lead_age_value_check": { - "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true + } + ], "title_text": { "translation": "soft_validations.pregnancy.title", "arguments": [ @@ -1398,10 +1434,18 @@ } } }, - "depends_on": [{ "declaration": 1 }] + "depends_on": [ + { + "declaration": 1 + } + ] }, "no_females_pregnant_household_lead_value_check": { - "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true + } + ], "title_text": { "translation": "soft_validations.pregnancy.title", "arguments": [ @@ -1517,7 +1561,11 @@ } } }, - "depends_on": [{ "declaration": 1 }] + "depends_on": [ + { + "declaration": 1 + } + ] }, "lead_tenant_ethnic_background_arab": { "header": "", @@ -1539,7 +1587,11 @@ } } }, - "depends_on": [{ "ethnic_group": 4 }] + "depends_on": [ + { + "ethnic_group": 4 + } + ] }, "lead_tenant_ethnic_background_asian": { "header": "", @@ -1570,7 +1622,11 @@ } } }, - "depends_on": [{ "ethnic_group": 2 }] + "depends_on": [ + { + "ethnic_group": 2 + } + ] }, "lead_tenant_ethnic_background_black": { "header": "", @@ -1595,7 +1651,11 @@ } } }, - "depends_on": [{ "ethnic_group": 3 }] + "depends_on": [ + { + "ethnic_group": 3 + } + ] }, "lead_tenant_ethnic_background_mixed": { "header": "", @@ -1623,7 +1683,11 @@ } } }, - "depends_on": [{ "ethnic_group": 1 }] + "depends_on": [ + { + "ethnic_group": 1 + } + ] }, "lead_tenant_ethnic_background_white": { "header": "", @@ -1651,7 +1715,11 @@ } } }, - "depends_on": [{ "ethnic_group": 0 }] + "depends_on": [ + { + "ethnic_group": 0 + } + ] }, "lead_tenant_nationality": { "header": "", @@ -1719,7 +1787,11 @@ } } }, - "depends_on": [{ "declaration": 1 }] + "depends_on": [ + { + "declaration": 1 + } + ] }, "lead_tenant_working_situation": { "header": "", @@ -1768,10 +1840,18 @@ } } }, - "depends_on": [{ "declaration": 1 }] + "depends_on": [ + { + "declaration": 1 + } + ] }, "lead_tenant_under_retirement_value_check": { - "depends_on": [{ "person_1_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_1_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -1826,7 +1906,9 @@ }, "lead_tenant_over_retirement_value_check": { "depends_on": [ - { "person_1_not_retired_over_soft_max_age?": true } + { + "person_1_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -1978,7 +2060,9 @@ } }, "conditional_for": { - "age2": [0] + "age2": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -2016,7 +2100,10 @@ }, "no_females_pregnant_household_person_2_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age2_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age2_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -2260,8 +2347,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age2_known": 1 }, - { "age2": { "operator": "<", "operand": 16 } } + { + "age2_known": 1 + }, + { + "age2": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -2291,7 +2385,11 @@ ] }, "person_2_under_retirement_value_check": { - "depends_on": [{ "person_2_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_2_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -2346,7 +2444,9 @@ }, "person_2_over_retirement_value_check": { "depends_on": [ - { "person_2_not_retired_over_soft_max_age?": true } + { + "person_2_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -2495,7 +2595,9 @@ } }, "conditional_for": { - "age3": [0] + "age3": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -2533,7 +2635,10 @@ }, "no_females_pregnant_household_person_3_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age3_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age3_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -2777,8 +2882,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age3_known": 1 }, - { "age3": { "operator": "<", "operand": 16 } } + { + "age3_known": 1 + }, + { + "age3": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -2808,7 +2920,11 @@ ] }, "person_3_under_retirement_value_check": { - "depends_on": [{ "person_3_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_3_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -2863,7 +2979,9 @@ }, "person_3_over_retirement_value_check": { "depends_on": [ - { "person_3_not_retired_over_soft_max_age?": true } + { + "person_3_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -3009,7 +3127,9 @@ } }, "conditional_for": { - "age4": [0] + "age4": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -3047,7 +3167,10 @@ }, "no_females_pregnant_household_person_4_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age4_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age4_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -3291,8 +3414,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age4_known": 1 }, - { "age4": { "operator": "<", "operand": 16 } } + { + "age4_known": 1 + }, + { + "age4": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -3322,7 +3452,11 @@ ] }, "person_4_under_retirement_value_check": { - "depends_on": [{ "person_4_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_4_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -3377,7 +3511,9 @@ }, "person_4_over_retirement_value_check": { "depends_on": [ - { "person_4_not_retired_over_soft_max_age?": true } + { + "person_4_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -3520,7 +3656,9 @@ } }, "conditional_for": { - "age5": [0] + "age5": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -3558,7 +3696,10 @@ }, "no_females_pregnant_household_person_5_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age5_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age5_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -3802,8 +3943,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age5_known": 1 }, - { "age5": { "operator": "<", "operand": 16 } } + { + "age5_known": 1 + }, + { + "age5": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -3833,7 +3981,11 @@ ] }, "person_5_under_retirement_value_check": { - "depends_on": [{ "person_5_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_5_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -3888,7 +4040,9 @@ }, "person_5_over_retirement_value_check": { "depends_on": [ - { "person_5_not_retired_over_soft_max_age?": true } + { + "person_5_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -4028,7 +4182,9 @@ } }, "conditional_for": { - "age6": [0] + "age6": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -4066,7 +4222,10 @@ }, "no_females_pregnant_household_person_6_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age6_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age6_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -4310,8 +4469,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age6_known": 1 }, - { "age6": { "operator": "<", "operand": 16 } } + { + "age6_known": 1 + }, + { + "age6": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -4341,7 +4507,11 @@ ] }, "person_6_under_retirement_value_check": { - "depends_on": [{ "person_6_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_6_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -4396,7 +4566,9 @@ }, "person_6_over_retirement_value_check": { "depends_on": [ - { "person_6_not_retired_over_soft_max_age?": true } + { + "person_6_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -4533,7 +4705,9 @@ } }, "conditional_for": { - "age7": [0] + "age7": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -4571,7 +4745,10 @@ }, "no_females_pregnant_household_person_7_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age7_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age7_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -4815,8 +4992,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age7_known": 1 }, - { "age7": { "operator": "<", "operand": 16 } } + { + "age7_known": 1 + }, + { + "age7": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -4846,7 +5030,11 @@ ] }, "person_7_under_retirement_value_check": { - "depends_on": [{ "person_7_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_7_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -4901,7 +5089,9 @@ }, "person_7_over_retirement_value_check": { "depends_on": [ - { "person_7_not_retired_over_soft_max_age?": true } + { + "person_7_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -5035,7 +5225,9 @@ } }, "conditional_for": { - "age8": [0] + "age8": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -5073,7 +5265,10 @@ }, "no_females_pregnant_household_person_8_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age8_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age8_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -5317,8 +5512,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age8_known": 1 }, - { "age8": { "operator": "<", "operand": 16 } } + { + "age8_known": 1 + }, + { + "age8": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -5348,7 +5550,11 @@ ] }, "person_8_under_retirement_value_check": { - "depends_on": [{ "person_8_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_8_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -5403,7 +5609,9 @@ }, "person_8_over_retirement_value_check": { "depends_on": [ - { "person_8_not_retired_over_soft_max_age?": true } + { + "person_8_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -5594,7 +5802,11 @@ } }, "no_females_pregnant_household_value_check": { - "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true + } + ], "title_text": { "translation": "soft_validations.pregnancy.title", "arguments": [ @@ -5662,7 +5874,8 @@ "pregnancy_value_check": { "check_answer_label": "Pregnancy confirmation", "hidden_in_check_answers": { - "depends_on": [{ + "depends_on": [ + { "pregnancy_value_check": 0 }, { @@ -6052,7 +6265,9 @@ } }, "conditional_for": { - "reasonother": [20] + "reasonother": [ + 20 + ] } }, "reasonother": { @@ -6283,7 +6498,9 @@ } }, "conditional_for": { - "ppostcode_full": [1] + "ppostcode_full": [ + 1 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -6344,7 +6561,9 @@ } }, "conditional_for": { - "prevloc": [1] + "prevloc": [ + 1 + ] } }, "prevloc": { @@ -7175,7 +7394,11 @@ } }, "net_income_value_check": { - "depends_on": [{ "net_income_soft_validation_triggered?": true }], + "depends_on": [ + { + "net_income_soft_validation_triggered?": true + } + ], "title_text": { "translation": "soft_validations.net_income.title_text" }, @@ -7376,7 +7599,9 @@ } }, "conditional_for": { - "chcharge": [1] + "chcharge": [ + 1 + ] } }, "chcharge": { @@ -7471,7 +7696,9 @@ } }, "conditional_for": { - "chcharge": [1] + "chcharge": [ + 1 + ] } }, "chcharge": { @@ -7516,7 +7743,9 @@ } }, "conditional_for": { - "chcharge": [1] + "chcharge": [ + 1 + ] } }, "chcharge": { @@ -7561,7 +7790,9 @@ } }, "conditional_for": { - "chcharge": [1] + "chcharge": [ + 1 + ] } }, "chcharge": { @@ -7602,7 +7833,12 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7616,7 +7852,12 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7630,7 +7871,12 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7644,7 +7890,12 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7660,7 +7911,12 @@ "suffix": " every week", "readonly": true, "requires_js": true, - "fields_added": ["brent", "scharge", "pscharge", "supcharg"] + "fields_added": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ] } }, "depends_on": [ @@ -7800,7 +8056,12 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7814,7 +8075,12 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7828,7 +8094,12 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7842,7 +8113,12 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7858,7 +8134,12 @@ "suffix": " every 2 weeks", "readonly": true, "requires_js": true, - "fields_added": ["brent", "scharge", "pscharge", "supcharg"] + "fields_added": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ] } }, "depends_on": [ @@ -7898,7 +8179,12 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7912,7 +8198,12 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7926,7 +8217,12 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7940,7 +8236,12 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7956,7 +8257,12 @@ "suffix": " every 4 weeks", "readonly": true, "requires_js": true, - "fields_added": ["brent", "scharge", "pscharge", "supcharg"] + "fields_added": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ] } }, "depends_on": [ @@ -7996,7 +8302,12 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -8010,7 +8321,12 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -8024,7 +8340,12 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -8038,7 +8359,12 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -8054,7 +8380,12 @@ "suffix": " every month", "readonly": true, "requires_js": true, - "fields_added": ["brent", "scharge", "pscharge", "supcharg"] + "fields_added": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ] } }, "depends_on": [ @@ -8081,7 +8412,11 @@ ] }, "min_rent_value_check": { - "depends_on": [{ "rent_in_soft_min_range?": true }], + "depends_on": [ + { + "rent_in_soft_min_range?": true + } + ], "title_text": { "translation": "soft_validations.rent.min.title_text", "arguments": [ @@ -8134,7 +8469,11 @@ } }, "max_rent_value_check": { - "depends_on": [{ "rent_in_soft_max_range?": true }], + "depends_on": [ + { + "rent_in_soft_max_range?": true + } + ], "title_text": { "translation": "soft_validations.rent.max.title_text", "arguments": [ @@ -8253,7 +8592,9 @@ } }, "conditional_for": { - "tshortfall": [0] + "tshortfall": [ + 0 + ] } }, "tshortfall": { @@ -8267,39 +8608,57 @@ "suffix": [ { "label": " every 2 weeks", - "depends_on": { "period": 2 } + "depends_on": { + "period": 2 + } }, { "label": " every 4 weeks", - "depends_on": { "period": 3 } + "depends_on": { + "period": 3 + } }, { "label": " every calendar month", - "depends_on": { "period": 4 } + "depends_on": { + "period": 4 + } }, { "label": " every week for 50 weeks", - "depends_on": { "period": 5 } + "depends_on": { + "period": 5 + } }, { "label": " every week for 49 weeks", - "depends_on": { "period": 6 } + "depends_on": { + "period": 6 + } }, { "label": " every week for 48 weeks", - "depends_on": { "period": 7 } + "depends_on": { + "period": 7 + } }, { "label": " every week for 47 weeks", - "depends_on": { "period": 8 } + "depends_on": { + "period": 8 + } }, { "label": " every week for 46 weeks", - "depends_on": { "period": 9 } + "depends_on": { + "period": 9 + } }, { "label": " every week for 52 weeks", - "depends_on": { "period": 1 } + "depends_on": { + "period": 1 + } } ] } diff --git a/config/forms/2022_2023.json b/config/forms/2022_2023.json index 190fa04bd..b30461a84 100644 --- a/config/forms/2022_2023.json +++ b/config/forms/2022_2023.json @@ -32,15 +32,19 @@ } }, "conditional_for": { - "postcode_full": [1] + "postcode_full": [ + 1 + ] }, "hidden_in_check_answers": { - "depends_on": [{ - "postcode_known": 0 - }, - { - "postcode_known": 1 - }] + "depends_on": [ + { + "postcode_known": 0 + }, + { + "postcode_known": 1 + } + ] } }, "postcode_full": { @@ -772,7 +776,11 @@ ] }, "void_date_value_check": { - "depends_on": [{ "voiddate_in_soft_range?": true }], + "depends_on": [ + { + "voiddate_in_soft_range?": true + } + ], "title_text": { "translation": "soft_validations.void_date.title_text" }, @@ -839,7 +847,9 @@ } }, "conditional_for": { - "mrcdate": [1] + "mrcdate": [ + 1 + ] } }, "mrcdate": { @@ -901,7 +911,11 @@ ] }, "property_major_repairs_value_check": { - "depends_on": [{ "major_repairs_date_in_soft_range?": true }], + "depends_on": [ + { + "major_repairs_date_in_soft_range?": true + } + ], "title_text": { "translation": "soft_validations.major_repairs_date.title_text" }, @@ -1018,7 +1032,9 @@ } }, "conditional_for": { - "tenancyother": [3] + "tenancyother": [ + 3 + ] } }, "tenancyother": { @@ -1063,7 +1079,9 @@ } }, "conditional_for": { - "tenancyother": [3] + "tenancyother": [ + 3 + ] } }, "tenancyother": { @@ -1188,10 +1206,18 @@ "width": 2 } }, - "depends_on": [{ "declaration": 1 }] + "depends_on": [ + { + "declaration": 1 + } + ] }, "no_females_pregnant_household_lead_hhmemb_value_check": { - "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true + } + ], "title_text": { "translation": "soft_validations.pregnancy.title", "arguments": [ @@ -1290,7 +1316,9 @@ } }, "conditional_for": { - "age1": [0] + "age1": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -1320,10 +1348,18 @@ } } }, - "depends_on": [{ "declaration": 1 }] + "depends_on": [ + { + "declaration": 1 + } + ] }, "no_females_pregnant_household_lead_age_value_check": { - "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true + } + ], "title_text": { "translation": "soft_validations.pregnancy.title", "arguments": [ @@ -1433,10 +1469,18 @@ } } }, - "depends_on": [{ "declaration": 1 }] + "depends_on": [ + { + "declaration": 1 + } + ] }, "no_females_pregnant_household_lead_value_check": { - "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true + } + ], "title_text": { "translation": "soft_validations.pregnancy.title", "arguments": [ @@ -1552,7 +1596,11 @@ } } }, - "depends_on": [{ "declaration": 1 }] + "depends_on": [ + { + "declaration": 1 + } + ] }, "lead_tenant_ethnic_background_arab": { "header": "", @@ -1574,7 +1622,11 @@ } } }, - "depends_on": [{ "ethnic_group": 4 }] + "depends_on": [ + { + "ethnic_group": 4 + } + ] }, "lead_tenant_ethnic_background_asian": { "header": "", @@ -1605,7 +1657,11 @@ } } }, - "depends_on": [{ "ethnic_group": 2 }] + "depends_on": [ + { + "ethnic_group": 2 + } + ] }, "lead_tenant_ethnic_background_black": { "header": "", @@ -1630,7 +1686,11 @@ } } }, - "depends_on": [{ "ethnic_group": 3 }] + "depends_on": [ + { + "ethnic_group": 3 + } + ] }, "lead_tenant_ethnic_background_mixed": { "header": "", @@ -1658,7 +1718,11 @@ } } }, - "depends_on": [{ "ethnic_group": 1 }] + "depends_on": [ + { + "ethnic_group": 1 + } + ] }, "lead_tenant_ethnic_background_white": { "header": "", @@ -1686,7 +1750,11 @@ } } }, - "depends_on": [{ "ethnic_group": 0 }] + "depends_on": [ + { + "ethnic_group": 0 + } + ] }, "lead_tenant_nationality": { "header": "", @@ -1718,7 +1786,11 @@ } } }, - "depends_on": [{ "declaration": 1 }] + "depends_on": [ + { + "declaration": 1 + } + ] }, "lead_tenant_working_situation": { "header": "", @@ -1767,10 +1839,18 @@ } } }, - "depends_on": [{ "declaration": 1 }] + "depends_on": [ + { + "declaration": 1 + } + ] }, "lead_tenant_under_retirement_value_check": { - "depends_on": [{ "person_1_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_1_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -1825,7 +1905,9 @@ }, "lead_tenant_over_retirement_value_check": { "depends_on": [ - { "person_1_not_retired_over_soft_max_age?": true } + { + "person_1_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -1977,7 +2059,9 @@ } }, "conditional_for": { - "age2": [0] + "age2": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -2015,7 +2099,10 @@ }, "no_females_pregnant_household_person_2_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age2_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age2_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -2259,8 +2346,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age2_known": 1 }, - { "age2": { "operator": "<", "operand": 16 } } + { + "age2_known": 1 + }, + { + "age2": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -2290,7 +2384,11 @@ ] }, "person_2_under_retirement_value_check": { - "depends_on": [{ "person_2_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_2_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -2345,7 +2443,9 @@ }, "person_2_over_retirement_value_check": { "depends_on": [ - { "person_2_not_retired_over_soft_max_age?": true } + { + "person_2_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -2494,7 +2594,9 @@ } }, "conditional_for": { - "age3": [0] + "age3": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -2532,7 +2634,10 @@ }, "no_females_pregnant_household_person_3_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age3_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age3_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -2776,8 +2881,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age3_known": 1 }, - { "age3": { "operator": "<", "operand": 16 } } + { + "age3_known": 1 + }, + { + "age3": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -2807,7 +2919,11 @@ ] }, "person_3_under_retirement_value_check": { - "depends_on": [{ "person_3_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_3_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -2862,7 +2978,9 @@ }, "person_3_over_retirement_value_check": { "depends_on": [ - { "person_3_not_retired_over_soft_max_age?": true } + { + "person_3_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -3008,7 +3126,9 @@ } }, "conditional_for": { - "age4": [0] + "age4": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -3046,7 +3166,10 @@ }, "no_females_pregnant_household_person_4_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age4_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age4_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -3290,8 +3413,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age4_known": 1 }, - { "age4": { "operator": "<", "operand": 16 } } + { + "age4_known": 1 + }, + { + "age4": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -3321,7 +3451,11 @@ ] }, "person_4_under_retirement_value_check": { - "depends_on": [{ "person_4_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_4_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -3376,7 +3510,9 @@ }, "person_4_over_retirement_value_check": { "depends_on": [ - { "person_4_not_retired_over_soft_max_age?": true } + { + "person_4_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -3519,7 +3655,9 @@ } }, "conditional_for": { - "age5": [0] + "age5": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -3557,7 +3695,10 @@ }, "no_females_pregnant_household_person_5_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age5_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age5_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -3801,8 +3942,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age5_known": 1 }, - { "age5": { "operator": "<", "operand": 16 } } + { + "age5_known": 1 + }, + { + "age5": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -3832,7 +3980,11 @@ ] }, "person_5_under_retirement_value_check": { - "depends_on": [{ "person_5_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_5_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -3887,7 +4039,9 @@ }, "person_5_over_retirement_value_check": { "depends_on": [ - { "person_5_not_retired_over_soft_max_age?": true } + { + "person_5_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -4027,7 +4181,9 @@ } }, "conditional_for": { - "age6": [0] + "age6": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -4065,7 +4221,10 @@ }, "no_females_pregnant_household_person_6_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age6_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age6_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -4309,8 +4468,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age6_known": 1 }, - { "age6": { "operator": "<", "operand": 16 } } + { + "age6_known": 1 + }, + { + "age6": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -4340,7 +4506,11 @@ ] }, "person_6_under_retirement_value_check": { - "depends_on": [{ "person_6_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_6_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -4395,7 +4565,9 @@ }, "person_6_over_retirement_value_check": { "depends_on": [ - { "person_6_not_retired_over_soft_max_age?": true } + { + "person_6_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -4532,7 +4704,9 @@ } }, "conditional_for": { - "age7": [0] + "age7": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -4570,7 +4744,10 @@ }, "no_females_pregnant_household_person_7_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age7_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age7_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -4814,8 +4991,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age7_known": 1 }, - { "age7": { "operator": "<", "operand": 16 } } + { + "age7_known": 1 + }, + { + "age7": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -4845,7 +5029,11 @@ ] }, "person_7_under_retirement_value_check": { - "depends_on": [{ "person_7_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_7_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -4900,7 +5088,9 @@ }, "person_7_over_retirement_value_check": { "depends_on": [ - { "person_7_not_retired_over_soft_max_age?": true } + { + "person_7_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -5034,7 +5224,9 @@ } }, "conditional_for": { - "age8": [0] + "age8": [ + 0 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -5072,7 +5264,10 @@ }, "no_females_pregnant_household_person_8_age_value_check": { "depends_on": [ - { "no_females_in_a_pregnant_household?": true, "age8_known": 0 } + { + "no_females_in_a_pregnant_household?": true, + "age8_known": 0 + } ], "title_text": { "translation": "soft_validations.pregnancy.title", @@ -5316,8 +5511,15 @@ "9": { "value": "Child under 16", "depends_on": [ - { "age8_known": 1 }, - { "age8": { "operator": "<", "operand": 16 } } + { + "age8_known": 1 + }, + { + "age8": { + "operator": "<", + "operand": 16 + } + } ] }, "0": { @@ -5347,7 +5549,11 @@ ] }, "person_8_under_retirement_value_check": { - "depends_on": [{ "person_8_retired_under_soft_min_age?": true }], + "depends_on": [ + { + "person_8_retired_under_soft_min_age?": true + } + ], "title_text": { "translation": "soft_validations.retirement.min.title", "arguments": [ @@ -5402,7 +5608,9 @@ }, "person_8_over_retirement_value_check": { "depends_on": [ - { "person_8_not_retired_over_soft_max_age?": true } + { + "person_8_not_retired_over_soft_max_age?": true + } ], "title_text": { "translation": "soft_validations.retirement.max.title", @@ -5596,7 +5804,11 @@ } }, "no_females_pregnant_household_value_check": { - "depends_on": [{ "no_females_in_a_pregnant_household?": true }], + "depends_on": [ + { + "no_females_in_a_pregnant_household?": true + } + ], "title_text": { "translation": "soft_validations.pregnancy.title", "arguments": [ @@ -5664,7 +5876,8 @@ "pregnancy_value_check": { "check_answer_label": "Pregnancy confirmation", "hidden_in_check_answers": { - "depends_on": [{ + "depends_on": [ + { "pregnancy_value_check": 0 }, { @@ -6051,7 +6264,9 @@ } }, "conditional_for": { - "reasonother": [20] + "reasonother": [ + 20 + ] } }, "reasonother": { @@ -6242,7 +6457,9 @@ } }, "conditional_for": { - "ppostcode_full": [1] + "ppostcode_full": [ + 1 + ] }, "hidden_in_check_answers": { "depends_on": [ @@ -6303,7 +6520,9 @@ } }, "conditional_for": { - "prevloc": [1] + "prevloc": [ + 1 + ] } }, "prevloc": { @@ -7134,8 +7353,14 @@ } }, "net_income_value_check": { - "depends_on": [{ "net_income_soft_validation_triggered?": true }], - "title_text": { "translation": "soft_validations.net_income.title_text" }, + "depends_on": [ + { + "net_income_soft_validation_triggered?": true + } + ], + "title_text": { + "translation": "soft_validations.net_income.title_text" + }, "informative_text": { "translation": "soft_validations.net_income.hint_text", "arguments": [ @@ -7330,7 +7555,9 @@ } }, "conditional_for": { - "chcharge": [1] + "chcharge": [ + 1 + ] } }, "chcharge": { @@ -7425,7 +7652,9 @@ } }, "conditional_for": { - "chcharge": [1] + "chcharge": [ + 1 + ] } }, "chcharge": { @@ -7470,7 +7699,9 @@ } }, "conditional_for": { - "chcharge": [1] + "chcharge": [ + 1 + ] } }, "chcharge": { @@ -7515,7 +7746,9 @@ } }, "conditional_for": { - "chcharge": [1] + "chcharge": [ + 1 + ] } }, "chcharge": { @@ -7556,7 +7789,12 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7570,7 +7808,12 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7584,7 +7827,12 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7598,7 +7846,12 @@ "width": 5, "prefix": "£", "suffix": " every week", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7614,7 +7867,12 @@ "suffix": " every week", "readonly": true, "requires_js": true, - "fields_added": ["brent", "scharge", "pscharge", "supcharg"] + "fields_added": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ] } }, "depends_on": [ @@ -7754,7 +8012,12 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7768,7 +8031,12 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7782,7 +8050,12 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7796,7 +8069,12 @@ "width": 5, "prefix": "£", "suffix": " every 2 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7812,7 +8090,12 @@ "suffix": " every 2 weeks", "readonly": true, "requires_js": true, - "fields_added": ["brent", "scharge", "pscharge", "supcharg"] + "fields_added": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ] } }, "depends_on": [ @@ -7852,7 +8135,12 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7866,7 +8154,12 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7880,7 +8173,12 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7894,7 +8192,12 @@ "width": 5, "prefix": "£", "suffix": " every 4 weeks", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7910,7 +8213,12 @@ "suffix": " every 4 weeks", "readonly": true, "requires_js": true, - "fields_added": ["brent", "scharge", "pscharge", "supcharg"] + "fields_added": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ] } }, "depends_on": [ @@ -7950,7 +8258,12 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7964,7 +8277,12 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7978,7 +8296,12 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -7992,7 +8315,12 @@ "width": 5, "prefix": "£", "suffix": " every month", - "fields-to-add": ["brent", "scharge", "pscharge", "supcharg"], + "fields-to-add": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ], "result-field": "tcharge", "hidden_in_check_answers": true }, @@ -8008,7 +8336,12 @@ "suffix": " every month", "readonly": true, "requires_js": true, - "fields_added": ["brent", "scharge", "pscharge", "supcharg"] + "fields_added": [ + "brent", + "scharge", + "pscharge", + "supcharg" + ] } }, "depends_on": [ @@ -8035,7 +8368,11 @@ ] }, "min_rent_value_check": { - "depends_on": [{ "rent_in_soft_min_range?": true }], + "depends_on": [ + { + "rent_in_soft_min_range?": true + } + ], "title_text": { "translation": "soft_validations.rent.min.title_text", "arguments": [ @@ -8088,7 +8425,11 @@ } }, "max_rent_value_check": { - "depends_on": [{ "rent_in_soft_max_range?": true }], + "depends_on": [ + { + "rent_in_soft_max_range?": true + } + ], "title_text": { "translation": "soft_validations.rent.max.title_text", "arguments": [ @@ -8199,7 +8540,9 @@ } }, "conditional_for": { - "tshortfall": [0] + "tshortfall": [ + 0 + ] } }, "tshortfall": { @@ -8213,39 +8556,57 @@ "suffix": [ { "label": " every 2 weeks", - "depends_on": { "period": 2 } + "depends_on": { + "period": 2 + } }, { "label": " every 4 weeks", - "depends_on": { "period": 3 } + "depends_on": { + "period": 3 + } }, { "label": " every calendar month", - "depends_on": { "period": 4 } + "depends_on": { + "period": 4 + } }, { "label": " every week for 50 weeks", - "depends_on": { "period": 5 } + "depends_on": { + "period": 5 + } }, { "label": " every week for 49 weeks", - "depends_on": { "period": 6 } + "depends_on": { + "period": 6 + } }, { "label": " every week for 48 weeks", - "depends_on": { "period": 7 } + "depends_on": { + "period": 7 + } }, { "label": " every week for 47 weeks", - "depends_on": { "period": 8 } + "depends_on": { + "period": 8 + } }, { "label": " every week for 46 weeks", - "depends_on": { "period": 9 } + "depends_on": { + "period": 9 + } }, { "label": " every week for 52 weeks", - "depends_on": { "period": 1 } + "depends_on": { + "period": 1 + } } ] } diff --git a/config/forms/schema/2021_2022.json b/config/forms/schema/2021_2022.json index d91600c4d..326394391 100644 --- a/config/forms/schema/2021_2022.json +++ b/config/forms/schema/2021_2022.json @@ -4,7 +4,12 @@ "title": "Form", "description": "A form", "type": "object", - "required": ["form_type", "start_year", "end_year", "sections"], + "required": [ + "form_type", + "start_year", + "end_year", + "sections" + ], "properties": { "form_type": { "description": "", @@ -35,7 +40,9 @@ "[a-z_]+": { "description": "", "type": "object", - "required": ["label"], + "required": [ + "label" + ], "properties": { "label": { "description": "", @@ -62,7 +69,10 @@ "[a-z_]+": { "description": "", "type": "object", - "required": ["header", "check_answer_label"], + "required": [ + "header", + "check_answer_label" + ], "properties": { "check_answer_label": { "description": "", diff --git a/config/forms/schema/generic.json b/config/forms/schema/generic.json index 7535ca339..97552a5f4 100644 --- a/config/forms/schema/generic.json +++ b/config/forms/schema/generic.json @@ -4,7 +4,12 @@ "title": "Form", "description": "A form", "type": "object", - "required": ["form_type", "start_year", "end_year", "sections"], + "required": [ + "form_type", + "start_year", + "end_year", + "sections" + ], "properties": { "form_type": { "description": "", @@ -35,7 +40,9 @@ "[a-z_]+": { "description": "SubSection Name", "type": "object", - "required": ["label"], + "required": [ + "label" + ], "properties": { "label": { "description": "", @@ -47,7 +54,10 @@ "^(?!(depends_on))[a-z_]+$": { "description": "Page Name", "type": "object", - "required": ["header", "questions"], + "required": [ + "header", + "questions" + ], "properties": { "header": { "description": "", @@ -63,7 +73,10 @@ "[a-z_]+": { "description": "Question Name", "type": "object", - "required": ["header", "type"], + "required": [ + "header", + "type" + ], "properties": { "header": { "description": "", diff --git a/spec/fixtures/forms/2021_2022.json b/spec/fixtures/forms/2021_2022.json index 99b4d8713..faab8e674 100644 --- a/spec/fixtures/forms/2021_2022.json +++ b/spec/fixtures/forms/2021_2022.json @@ -1,638 +1,702 @@ { - "form_type": "lettings", - "start_date": "2021-04-01T00:00:00.000+01:00", - "end_date": "2022-07-01T00:00:00.000+01:00", - "sections": { - "household": { - "label": "About the household", - "description": "Make sure the tenant has seen the privacy notice.", - "subsections": { - "household_characteristics": { - "label": "Household characteristics", - "pages": { - "tenant_code_test": { - "questions": { - "tenancycode": { - "check_answers_card_number": 0, - "check_answer_label": "Tenant code", - "header": "What is the tenant code?", - "hint_text": "This is how you usually refer to this tenancy on your own systems.", - "type": "text", - "width": 10 - } - }, - "depends_on": [ - { - "housingneeds_a": 1 - }, - { - "housingneeds_a": null - } - ]}, - "person_1_age": { - "questions": { - "age1": { - "check_answers_card_number": 1, - "check_answer_label": "Lead tenant’s age", - "header": "What is the tenant’s age?", - "type": "numeric", - "min": 16, - "max": 120, - "step": 1, - "width": 2 - } + "form_type": "lettings", + "start_date": "2021-04-01T00:00:00.000+01:00", + "end_date": "2022-07-01T00:00:00.000+01:00", + "sections": { + "household": { + "label": "About the household", + "description": "Make sure the tenant has seen the privacy notice.", + "subsections": { + "household_characteristics": { + "label": "Household characteristics", + "pages": { + "tenant_code_test": { + "questions": { + "tenancycode": { + "check_answers_card_number": 0, + "check_answer_label": "Tenant code", + "header": "What is the tenant code?", + "hint_text": "This is how you usually refer to this tenancy on your own systems.", + "type": "text", + "width": 10 + } + }, + "depends_on": [ + { + "housingneeds_a": 1 }, - "depends_on": [ - { - "housingneeds_a": 1 - }, - { - "housingneeds_a": null - } - ] + { + "housingneeds_a": null + } + ] + }, + "person_1_age": { + "questions": { + "age1": { + "check_answers_card_number": 1, + "check_answer_label": "Lead tenant’s age", + "header": "What is the tenant’s age?", + "type": "numeric", + "min": 16, + "max": 120, + "step": 1, + "width": 2 + } }, - "person_1_gender": { - "questions": { - "sex1": { - "check_answers_card_number": 1, - "check_answer_label": "Lead tenant’s gender identity", - "header": "Which of these best describes the tenant’s gender identity?", - "type": "radio", - "answer_options": { - "F": { - "value": "Female" - }, - "M": { - "value": "Male" - }, - "X": { - "value": "Non-binary" - }, - "R": { - "value": "Prefer not to say" - } + "depends_on": [ + { + "housingneeds_a": 1 + }, + { + "housingneeds_a": null + } + ] + }, + "person_1_gender": { + "questions": { + "sex1": { + "check_answers_card_number": 1, + "check_answer_label": "Lead tenant’s gender identity", + "header": "Which of these best describes the tenant’s gender identity?", + "type": "radio", + "answer_options": { + "F": { + "value": "Female" + }, + "M": { + "value": "Male" + }, + "X": { + "value": "Non-binary" + }, + "R": { + "value": "Prefer not to say" } } } - }, - "person_1_working_situation": { - "header": "", - "description": "", - "questions": { - "ecstat1": { - "check_answers_card_number": 1, - "check_answer_label": "Lead tenant’s working situation", - "header": "Which of these best describes the lead tenant’s socks?", - "hint_text": "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest.", - "type": "radio", - "answer_options": { - "0": { - "value": "Part-time – Less than 30 hours" - }, - "1": { - "value": "Full-time – 30 hours or more" - }, - "2": { - "value": "Full-time student" - }, - "3": { - "value": "In government training into work, such as New Deal" - }, - "4": { - "value": "Jobseeker" - }, - "5": { - "value": "Not seeking work" - }, - "6": { - "value": "Unable to work because of long term sick or disability" - }, - "7": { - "value": "Retired" - }, - "8": { - "value": "Child under 16" - }, - "9": { - "value": "Other" - }, - "divider": { - "value": true - }, - "10": { - "value": "Tenant prefers not to say" - } + } + }, + "person_1_working_situation": { + "header": "", + "description": "", + "questions": { + "ecstat1": { + "check_answers_card_number": 1, + "check_answer_label": "Lead tenant’s working situation", + "header": "Which of these best describes the lead tenant’s socks?", + "hint_text": "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest.", + "type": "radio", + "answer_options": { + "0": { + "value": "Part-time – Less than 30 hours" + }, + "1": { + "value": "Full-time – 30 hours or more" + }, + "2": { + "value": "Full-time student" + }, + "3": { + "value": "In government training into work, such as New Deal" + }, + "4": { + "value": "Jobseeker" + }, + "5": { + "value": "Not seeking work" + }, + "6": { + "value": "Unable to work because of long term sick or disability" + }, + "7": { + "value": "Retired" + }, + "8": { + "value": "Child under 16" + }, + "9": { + "value": "Other" + }, + "divider": { + "value": true + }, + "10": { + "value": "Tenant prefers not to say" } } } - }, - "household_number_of_members": { - "questions": { - "hhmemb": { - "check_answers_card_number": 0, - "check_answer_label": "Number of Household Members", - "header": "How many people are there in the household?", - "hint_text": "The maximum number of members is 8", - "type": "numeric", - "min": 0, - "max": 8, - "step": 1, - "width": 2, - "conditional_for": { - "relat2": ">1", - "age2": ">1", - "sex2": ">1" - } - }, - "relat2": { - "check_answers_card_number": 2, - "check_answer_label": "Person 2’s relationship to lead tenant", - "header": "What is person 2’s relationship to lead tenant", - "type": "radio", - "answer_options": { - "X": { - "value": "Other" - }, - "R": { - "value": "Prefer not to say" - } + } + }, + "household_number_of_members": { + "questions": { + "hhmemb": { + "check_answers_card_number": 0, + "check_answer_label": "Number of Household Members", + "header": "How many people are there in the household?", + "hint_text": "The maximum number of members is 8", + "type": "numeric", + "min": 0, + "max": 8, + "step": 1, + "width": 2, + "conditional_for": { + "relat2": ">1", + "age2": ">1", + "sex2": ">1" + } + }, + "relat2": { + "check_answers_card_number": 2, + "check_answer_label": "Person 2’s relationship to lead tenant", + "header": "What is person 2’s relationship to lead tenant", + "type": "radio", + "answer_options": { + "X": { + "value": "Other" + }, + "R": { + "value": "Prefer not to say" } - }, - "age2": { - "check_answers_card_number": 2, - "check_answer_label": "Person 2’s age", - "header": "Do you know person 2’s age?", - "type": "numeric", - "min": 1, - "max": 120, - "step": 1, - "width": 2 - }, - "sex2": { - "check_answers_card_number": 2, - "check_answer_label": "Person 2’s gender identity", - "header": "Which of these best describes person 2’s gender identity?", - "type": "radio", - "answer_options": { - "F": { - "value": "Female" - }, - "M": { - "value": "Male" - }, - "X": { - "value": "Non-binary" - }, - "R": { - "value": "Prefer not to say" - } + } + }, + "age2": { + "check_answers_card_number": 2, + "check_answer_label": "Person 2’s age", + "header": "Do you know person 2’s age?", + "type": "numeric", + "min": 1, + "max": 120, + "step": 1, + "width": 2 + }, + "sex2": { + "check_answers_card_number": 2, + "check_answer_label": "Person 2’s gender identity", + "header": "Which of these best describes person 2’s gender identity?", + "type": "radio", + "answer_options": { + "F": { + "value": "Female" + }, + "M": { + "value": "Male" + }, + "X": { + "value": "Non-binary" + }, + "R": { + "value": "Prefer not to say" } } } - }, - "retirement_value_check": { - "questions": { - "retirement_value_check": { - "check_answer_label": "Retirement age soft validation", - "hidden_in_check_answers": true, - "header": "Are you sure this person is retired?", - "type": "radio", - "answer_options": { - "0": { - "value": "Yes" - }, - "1": { - "value": "No" - } + } + }, + "retirement_value_check": { + "questions": { + "retirement_value_check": { + "check_answer_label": "Retirement age soft validation", + "hidden_in_check_answers": true, + "header": "Are you sure this person is retired?", + "type": "radio", + "answer_options": { + "0": { + "value": "Yes" + }, + "1": { + "value": "No" } } - }, - "depends_on": [ - { - "age2": { "operator": ">", "operand": 50 } - } - ] + } }, - "person_2_working_situation": { - "header": "", - "description": "", - "questions": { - "ecstat2": { - "check_answers_card_number": 2, - "check_answer_label": "Person 2’s Work", - "header": "Which of these best describes person 2’s working situation?", - "type": "radio", - "answer_options": { - "0": { - "value": "Other" - }, - "9": { - "value": "Child under 16", - "depends_on": [ - { "age2_known": 1 }, - { "age2": { "operator": "<", "operand": 16 } } - ] - }, - "1": { - "value": "Prefer not to say" - } - } + "depends_on": [ + { + "age2": { + "operator": ">", + "operand": 50 } - }, - "depends_on": [ - { - "age2": { "operator": ">", "operand": 15 } + } + ] + }, + "person_2_working_situation": { + "header": "", + "description": "", + "questions": { + "ecstat2": { + "check_answers_card_number": 2, + "check_answer_label": "Person 2’s Work", + "header": "Which of these best describes person 2’s working situation?", + "type": "radio", + "answer_options": { + "0": { + "value": "Other" + }, + "9": { + "value": "Child under 16", + "depends_on": [ + { + "age2_known": 1 + }, + { + "age2": { + "operator": "<", + "operand": 16 + } + } + ] + }, + "1": { + "value": "Prefer not to say" + } } - ] + } }, - "propcode": { - "questions": { - "propcode": { - "check_answers_card_number": 0, - "check_answer_label": "", - "header": "property reference?", - "type": "text" + "depends_on": [ + { + "age2": { + "operator": ">", + "operand": 15 } } + ] + }, + "propcode": { + "questions": { + "propcode": { + "check_answers_card_number": 0, + "check_answer_label": "", + "header": "property reference?", + "type": "text" + } } } - }, - "household_needs": { - "label": "Household needs", - "pages": { - "armed_forces": { - "header": "Experience of the UK Armed Forces", - "questions": { - "armedforces": { - "header": "Does anybody in the household have any links to the UK armed forces?", - "hint_text": "This excludes national service. If there are several people in the household with links to the UK armed forces, you should answer for the regular. If there’s no regular, answer for the reserve. If there’s no reserve, answer for the spouse or civil partner.", - "type": "radio", - "check_answer_label": "Household links to UK armed forces", - "answer_options": { - "1": { - "value": "Yes, the person is a current or former regular" - }, - "4": { - "value": "Yes, the person is a current or former reserve" - }, - "5": { - "value": "Yes, the tenant is a spouse or civil partner of a UK armed forces member and has been bereaved or separated from them within the last 2 years" - }, - "2": { - "value": "No" - }, - "3": { - "value": "Person prefers not to say" - } + } + }, + "household_needs": { + "label": "Household needs", + "pages": { + "armed_forces": { + "header": "Experience of the UK Armed Forces", + "questions": { + "armedforces": { + "header": "Does anybody in the household have any links to the UK armed forces?", + "hint_text": "This excludes national service. If there are several people in the household with links to the UK armed forces, you should answer for the regular. If there’s no regular, answer for the reserve. If there’s no reserve, answer for the spouse or civil partner.", + "type": "radio", + "check_answer_label": "Household links to UK armed forces", + "answer_options": { + "1": { + "value": "Yes, the person is a current or former regular" + }, + "4": { + "value": "Yes, the person is a current or former reserve" }, - "conditional_for": { - "leftreg": [1] + "5": { + "value": "Yes, the tenant is a spouse or civil partner of a UK armed forces member and has been bereaved or separated from them within the last 2 years" + }, + "2": { + "value": "No" + }, + "3": { + "value": "Person prefers not to say" } }, - "leftreg": { - "header": "Are they still serving?", - "hint_text": "", - "type": "text", - "check_answer_label": "When did they leave the Armed Forces?" + "conditional_for": { + "leftreg": [ + 1 + ] } + }, + "leftreg": { + "header": "Are they still serving?", + "hint_text": "", + "type": "text", + "check_answer_label": "When did they leave the Armed Forces?" } - }, - "medical_conditions": { - "questions": { - "illness": { - "header": "Does anyone in the household have any of the following that they expect to last for 12 months or more: