@ -6,20 +6,12 @@ class Form::Sales::Questions::SharedOwnershipType < ::Form::Question
@header = " What is the type of shared ownership sale? "
@hint_text = " A shared ownership sale is when the purchaser buys up to 75% of the property value and pays rent to the Private Registered Provider (PRP) on the remaining portion "
@type = " radio "
@answer_options = form . start_date . year > = 2023 ? ANSWER_OPTIONS_23_24 : ANSWER_OPTIONS
@answer_options = answer_options
end
ANSWER_OPTIONS = {
" 2 " = > { " value " = > " Shared Ownership " } ,
" 24 " = > { " value " = > " Old Persons Shared Ownership " } ,
" 18 " = > { " value " = > " Social HomeBuy (shared ownership purchase) " } ,
" 16 " = > { " value " = > " Home Ownership for people with Long Term Disabilities (HOLD) " } ,
" 28 " = > { " value " = > " Rent to Buy - Shared Ownership " } ,
" 31 " = > { " value " = > " Right to Shared Ownership " } ,
" 30 " = > { " value " = > " Shared Ownership - 2021 model lease " } ,
} . freeze
ANSWER_OPTIONS_23_24 = {
def answer_options
if form . start_date . year > = 2023
{
" 2 " = > { " value " = > " Shared Ownership (old model lease) " } ,
" 30 " = > { " value " = > " Shared Ownership (new model lease) " } ,
" 18 " = > { " value " = > " Social HomeBuy — shared ownership purchase " } ,
@ -28,5 +20,17 @@ class Form::Sales::Questions::SharedOwnershipType < ::Form::Question
" 28 " = > { " value " = > " Rent to Buy — Shared Ownership " } ,
" 31 " = > { " value " = > " Right to Shared Ownership (RtSO) " } ,
" 32 " = > { " value " = > " London Living Rent — Shared Ownership " } ,
} . freeze
}
else
{
" 2 " = > { " value " = > " Shared Ownership " } ,
" 24 " = > { " value " = > " Old Persons Shared Ownership " } ,
" 18 " = > { " value " = > " Social HomeBuy (shared ownership purchase) " } ,
" 16 " = > { " value " = > " Home Ownership for people with Long Term Disabilities (HOLD) " } ,
" 28 " = > { " value " = > " Rent to Buy - Shared Ownership " } ,
" 31 " = > { " value " = > " Right to Shared Ownership " } ,
" 30 " = > { " value " = > " Shared Ownership - 2021 model lease " } ,
}
end
end
end