7 changed files with 60 additions and 1 deletions
@ -0,0 +1,20 @@ |
|||||||
|
class Form::Sales::Pages::Buyer2IncomeValueCheck < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection) |
||||||
|
super |
||||||
|
@header = "" |
||||||
|
@description = "" |
||||||
|
@subsection = subsection |
||||||
|
@depends_on = [ |
||||||
|
{ |
||||||
|
"income2_under_soft_min?" => true, |
||||||
|
}, |
||||||
|
] |
||||||
|
@informative_text = {} |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [ |
||||||
|
Form::Sales::Questions::Buyer2IncomeValueCheck.new(nil, nil, self) |
||||||
|
] |
||||||
|
end |
||||||
|
end |
||||||
@ -0,0 +1,25 @@ |
|||||||
|
class Form::Sales::Questions::Buyer2IncomeValueCheck < ::Form::Question |
||||||
|
def initialize(id, hsh, page) |
||||||
|
super |
||||||
|
@id = "income2_value_check" |
||||||
|
@check_answer_label = "Income confirmation" |
||||||
|
@header = "Are you sure this income is correct?" |
||||||
|
@type = "interruption_screen" |
||||||
|
@answer_options = { |
||||||
|
"0" => { "value" => "Yes" }, |
||||||
|
"1" => { "value"=> "No" }, |
||||||
|
} |
||||||
|
@hidden_in_check_answers = { |
||||||
|
"depends_on" => [ |
||||||
|
{ |
||||||
|
"income2_value_check" => 0, |
||||||
|
}, |
||||||
|
{ |
||||||
|
"income2_value_check" => 1, |
||||||
|
}, |
||||||
|
], |
||||||
|
} |
||||||
|
@check_answers_card_number = 1 |
||||||
|
@page = page |
||||||
|
end |
||||||
|
end |
||||||
@ -0,0 +1,5 @@ |
|||||||
|
class AddIncome2ValueCheck < ActiveRecord::Migration[7.0] |
||||||
|
def change |
||||||
|
add_column :sales_logs, :income2_value_check, :integer |
||||||
|
end |
||||||
|
end |
||||||
Loading…
Reference in new issue