6 changed files with 49 additions and 2 deletions
@ -0,0 +1,14 @@
|
||||
class Form::Sales::Pages::LivingBeforePurchase < ::Form::Page |
||||
def initialize(id, hsh, subsection) |
||||
super |
||||
@header = "" |
||||
@description = "" |
||||
@subsection = subsection |
||||
end |
||||
|
||||
def questions |
||||
@questions ||= [ |
||||
Form::Sales::Questions::LivingBeforePurchase.new(nil, nil, self), |
||||
] |
||||
end |
||||
end |
||||
@ -0,0 +1,16 @@
|
||||
class Form::Sales::Questions::LivingBeforePurchase < ::Form::Question |
||||
def initialize(id, hsh, page) |
||||
super |
||||
@id = "proplen" |
||||
@check_answer_label = "Number of years buyers living in the property before purchase" |
||||
@header = "How long did the buyer(s) live in the property before purchase?" |
||||
@hint_text = "You should round this up to the nearest year. If the buyers haven't been living in the property, enter '0'" |
||||
@type = "numeric" |
||||
@page = page |
||||
@min = 0 |
||||
@max = 80 |
||||
@step = 1 |
||||
@width = 5 |
||||
@suffix = " years" |
||||
end |
||||
end |
||||
@ -0,0 +1,7 @@
|
||||
class AddProplenToSales < ActiveRecord::Migration[7.0] |
||||
def change |
||||
change_table :sales_logs, bulk: true do |t| |
||||
t.column :proplen, :integer |
||||
end |
||||
end |
||||
end |
||||
Loading…
Reference in new issue