|
|
|
@ -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 |
|
|
|
@ -39,7 +39,7 @@ 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) |
|
|
|
|
@unresolved_log_redirect_page_id = form_definition["unresolved_log_redirect_page_id"] |
|
|
|
|