Browse Source

Remove sales related questions from lettings form

pull/254/head
Paul Robert Lloyd 3 years ago
parent
commit
291fb188d3
  1. 62
      config/forms/2021_2022.json
  2. 2
      spec/factories/case_log.rb
  3. 1
      spec/fixtures/complete_case_log.json
  4. 56
      spec/fixtures/forms/2022_2023.json

62
config/forms/2021_2022.json

@ -60,23 +60,6 @@
},
"depends_on": [{ "gdpr_acceptance": "Yes" }]
},
"sale_or_letting": {
"header": "",
"description": "",
"questions": {
"sale_or_letting": {
"check_answer_label": "Letting or sale",
"header": "Is this a letting or sale?",
"hint_text": "",
"type": "radio",
"answer_options": {
"1": "Letting",
"0": "Sale"
}
}
},
"depends_on": [{ "gdpr_acceptance": "Yes" }]
},
"tenant_same_property_renewal": {
"header": "",
"description": "",
@ -93,8 +76,7 @@
}
},
"depends_on": [{
"gdpr_acceptance": "Yes",
"sale_or_letting": "Letting"
"gdpr_acceptance": "Yes"
}]
},
"startdate": {
@ -109,8 +91,7 @@
}
},
"depends_on": [{
"gdpr_acceptance": "Yes",
"sale_or_letting": "Letting"
"gdpr_acceptance": "Yes"
}]
},
"about_this_letting": {
@ -153,8 +134,7 @@
}
},
"depends_on": [{
"gdpr_acceptance": "Yes",
"sale_or_letting": "Letting"
"gdpr_acceptance": "Yes"
}]
},
"tenant_code": {
@ -170,8 +150,7 @@
}
},
"depends_on": [{
"gdpr_acceptance": "Yes",
"sale_or_letting": "Letting"
"gdpr_acceptance": "Yes"
}]
},
"property_reference": {
@ -187,39 +166,6 @@
}
},
"depends_on": [{ "gdpr_acceptance": "Yes" }]
},
"sale_completion_date": {
"header": "",
"description": "",
"questions": {
"sale_completion_date": {
"check_answer_label": "Sale completion date",
"header": "What is the sale completion date?",
"hint_text": "For example, 27 3 2021.",
"type": "date"
}
},
"depends_on": [{
"gdpr_acceptance": "Yes",
"sale_or_letting": "Sale"
}]
},
"purchaser_code": {
"header": "",
"description": "",
"questions": {
"purchaser_code": {
"check_answer_label": "Purchaser code",
"header": "What is the purchaser code?",
"hint_text": "",
"type": "text",
"width": 10
}
},
"depends_on": [{
"gdpr_acceptance": "Yes",
"sale_or_letting": "Sale"
}]
}
}
}

2
spec/factories/case_log.rb

@ -4,7 +4,6 @@ FactoryBot.define do
managing_organisation { FactoryBot.create(:organisation) }
trait :about_completed do
gdpr_acceptance { "Yes" }
sale_or_letting { "Letting" }
tenant_same_property_renewal { "No" }
needstype { 1 }
rent_type { 1 }
@ -117,7 +116,6 @@ FactoryBot.define do
gdpr_declined { "No" }
property_owner_organisation { "Test" }
property_manager_organisation { "Test" }
sale_or_letting { "Letting" }
tenant_same_property_renewal { 1 }
rent_type { 1 }
intermediate_rent_product_name { 2 }

1
spec/fixtures/complete_case_log.json vendored

@ -126,7 +126,6 @@
"gdpr_declined": "",
"property_owner_organisation": "",
"property_manager_organisation": "",
"sale_or_letting": "",
"rent_type": "Social Rent",
"intermediate_rent_product_name": "",
"needstype": "General needs",

56
spec/fixtures/forms/2022_2023.json vendored

@ -31,23 +31,6 @@
},
"depends_on": [{ "gdpr_acceptance": "No" }]
},
"sale_or_letting": {
"header": "",
"description": "",
"questions": {
"sale_or_letting": {
"check_answer_label": "Letting or sale",
"header": "Is this a letting or sale?",
"hint_text": "",
"type": "radio",
"answer_options": {
"1": "Letting",
"0": "Sale"
}
}
},
"depends_on": [{ "gdpr_acceptance": "Yes" }]
},
"tenant_same_property_renewal": {
"header": "",
"description": "",
@ -63,7 +46,9 @@
}
}
},
"depends_on": [{ "gdpr_acceptance": "Yes", "sale_or_letting": "Letting" }]
"depends_on": [{
"gdpr_acceptance": "Yes"
}]
},
"startdate": {
"header": "",
@ -76,7 +61,9 @@
"type": "date"
}
},
"depends_on": [{ "gdpr_acceptance": "Yes", "sale_or_letting": "Letting" }]
"depends_on": [{
"gdpr_acceptance": "Yes"
}]
},
"about_this_letting": {
"header": "Tell us about this letting",
@ -115,34 +102,9 @@
}
}
},
"depends_on": [{ "gdpr_acceptance": "Yes", "sale_or_letting": "Letting" }]
},
"sale_completion_date": {
"header": "",
"description": "",
"questions": {
"sale_completion_date": {
"check_answer_label": "Sale completion date",
"header": "What is the sale completion date?",
"hint_text": "For example, 27 3 2007",
"type": "date"
}
},
"depends_on": [{ "gdpr_acceptance": "Yes", "sale_or_letting": "Sale" }]
},
"purchaser_code": {
"header": "",
"description": "",
"questions": {
"purchaser_code": {
"check_answer_label": "Purchaser code",
"header": "What is the purchaser code?",
"hint_text": "",
"type": "text",
"width": 10
}
},
"depends_on": [{ "gdpr_acceptance": "Yes", "sale_or_letting": "Sale" }]
"depends_on": [{
"gdpr_acceptance": "Yes"
}]
}
}
}

Loading…
Cancel
Save