natdeanlewissoftwire
12 months ago
30 changed files with 521 additions and 187 deletions
@ -0,0 +1,35 @@
|
||||
<h1 class="govuk-heading-l">Upcoming deadlines</h1> |
||||
|
||||
<% current_lettings_form = FormHandler.instance.in_crossover_period? ? FormHandler.instance.previous_lettings_form : FormHandler.instance.current_lettings_form %> |
||||
<% formatted_deadline = "#{current_lettings_form.submission_deadline.strftime('%A')} #{current_lettings_form.submission_deadline.to_formatted_s(:govuk_date)}" %> |
||||
<% if FormHandler.instance.in_crossover_period? %> |
||||
<p class="govuk-body govuk-body-m"><strong>End of year deadline - <%= formatted_deadline %>:</strong> Deadline to submit logs for tenancies starting between <%= collection_start_date(Time.zone.now).to_formatted_s(:govuk_date) %> to <%= collection_end_date(Time.zone.now).to_formatted_s(:govuk_date) %></p> |
||||
<% end %> |
||||
|
||||
<% current_quarter = quarter_for_date(date: Time.zone.now) %> |
||||
<% if current_quarter.present? %> |
||||
<p class="govuk-body govuk-body-m"><strong><%= "#{current_quarter.quarter} - #{current_quarter.cutoff_date.strftime('%A')} #{current_quarter.cutoff_date.to_formatted_s(:govuk_date)}" %>:</strong> Quarterly cut off date for tenancies and sales starting between <%= current_quarter.quarter_start_date.to_formatted_s(:govuk_date) %> and <%= current_quarter.quarter_end_date.to_formatted_s(:govuk_date) %>.</p> |
||||
<% end %> |
||||
|
||||
<% if !FormHandler.instance.in_crossover_period? %> |
||||
<p class="govuk-body govuk-body-m">Try to complete your logs for each quarter by the cut-off date.</p> |
||||
<p class="govuk-body govuk-body-m">You can still create logs for a previous quarter after its cut-off date, as long as you complete them by the <strong>end-of-year deadline: <%= formatted_deadline %>.</strong></p> |
||||
<% end %> |
||||
|
||||
<% if FormHandler.instance.in_crossover_period? %> |
||||
<% previous_lettings_form = FormHandler.instance.previous_lettings_form %> |
||||
<p class="govuk-body govuk-body-m">Prioritise completing logs for the closing collection year. You must complete all <%= previous_lettings_form.start_date.year %> to <%= previous_lettings_form.submission_deadline.year %> logs must by the end-of-year deadline. You can still create <%= current_lettings_form.start_date.year %> to <%= current_lettings_form.submission_deadline.year %> logs for this quarter after the quarterly cut-off date.</p> |
||||
<% end %> |
||||
|
||||
<%= govuk_details(summary_text: "Quarterly cut-off dates for 2023 to 2024") do %> |
||||
<p class="govuk-body govuk-body-m">The 2023 to 2024 quarterly cut-off dates are:</p> |
||||
<ul class="govuk-list govuk-list--bullet"> |
||||
<li class="govuk-!-padding-bottom-4"><strong>Q1 - Friday 14 July 2023:</strong> Quarterly cut-off date for tenancies and sales starting between 1 April 2023 and 30 June 2023.</li> |
||||
<li class="govuk-!-padding-bottom-4"><strong>Q2 - Friday 13 October 2023:</strong> Quarterly cut-off date for tenancies and sales starting between 1 July 2023 and 30 September 2023.</li> |
||||
<li class="govuk-!-padding-bottom-4"><strong>Q3 - Friday 12 January 2024:</strong> Quarterly cut-off date for tenancies and sales starting between 1 October 2023 and 31 December 2023.</li> |
||||
<li class="govuk-!-padding-bottom-4"><strong>End of year deadline - Friday 7 June 2024:</strong> Deadline for tenancies and sales starting between 1 January 2024 and 31 March 2024, plus any late submissions for the 2023 to 2024 collection year.</li> |
||||
</ul> |
||||
<p class="govuk-body govuk-body-m">It is important that you meet these cut-off dates because we submit data to the Office for National Statistics quarterly, helping them create essential inflation statistics.</p> |
||||
<p class="govuk-body govuk-body-m">Meeting these cut-off dates also gives you more accurate data for your own analysis, and reduces the burden at the end of the year.</p> |
||||
<p class="govuk-body govuk-body-m">If you are not able to meet these quarterly dates, submit your logs as soon as you can so that they can be included in the annual data.</p> |
||||
<% end %> |
@ -1,94 +1,59 @@
|
||||
<div class="app-card"> |
||||
<% if current_user %> |
||||
<h1 class="govuk-heading-l">Collection resources</h1> |
||||
<p class="govuk-body"><strong><%= govuk_link_to "Guidance for submitting social housing lettings and sales data (CORE)", guidance_path %></strong></p> |
||||
<% else %> |
||||
<h2 class="govuk-heading-m">Collection resources</h2> |
||||
<p class="govuk-body-s">For lettings starting during 1 April 2023 to 31 March 2024 and sales completing during the same period, use the 2023/24 forms.</p> |
||||
|
||||
<% end %> |
||||
<p class="govuk-body">Use the 2023 to 2024 forms for lettings that start and sales that complete between 1 April 2023 and 31 March 2024.</p> |
||||
<%= govuk_tabs(title: "Collection resources") do |c| %> |
||||
<% if FormHandler.instance.lettings_form_for_start_year(2023) && FormHandler.instance.lettings_form_for_start_year(2023).edit_end_date > Time.zone.today %> |
||||
<h3 class="govuk-heading-s">Lettings 2023/24</h3> |
||||
<%= render DocumentListComponent.new(items: [ |
||||
<% c.with_tab(label: "Lettings 2023/24") do %> |
||||
<%= render DocumentListComponent.new(items: [ |
||||
{ |
||||
name: "Lettings log for tenants (2023/24)", |
||||
name: "Download the lettings log for tenants (2023 to 2024)", |
||||
href: download_23_24_lettings_form_path, |
||||
metadata: file_type_size_and_pages("2023_24_lettings_paper_form.pdf", number_of_pages: 8), |
||||
}, |
||||
{ |
||||
name: "Lettings bulk upload template (2023/24) – New question ordering", |
||||
name: "Download the lettings bulk upload template (2023 to 2024) – New question ordering", |
||||
href: download_23_24_lettings_bulk_upload_template_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-lettings-template-2023-24.xlsx"), |
||||
}, |
||||
{ |
||||
name: "Lettings bulk upload template (2023/24)", |
||||
name: "Download the lettings bulk upload template (2023 to 2024) – Legacy version", |
||||
href: download_23_24_lettings_bulk_upload_legacy_template_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-lettings-legacy-template-2023-24.xlsx"), |
||||
}, |
||||
{ |
||||
name: "Lettings bulk upload specification (2023/24)", |
||||
name: "Download the lettings bulk upload specification (2023 to 2024)", |
||||
href: download_23_24_lettings_bulk_upload_specification_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-lettings-specification-2023-24.xlsx"), |
||||
}, |
||||
]) %> |
||||
|
||||
<h3 class="govuk-heading-s">Sales 2023/24</h3> |
||||
<%= render DocumentListComponent.new(items: [ |
||||
{ |
||||
name: "Sales log for buyers (2023/24)", |
||||
href: download_23_24_sales_form_path, |
||||
metadata: file_type_size_and_pages("2023_24_sales_paper_form.pdf", number_of_pages: 8), |
||||
}, |
||||
{ |
||||
name: "Sales bulk upload template (2023/24) – New question ordering", |
||||
href: download_23_24_sales_bulk_upload_template_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-sales-template-2023-24.xlsx"), |
||||
}, |
||||
{ |
||||
name: "Sales bulk upload template (2023/24)", |
||||
href: download_23_24_sales_bulk_upload_legacy_template_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-sales-legacy-template-2023-24.xlsx"), |
||||
}, |
||||
{ |
||||
name: "Sales bulk upload specification (2023/24)", |
||||
href: download_23_24_sales_bulk_upload_specification_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-sales-specification-2023-24.xlsx"), |
||||
}, |
||||
]) %> |
||||
<% end %> |
||||
|
||||
<% if FormHandler.instance.lettings_form_for_start_year(2022) && FormHandler.instance.lettings_form_for_start_year(2022).edit_end_date > Time.zone.today %> |
||||
<h3 class="govuk-heading-s">Lettings 2022/23</h3> |
||||
<%= render DocumentListComponent.new(items: [ |
||||
{ |
||||
name: "Lettings log for tenants (2022/23)", |
||||
href: download_22_23_lettings_form_path, |
||||
metadata: file_type_size_and_pages("2022_23_lettings_paper_form.pdf", number_of_pages: 4), |
||||
}, |
||||
{ |
||||
name: "Lettings bulk upload template (2022/23)", |
||||
href: download_22_23_lettings_bulk_upload_template_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-lettings-template-2022-23.xlsx"), |
||||
}, |
||||
{ |
||||
name: "Lettings bulk upload specification (2022/23)", |
||||
href: download_22_23_lettings_bulk_upload_specification_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-lettings-specification-2022-23.xlsx"), |
||||
}, |
||||
]) %> |
||||
|
||||
<h3 class="govuk-heading-s">Sales 2022/23</h3> |
||||
<%= render DocumentListComponent.new(items: [ |
||||
{ |
||||
name: "Sales log for buyers (2022/23)", |
||||
href: download_22_23_sales_form_path, |
||||
metadata: file_type_size_and_pages("2022_23_sales_paper_form.pdf", number_of_pages: 5), |
||||
}, |
||||
{ |
||||
name: "Sales bulk upload template (2022/23)", |
||||
href: download_22_23_sales_bulk_upload_template_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-sales-template-2022-23.xlsx"), |
||||
}, |
||||
{ |
||||
name: "Sales bulk upload specification (2022/23)", |
||||
href: download_22_23_sales_bulk_upload_specification_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-sales-template-2022-23.xlsx"), |
||||
}, |
||||
]) %> |
||||
]) %> |
||||
<% end %> |
||||
<% c.with_tab(label: "Sales 2023/24") do %> |
||||
<%= render DocumentListComponent.new(items: [ |
||||
{ |
||||
name: "Download the sales log for buyers (2023 to 2024)", |
||||
href: download_23_24_sales_form_path, |
||||
metadata: file_type_size_and_pages("2023_24_sales_paper_form.pdf", number_of_pages: 8), |
||||
}, |
||||
{ |
||||
name: "Download the sales bulk upload template (2023 to 2024) – New question ordering", |
||||
href: download_23_24_sales_bulk_upload_template_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-sales-template-2023-24.xlsx"), |
||||
}, |
||||
{ |
||||
name: "Download the sales bulk upload template (2023 to 2024) – Legacy version", |
||||
href: download_23_24_sales_bulk_upload_legacy_template_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-sales-legacy-template-2023-24.xlsx"), |
||||
}, |
||||
{ |
||||
name: "Download the sales bulk upload specification (2023 to 2024)", |
||||
href: download_23_24_sales_bulk_upload_specification_path, |
||||
metadata: file_type_size_and_pages("bulk-upload-sales-specification-2023-24.xlsx"), |
||||
}, |
||||
]) %> |
||||
<% end %> |
||||
<% end %> |
||||
</div> |
||||
<% end %> |
||||
|
@ -0,0 +1,68 @@
|
||||
<h1 class="govuk-heading-l govuk-!-width-two-thirds"> |
||||
Guidance for submitting social housing lettings and sales data |
||||
</h1> |
||||
|
||||
<div class="govuk-grid-row"> |
||||
<div class="govuk-grid-column-two-thirds-from-desktop"> |
||||
<p class="govuk-body">This page includes details of when a CORE log is and is not required, what to do if a tenant or buyer is reluctant to answer questions in a log, and other information about submitting logs using CORE.</p> |
||||
<%= govuk_accordion do |accordion| %> |
||||
<%= accordion.with_section(heading_text: "How to create logs", expanded: true) do %> |
||||
<p class="govuk-body">There are 2 ways to create logs on CORE.</p> |
||||
<p class="govuk-body">You can create logs one at a time by answering questions using the online form. Click the “Create a new log” button on the logs page to create logs this way.</p> |
||||
<p class="govuk-body">You can also create many logs at once by uploading a CSV file. This might be faster than creating logs individually if your organisation has its own database and a way to export the data. Click the “Upload logs in bulk” button on the logs page to create logs this way. For more information, <%= govuk_link_to "read the full guidance on bulk upload", bulk_upload_lettings_log_path(id: "guidance", form: { year: current_collection_start_year }) %>.</p> |
||||
<p class="govuk-body">Once you have created and completed a log, there is nothing more you need to do to submit the data.</p> |
||||
<% end %> |
||||
|
||||
<%= accordion.with_section(heading_text: "What scenarios require a new log?") do %> |
||||
<p class="govuk-body">For general needs, you should complete a log for each new tenancy intended to last 2 years or more if it is social rent or affordable rent, or of any length if it is intermediate rent.</p> |
||||
<p class="govuk-body">For supported housing, you should complete a log for each new letting of any length.</p> |
||||
<p class="govuk-body">If a new tenancy agreement is signed, create a new log.</p> |
||||
<% end %> |
||||
|
||||
<%= accordion.with_section(heading_text: "Types of lettings you should create logs for") do %> |
||||
<p class="govuk-body">You’ll need to create a log for:</p> |
||||
<ul class="govuk-list govuk-list--bullet"> |
||||
<li>Tenants in general needs housing allocated a new letting. This includes tenants moving into the social rented sector from outside, existing social tenants moving between properties or landlords, and existing social tenants renewing lettings in the same property. If fixed-term and social or affordable rent, only include tenancies of 2 years or more.</li> |
||||
<li>Tenants in supported housing (social housing, sheltered accommodation and care homes) allocated a new letting. This includes tenants moving into the social rented sector from outside, existing social tenants moving between properties or landlords, and existing social tenants renewing lettings in the same property. All supported housing tenancies should be reported regardless of length.</li> |
||||
<li>Starter tenancies provided by local authorities (LAs) and lettings with an introductory period provided by private registered providers (PRPs) should be completed in CORE at the beginning of the starter or introductory period. The tenancy type and length entered should be based on the tenancy the tenant will roll onto once the starter or introductory period has been completed. You do not need to submit another CORE log once the period has been completed.</li> |
||||
<li>Room moves within a shared housing unit that result in a different property type or support needs – this is classed as an internal transfer of an existing social tenant to another property.</li> |
||||
<li>Existing tenants who are issued with a new tenancy agreement when stock is acquired, transferred or permanently decanted.</li> |
||||
<li>Tenants under the Rough Sleepers Initiative or Rough Sleeping Accommodation Programme, where accommodation is permanent.</li> |
||||
<li>Households previously provided with temporary accommodation to meet a duty under the homelessness legislation who are allocated a tenancy as a settled home ending the duty (this may be the same property).</li> |
||||
<li>Refugees and asylum seekers who have been granted indefinite leave to remain, humanitarian protection or exceptional leave to remain.</li> |
||||
<li>Affordable Rent lettings – where up to 80% of market rent can be charged and a new supply agreement is signed.</li> |
||||
<li>London Affordable Rent lettings – a type of Affordable Rent available in London through the Greater London Authority (GLA).</li> |
||||
<li>Intermediate Rent lettings – where the rent must not exceed 80% of the current market rate (including any service charges).</li> |
||||
<li>Rent to Buy lettings – where a discount of up to 20% market rent is charged for a single rental period for a minimum of 5 years. After that period, the tenant is offered the chance to purchase the property (either shared ownership or outright) at full market value.</li> |
||||
<li>London Living Rent lettings – a type of Intermediate Rent available in London through the Greater London Authority (GLA).</li> |
||||
</ul> |
||||
<% end %> |
||||
|
||||
<%= accordion.with_section(heading_text: "Types of lettings you should not create logs for") do %> |
||||
<p class="govuk-body">You don’t need to create a log for:</p> |
||||
<ul class="govuk-list govuk-list--bullet"> |
||||
<li>Temporary general needs housing with a fixed period of less than 2 years if they are social or affordable rent. (Temporary lettings for intermediate rent and supported housing should be recorded).</li> |
||||
<li>Starter tenancies or lettings with an introductory period that roll onto or convert into the main tenancy. The CORE log should be completed at the beginning of this period.</li> |
||||
<li>Changes from sole to joint or joint to sole tenancies, where the number of people in the household has not changed.</li> |
||||
<li>Moves within a shared housing unit resulting in the same support needs or property type, even if a new tenancy or licence agreement is issued.</li> |
||||
<li>Lettings where no new tenancy agreement is signed.</li> |
||||
<li>Where stock is acquired, transferred or permanently decanted and the existing tenants are not issued with a new tenancy agreement.</li> |
||||
<li>Mutual exchanges including lettings where registered provider tenants have exchanged homes, for example through the national HOMESWAP system.</li> |
||||
<li>Successions and assignments.</li> |
||||
<li>Demotion of a secure or assured tenancy, and any subsequent conversion of the demoted tenancy to a secure or assured tenancy.</li> |
||||
<li>Lettings made to asylum seekers who are awaiting a decision on their applications for asylum under the Immigration and Asylum Act 1999.</li> |
||||
<li>Non-social lettings, including market-rented properties, employer-provided housing where the employer provides financial support, homes for staff of social landlords linked to employment, homes social landlords manage for organisations who are not social landlords, homes social landlords own but lease in entirety to organisations who are not social landlords, and freehold housing with variable charges for services and communal facilities.</li> |
||||
</ul> |
||||
<% end %> |
||||
|
||||
<%= accordion.with_section(heading_text: "What if someone is reluctant to answer any questions?") do %> |
||||
<p class="govuk-body">If a tenant or buyer is reluctant to answer questions as part of a log, you should explain that:</p> |
||||
<ul class="govuk-list govuk-list--bullet"> |
||||
<li>all information they provide is anonymous and will not affect their housing, benefits or other services they receive.</li> |
||||
<li>the data they provide is vital in helping to build a complete picture of social housing in England and is used to inform social housing policy.</li> |
||||
</ul> |
||||
<p class="govuk-body">If a tenant or buyer is still unwilling or unable to answer questions, select the ‘Don’t know’ or ‘Tenant/person prefers not to say’ options.</p> |
||||
<% end %> |
||||
<% end %> |
||||
</div> |
||||
</div> |
@ -0,0 +1,85 @@
|
||||
require "rails_helper" |
||||
|
||||
RSpec.describe StartController, type: :request do |
||||
let(:user) { create(:user) } |
||||
let(:headers) { { "Accept" => "text/html" } } |
||||
let(:page) { Capybara::Node::Simple.new(response.body) } |
||||
let(:notify_client) { instance_double(Notifications::Client) } |
||||
let(:devise_notify_mailer) { DeviseNotifyMailer.new } |
||||
|
||||
before do |
||||
allow(DeviseNotifyMailer).to receive(:new).and_return(devise_notify_mailer) |
||||
allow(devise_notify_mailer).to receive(:notify_client).and_return(notify_client) |
||||
allow(notify_client).to receive(:send_email).and_return(true) |
||||
end |
||||
|
||||
describe "GET" do |
||||
context "when the user is not signed in" do |
||||
it "routes user to the start page" do |
||||
get "/", headers: headers, params: {} |
||||
expect(path).to eq("/") |
||||
expect(page).to have_content("Start now") |
||||
end |
||||
end |
||||
|
||||
context "when the user is signed in" do |
||||
before do |
||||
sign_in user |
||||
end |
||||
|
||||
it "routes user to the home page" do |
||||
get "/", headers:, params: {} |
||||
expect(page).to have_content("Welcome back") |
||||
end |
||||
|
||||
context "and 2023 collection window is open for editing" do |
||||
before do |
||||
allow(Time).to receive(:now).and_return(Time.zone.local(2024, 1, 1)) |
||||
end |
||||
|
||||
it "displays correct resources for 2022/23 and 2023/24 collection years" do |
||||
get "/", headers: headers, params: {} |
||||
expect(page).to have_content("Lettings 2023/24") |
||||
expect(page).to have_content("Sales 2023/24") |
||||
end |
||||
end |
||||
|
||||
context "and 2023 collection window is closed for editing" do |
||||
before do |
||||
allow(Time).to receive(:now).and_return(Time.zone.local(2025, 1, 1)) |
||||
end |
||||
|
||||
it "displays correct resources for 2022/23 and 2023/24 collection years" do |
||||
get "/", headers: headers, params: {} |
||||
expect(page).not_to have_content("Lettings 2023/24") |
||||
expect(page).not_to have_content("Sales 2023/24") |
||||
end |
||||
end |
||||
|
||||
it "shows guidance link" do |
||||
get "/", headers: headers, params: {} |
||||
expect(page).to have_content("Guidance for submitting social housing lettings and sales data (CORE)") |
||||
end |
||||
end |
||||
end |
||||
|
||||
describe "guidance page" do |
||||
context "when the user is not signed in" do |
||||
it "routes user to the guidance page" do |
||||
get "/guidance", headers:, params: {} |
||||
expect(page).to have_content("Guidance for submitting social housing lettings and sales data") |
||||
end |
||||
end |
||||
|
||||
context "when the user is signed in" do |
||||
before do |
||||
sign_in user |
||||
end |
||||
|
||||
it "routes user to the guidance page" do |
||||
get "/guidance", headers:, params: {} |
||||
expect(page).to have_content("Guidance for submitting social housing lettings and sales data") |
||||
end |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue