diff --git a/app/controllers/organisations_controller.rb b/app/controllers/organisations_controller.rb index cce0c60fd..c21827198 100644 --- a/app/controllers/organisations_controller.rb +++ b/app/controllers/organisations_controller.rb @@ -200,6 +200,10 @@ class OrganisationsController < ApplicationController redirect_to details_organisation_path(@organisation) end + def changes + render "schemes/changes" + end + private def filter_type diff --git a/app/controllers/schemes_controller.rb b/app/controllers/schemes_controller.rb index 44341b48f..2c425bb58 100644 --- a/app/controllers/schemes_controller.rb +++ b/app/controllers/schemes_controller.rb @@ -3,7 +3,7 @@ class SchemesController < ApplicationController include Modules::SearchFilter before_action :authenticate_user! - before_action :find_resource, except: %i[index create new] + before_action :find_resource, except: %i[index create new changes] before_action :redirect_if_scheme_confirmed, only: %i[primary_client_group confirm_secondary_client_group secondary_client_group support details] before_action :authorize_user before_action :session_filters, if: :current_user, only: %i[index] @@ -201,6 +201,10 @@ class SchemesController < ApplicationController render "schemes/edit_name" end + def changes + render "schemes/changes" + end + private def authorize_user diff --git a/app/models/form/lettings/pages/scheme.rb b/app/models/form/lettings/pages/scheme.rb index 9ac87a756..06bb6eb9c 100644 --- a/app/models/form/lettings/pages/scheme.rb +++ b/app/models/form/lettings/pages/scheme.rb @@ -6,6 +6,7 @@ class Form::Lettings::Pages::Scheme < ::Form::Page "needstype" => 2, }, ] + @header = "Scheme" @next_unresolved_page_id = "location" end diff --git a/app/models/form/lettings/questions/scheme_id.rb b/app/models/form/lettings/questions/scheme_id.rb index 6eb5eeb66..dcb951374 100644 --- a/app/models/form/lettings/questions/scheme_id.rb +++ b/app/models/form/lettings/questions/scheme_id.rb @@ -6,6 +6,7 @@ class Form::Lettings::Questions::SchemeId < ::Form::Question @hint_text = "Enter scheme name or postcode" @type = "select" @answer_options = answer_options + @top_guidance_partial = "finding_scheme" @bottom_guidance_partial = "scheme_selection" @question_number = 9 @inferred_answers = { diff --git a/app/policies/scheme_policy.rb b/app/policies/scheme_policy.rb index 39842a160..f7035e768 100644 --- a/app/policies/scheme_policy.rb +++ b/app/policies/scheme_policy.rb @@ -30,6 +30,10 @@ class SchemePolicy user.data_coordinator? && (scheme&.owning_organisation == user.organisation) end + def changes? + true + end + %w[ show? check_answers? diff --git a/app/views/form/_select_question.html.erb b/app/views/form/_select_question.html.erb index 2af828ed4..da44ba845 100644 --- a/app/views/form/_select_question.html.erb +++ b/app/views/form/_select_question.html.erb @@ -1,7 +1,8 @@ -<%= render partial: "form/guidance/#{question.top_guidance_partial}" if question.top_guidance? %> <% selected = @log.public_send(question.id) || "" %> <% answers = question.displayed_answer_options(@log, current_user).map { |key, value| OpenStruct.new(id: key, name: value.respond_to?(:service_name) ? value.service_name : nil, resource: value) } %> +<%= render partial: "form/guidance/#{question.top_guidance_partial}" if question.top_guidance? %> + <%= f.govuk_select(question.id.to_sym, label: legend(question, page_header, conditional), "data-controller": "accessible-autocomplete", diff --git a/app/views/form/guidance/_finding_scheme.erb b/app/views/form/guidance/_finding_scheme.erb new file mode 100644 index 000000000..698019e18 --- /dev/null +++ b/app/views/form/guidance/_finding_scheme.erb @@ -0,0 +1,5 @@ +<%= govuk_details(summary_text: "Can’t find your scheme?") do %> +
If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.
+<%= govuk_link_to("View your organisation’s schemes.", schemes_path) %>
+<%= govuk_link_to("Read more about how schemes have changed", scheme_changes_path) %>
+<% end %> diff --git a/app/views/form/guidance/_scheme_selection.html.erb b/app/views/form/guidance/_scheme_selection.html.erb index c48644077..561071cc1 100644 --- a/app/views/form/guidance/_scheme_selection.html.erb +++ b/app/views/form/guidance/_scheme_selection.html.erb @@ -1,5 +1,5 @@ <% if current_user.data_provider? %>If you can’t find the supported housing service you’re looking for or not sure which to choose, contact a data coordinator at <%= current_user.organisation.name %>.
<% elsif current_user.data_coordinator? %> -or <%= govuk_link_to "create a new supported housing service", new_scheme_path %>
+<%= govuk_link_to "Create a new supported housing scheme", new_scheme_path %>
<% end %> diff --git a/app/views/schemes/changes.html.erb b/app/views/schemes/changes.html.erb new file mode 100644 index 000000000..65dd937b9 --- /dev/null +++ b/app/views/schemes/changes.html.erb @@ -0,0 +1,29 @@ +A supported housing scheme (also known as a ‘supported housing service’) provides shared or self-contained housing for a particular client group, for example younger or vulnerable people.
+ +A location is a postcode where supported housing is provided under a scheme. A scheme can have multiple locations, and a location can have multiple units at the same postcode.
+ +We have restructured the way we group supported housing scheme data.
+On old CORE, a scheme’s data was split into management group and scheme. On new CORE, the data is split into scheme and location.
+These are the main changes:
+This new structure means data coordinators only needs to fill in support details once.
+If your organisation has migrated from old CORE to new CORE, your existing schemes are on the <%= govuk_link_to("schemes page", schemes_path) %>, with the same details.
+Your migrated schemes have been restructured to match the new structure described above. Schemes with the same support details have been combined to prevent duplicates.
+All migrated schemes have new names and codes. The new scheme names were created automatically based on their support details. Some of these auto-generated names are quite long, so we recommend data coordinators rename them.
+If you upload logs in bulk, you can use either the new or old scheme codes in your template.
+You should be able to recognise a scheme migrated from old CORE by viewing its details or locations. Try searching for it by postcode.
+If you still can’t find a scheme that was migrated from old CORE, either create a new one if you know the details, or <%= govuk_link_to("contact the service desk", "https://dluhcdigital.atlassian.net/servicedesk/customer/portal/6/group/11", rel: "noreferrer noopener", target: "_blank") %> to report the problem. Only data coordinators can create and edit schemes.
+