From 28c2aa7c570d277813b405e92a00537abd120e54 Mon Sep 17 00:00:00 2001 From: Kat Date: Thu, 29 Jun 2023 14:47:56 +0100 Subject: [PATCH] Change the dates for testing --- app/models/form.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/form.rb b/app/models/form.rb index 68ed95fd8..b28f7f85d 100644 --- a/app/models/form.rb +++ b/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}"