348 changed files with 3044 additions and 1598 deletions
@ -1,24 +0,0 @@ |
|||||||
class Form::Lettings::Pages::MaxRentValueCheck < ::Form::Page |
|
||||||
def initialize(id, hsh, subsection, check_answers_card_number: nil) |
|
||||||
super(id, hsh, subsection) |
|
||||||
@depends_on = [{ "rent_in_soft_max_range?" => true }] |
|
||||||
@title_text = { |
|
||||||
"translation" => "soft_validations.rent.outside_range_title", |
|
||||||
"arguments" => [{ |
|
||||||
"key" => "brent", |
|
||||||
"label" => true, |
|
||||||
"i18n_template" => "brent", |
|
||||||
}], |
|
||||||
} |
|
||||||
@informative_text = I18n.t("soft_validations.rent.informative_text", higher_or_lower: "higher") |
|
||||||
@check_answers_card_number = check_answers_card_number |
|
||||||
end |
|
||||||
|
|
||||||
def questions |
|
||||||
@questions ||= [Form::Lettings::Questions::MaxRentValueCheck.new(nil, nil, self, check_answers_card_number: @check_answers_card_number)] |
|
||||||
end |
|
||||||
|
|
||||||
def interruption_screen_question_ids |
|
||||||
%w[brent period startdate uprn postcode_full la beds rent_type needstype] |
|
||||||
end |
|
||||||
end |
|
@ -1,24 +0,0 @@ |
|||||||
class Form::Lettings::Pages::MinRentValueCheck < ::Form::Page |
|
||||||
def initialize(id, hsh, subsection, check_answers_card_number: nil) |
|
||||||
super(id, hsh, subsection) |
|
||||||
@depends_on = [{ "rent_in_soft_min_range?" => true }] |
|
||||||
@title_text = { |
|
||||||
"translation" => "soft_validations.rent.outside_range_title", |
|
||||||
"arguments" => [{ |
|
||||||
"key" => "brent", |
|
||||||
"label" => true, |
|
||||||
"i18n_template" => "brent", |
|
||||||
}], |
|
||||||
} |
|
||||||
@informative_text = I18n.t("soft_validations.rent.informative_text", higher_or_lower: "lower") |
|
||||||
@check_answers_card_number = check_answers_card_number |
|
||||||
end |
|
||||||
|
|
||||||
def questions |
|
||||||
@questions ||= [Form::Lettings::Questions::MinRentValueCheck.new(nil, nil, self, check_answers_card_number: @check_answers_card_number)] |
|
||||||
end |
|
||||||
|
|
||||||
def interruption_screen_question_ids |
|
||||||
%w[brent period startdate uprn postcode_full la beds rent_type needstype] |
|
||||||
end |
|
||||||
end |
|
@ -1,14 +0,0 @@ |
|||||||
class Form::Lettings::Pages::PropertyPostcode < ::Form::Page |
|
||||||
def initialize(id, hsh, subsection) |
|
||||||
super |
|
||||||
@id = "property_postcode" |
|
||||||
@depends_on = [{ "is_general_needs?" => true }] |
|
||||||
end |
|
||||||
|
|
||||||
def questions |
|
||||||
@questions ||= [ |
|
||||||
Form::Lettings::Questions::PostcodeKnown.new(nil, nil, self), |
|
||||||
Form::Lettings::Questions::PostcodeFull.new(nil, nil, self), |
|
||||||
] |
|
||||||
end |
|
||||||
end |
|
@ -0,0 +1,35 @@ |
|||||||
|
class Form::Lettings::Pages::RentValueCheck < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection, check_answers_card_number: nil) |
||||||
|
super(id, hsh, subsection) |
||||||
|
@depends_on = [{ "rent_soft_validation_triggered?" => true }] |
||||||
|
@title_text = { |
||||||
|
"translation" => "soft_validations.rent.outside_range_title", |
||||||
|
"arguments" => [ |
||||||
|
{ |
||||||
|
"key" => "brent", |
||||||
|
"label" => true, |
||||||
|
"i18n_template" => "brent", |
||||||
|
}, |
||||||
|
], |
||||||
|
} |
||||||
|
@informative_text = { |
||||||
|
"translation" => "soft_validations.rent.informative_text", |
||||||
|
"arguments" => [ |
||||||
|
{ |
||||||
|
"key" => "rent_soft_validation_higher_or_lower_text", |
||||||
|
"label" => false, |
||||||
|
"i18n_template" => "higher_or_lower", |
||||||
|
}, |
||||||
|
], |
||||||
|
} |
||||||
|
@check_answers_card_number = check_answers_card_number |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [Form::Lettings::Questions::RentValueCheck.new(nil, nil, self, check_answers_card_number: @check_answers_card_number)] |
||||||
|
end |
||||||
|
|
||||||
|
def interruption_screen_question_ids |
||||||
|
%w[brent period startdate uprn postcode_full la beds rent_type needstype] |
||||||
|
end |
||||||
|
end |
@ -1,15 +0,0 @@ |
|||||||
class Form::Lettings::Questions::MaxRentValueCheck < ::Form::Question |
|
||||||
def initialize(id, hsh, page, check_answers_card_number:) |
|
||||||
super(id, hsh, page) |
|
||||||
@id = "rent_value_check" |
|
||||||
@check_answer_label = "Total rent confirmation" |
|
||||||
@header = "Are you sure this is correct?" |
|
||||||
@type = "interruption_screen" |
|
||||||
@hint_text = I18n.t("soft_validations.rent.hint_text", higher_or_lower: "higher") |
|
||||||
@check_answers_card_number = check_answers_card_number |
|
||||||
@answer_options = ANSWER_OPTIONS |
|
||||||
@hidden_in_check_answers = { "depends_on" => [{ "rent_value_check" => 0 }, { "rent_value_check" => 1 }] } |
|
||||||
end |
|
||||||
|
|
||||||
ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze |
|
||||||
end |
|
@ -1,15 +0,0 @@ |
|||||||
class Form::Lettings::Questions::PostcodeFull < ::Form::Question |
|
||||||
def initialize(id, hsh, page) |
|
||||||
super |
|
||||||
@id = "postcode_full" |
|
||||||
@check_answer_label = "Postcode" |
|
||||||
@header = "What is the property’s postcode?" |
|
||||||
@type = "text" |
|
||||||
@width = 5 |
|
||||||
@inferred_check_answers_value = [{ "condition" => { "postcode_known" => 0 }, "value" => "Not known" }] |
|
||||||
@check_answers_card_number = 0 |
|
||||||
@hint_text = "" |
|
||||||
@inferred_answers = { "la" => { "is_la_inferred" => true } } |
|
||||||
@disable_clearing_if_not_routed_or_dynamic_answer_options = true |
|
||||||
end |
|
||||||
end |
|
@ -1,17 +0,0 @@ |
|||||||
class Form::Lettings::Questions::PostcodeKnown < ::Form::Question |
|
||||||
def initialize(id, hsh, page) |
|
||||||
super |
|
||||||
@id = "postcode_known" |
|
||||||
@check_answer_label = "Do you know the property postcode?" |
|
||||||
@header = "Do you know the property’s postcode?" |
|
||||||
@type = "radio" |
|
||||||
@check_answers_card_number = 0 |
|
||||||
@hint_text = "" |
|
||||||
@answer_options = ANSWER_OPTIONS |
|
||||||
@disable_clearing_if_not_routed_or_dynamic_answer_options = true |
|
||||||
@conditional_for = { "postcode_full" => [1] } |
|
||||||
@hidden_in_check_answers = { "depends_on" => [{ "postcode_known" => 0 }, { "postcode_known" => 1 }] } |
|
||||||
end |
|
||||||
|
|
||||||
ANSWER_OPTIONS = { "1" => { "value" => "Yes" }, "0" => { "value" => "No" } }.freeze |
|
||||||
end |
|
@ -1,11 +1,11 @@ |
|||||||
class Form::Lettings::Questions::MinRentValueCheck < ::Form::Question |
class Form::Lettings::Questions::RentValueCheck < ::Form::Question |
||||||
def initialize(id, hsh, page, check_answers_card_number:) |
def initialize(id, hsh, page, check_answers_card_number:) |
||||||
super(id, hsh, page) |
super(id, hsh, page) |
||||||
@id = "rent_value_check" |
@id = "rent_value_check" |
||||||
@check_answer_label = "Total rent confirmation" |
@check_answer_label = "Total rent confirmation" |
||||||
@header = "Are you sure this is correct?" |
@header = "Are you sure this is correct?" |
||||||
@type = "interruption_screen" |
@type = "interruption_screen" |
||||||
@hint_text = I18n.t("soft_validations.rent.hint_text", higher_or_lower: "lower") |
@hint_text = I18n.t("soft_validations.rent.hint_text") |
||||||
@check_answers_card_number = check_answers_card_number |
@check_answers_card_number = check_answers_card_number |
||||||
@answer_options = ANSWER_OPTIONS |
@answer_options = ANSWER_OPTIONS |
||||||
@hidden_in_check_answers = { "depends_on" => [{ "rent_value_check" => 0 }, { "rent_value_check" => 1 }] } |
@hidden_in_check_answers = { "depends_on" => [{ "rent_value_check" => 0 }, { "rent_value_check" => 1 }] } |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue