Browse Source

CLDC-699-RemoveSaleCompletionDate

pull/94/head
magicmilo 3 years ago
parent
commit
b08b8d717c
  1. 31
      config/forms/2021_2022.json
  2. 10
      db/migrate/20211116102527_change_datetime.rb
  3. 10
      db/schema.rb
  4. 3
      spec/fixtures/complete_case_log.json

31
config/forms/2021_2022.json

@ -80,9 +80,8 @@
}
},
"conditional_route_to": {
"tenant_same_property_renewal": { "sale_or_letting": "Letting" }
},
"default_next_page" : "check_answers"
"sale_completion_date": { "sale_or_letting": "Sale" }
}
},
"tenant_same_property_renewal": {
"header": "About this log",
@ -100,7 +99,7 @@
}
}
},
"tenancy_start_date": {
"startdate": {
"header": "About this log",
"description": "",
"questions": {
@ -112,8 +111,8 @@
}
}
},
"rent_type": {
"header": "About this log",
"about_this_letting": {
"header": "Tell us about this letting",
"description": "",
"questions": {
"rent_type": {
@ -150,12 +149,25 @@
}
}
},
"tenant_code": {
"header": "",
"description": "",
"questions": {
"tenant_code": {
"check_answer_label": "Tenant code",
"header": "What is the tenant code?",
"hint_text": "",
"type": "text"
}
},
"default_next_page": "check_answers"
},
"sale_completion_date": {
"header": "About this log",
"header": "Sale Completion Date",
"description": "",
"questions": {
"sale_completion_date": {
"check_answer_label": "What is the sale completion date?",
"check_answer_label": "Sale completion date",
"header": "What is the sale completion date?",
"hint_text": "For example, 27 3 2007",
"type": "date"
@ -172,7 +184,8 @@
"hint_text": "",
"type": "text"
}
}
},
"default_next_page": "check_answers"
}
}
}

10
db/migrate/20211116102527_change_datetime.rb

@ -0,0 +1,10 @@
class ChangeDatetime < ActiveRecord::Migration[6.1]
def change
change_table :case_logs, bulk: true do |t|
t.remove :sale_completion_date
t.column :sale_completion_date, :datetime
t.remove :startdate
t.column :startdate, :datetime
end
end
end

10
db/schema.rb

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_11_12_105348) do
ActiveRecord::Schema.define(version: 2021_11_16_102527) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -66,7 +66,6 @@ ActiveRecord::Schema.define(version: 2021_11_12_105348) do
t.string "accessibility_requirements"
t.string "condition_effects"
t.string "tenancy_code"
t.string "startdate"
t.integer "startertenancy"
t.integer "tenancylength"
t.integer "tenancy"
@ -122,8 +121,6 @@ ActiveRecord::Schema.define(version: 2021_11_12_105348) do
t.integer "rp_dontknow"
t.datetime "discarded_at"
t.string "tenancyother"
t.integer "override_net_income_validation"
t.string "net_income_known"
t.string "gdpr_acceptance"
t.string "gdpr_declined"
t.string "property_owner_organisation"
@ -133,8 +130,9 @@ ActiveRecord::Schema.define(version: 2021_11_12_105348) do
t.string "rent_type"
t.string "intermediate_rent_product_name"
t.string "needs_type"
t.string "sale_completion_date"
t.string "purchaser_code"
t.integer "override_net_income_validation"
t.string "net_income_known"
t.integer "reason"
t.string "propcode"
t.integer "majorrepairs"
@ -154,6 +152,8 @@ ActiveRecord::Schema.define(version: 2021_11_12_105348) do
t.integer "mrcyear"
t.integer "other_hhmemb"
t.integer "incref"
t.datetime "sale_completion_date"
t.datetime "startdate"
t.index ["discarded_at"], name: "index_case_logs_on_discarded_at"
end

3
spec/fixtures/complete_case_log.json vendored

@ -129,10 +129,9 @@
"rent_type": "",
"intermediate_rent_product_name": "",
"needs_type": "",
"sale_completion_date": "",
"sale_completion_date": "01/01/2020",
"purchaser_code": "",
"propcode": "123",
"majorrepairs": "Yes",
"postcode": "a1",
"postcod2": "w3",
"ppostc1": "w3",

Loading…
Cancel
Save