5 changed files with 41 additions and 1 deletions
@ -0,0 +1,15 @@ |
|||||||
|
class Form::Sales::Pages::Buyer2LiveInProperty < ::Form::Page |
||||||
|
def initialize(id, hsh, subsection) |
||||||
|
super |
||||||
|
@id = "buy2livein" |
||||||
|
@header = "" |
||||||
|
@description = "" |
||||||
|
@subsection = subsection |
||||||
|
end |
||||||
|
|
||||||
|
def questions |
||||||
|
@questions ||= [ |
||||||
|
Form::Sales::Questions::Buyer2LiveInProperty.new(nil, nil, self), |
||||||
|
] |
||||||
|
end |
||||||
|
end |
||||||
@ -0,0 +1,16 @@ |
|||||||
|
class Form::Sales::Questions::Buyer2LiveInProperty < ::Form::Question |
||||||
|
def initialize(id, hsh, page) |
||||||
|
super |
||||||
|
@id = "buy2livein" |
||||||
|
@check_answer_label = "Will buyer 2 live in the property?" |
||||||
|
@header = "Will buyer 2 live in the property?" |
||||||
|
@type = "radio" |
||||||
|
@answer_options = ANSWER_OPTIONS |
||||||
|
@page = page |
||||||
|
end |
||||||
|
|
||||||
|
ANSWER_OPTIONS = { |
||||||
|
"1" => { "value" => "Yes" }, |
||||||
|
"2" => { "value" => "No" }, |
||||||
|
}.freeze |
||||||
|
end |
||||||
@ -0,0 +1,7 @@ |
|||||||
|
class AddBuy2liveinToSalesLog < ActiveRecord::Migration[7.0] |
||||||
|
def change |
||||||
|
change_table :sales_logs, bulk: true do |t| |
||||||
|
t.column :buy2livein, :int |
||||||
|
end |
||||||
|
end |
||||||
|
end |
||||||
Loading…
Reference in new issue