Browse Source

Change the dates for testing

CLDC-2460-review-app
Kat 2 years ago
parent
commit
28c2aa7c57
  1. 8
      app/models/form.rb

8
app/models/form.rb

@ -6,7 +6,7 @@ class Form
def initialize(form_path, start_year = "", sections_in_form = [], type = "lettings")
if sales_or_start_year_after_2022?(type, start_year)
@start_date = Time.zone.local(start_year, 4, 1)
@new_logs_end_date = Time.zone.local(start_year + 1, 12, 31) # this is to be manually updated each year when we want to stop users from creating new logs
@new_logs_end_date = Time.zone.local(start_year + 1, 6, 15) # this is to be manually updated each year when we want to stop users from creating new logs
@submission_deadline = if start_year && start_year.to_i > 2022
Time.zone.local(start_year + 1, 6, 7)
else
@ -26,7 +26,7 @@ class Form
"sections" => sections,
}
@unresolved_log_redirect_page_id = "tenancy_start_date" if type == "lettings"
@edit_end_date = Time.zone.local(start_year + 1, 12, 31) # this is to be manually updated each year when we want to stop users from editing logs
@edit_end_date = Time.zone.local(start_year + 1, 6, 15) # this is to be manually updated each year when we want to stop users from editing logs
else
raise "No form definition file exists for given year".freeze unless File.exist?(form_path)
@ -39,9 +39,9 @@ class Form
@pages = subsections.flat_map(&:pages)
@questions = pages.flat_map(&:questions)
@start_date = Time.iso8601(form_definition["start_date"])
@new_logs_end_date = Time.zone.local(@start_date.year + 1, 12, 31)
@new_logs_end_date = Time.zone.local(@start_date.year + 1, 6, 15)
@submission_deadline = Time.zone.local(@start_date.year + 1, 6, 9)
@edit_end_date = Time.zone.local(@start_date.year + 1, 12, 31)
@edit_end_date = Time.zone.local(@start_date.year + 1, 6, 15)
@unresolved_log_redirect_page_id = form_definition["unresolved_log_redirect_page_id"]
end
@name = "#{start_date.year}_#{new_logs_end_date.year}_#{type}"

Loading…
Cancel
Save