diff --git a/app/helpers/schemes_helper.rb b/app/helpers/schemes_helper.rb index 0503f88b3..50bd4efb2 100644 --- a/app/helpers/schemes_helper.rb +++ b/app/helpers/schemes_helper.rb @@ -14,12 +14,9 @@ module SchemesHelper { name: "Level of support given", value: scheme.support_type }, { name: "Intended length of stay", value: scheme.intended_stay }, { name: "Availability", value: scheme_availability(scheme) }, + { name: "Status", value: status_tag(scheme.status) }, ] - if FeatureToggle.scheme_toggle_enabled? - base_attributes.append({ name: "Status", value: status_tag(scheme.status) }) - end - if user.data_coordinator? base_attributes.delete_if { |item| item[:name] == "Housing stock owned by" } end diff --git a/app/services/feature_toggle.rb b/app/services/feature_toggle.rb index 88e1d17ef..ce1e31e01 100644 --- a/app/services/feature_toggle.rb +++ b/app/services/feature_toggle.rb @@ -12,10 +12,6 @@ class FeatureToggle Rails.env.production? || Rails.env.test? || Rails.env.staging? || Rails.env.review? end - def self.scheme_toggle_enabled? - true - end - def self.location_toggle_enabled? true end diff --git a/app/views/schemes/_scheme_list.html.erb b/app/views/schemes/_scheme_list.html.erb index 5fa712d1e..4f3b06454 100644 --- a/app/views/schemes/_scheme_list.html.erb +++ b/app/views/schemes/_scheme_list.html.erb @@ -5,20 +5,10 @@ <% end %> <%= table.head do |head| %> <%= head.row do |row| %> - <% row.cell(header: true, text: "Scheme", html_attributes: { - scope: "col", - }) %> - <% row.cell(header: true, text: "Code", html_attributes: { - scope: "col", - }) %> - <% row.cell(header: true, text: "Locations", html_attributes: { - scope: "col", - }) %> - <% if FeatureToggle.scheme_toggle_enabled? %> - <% row.cell(header: true, text: "Status", html_attributes: { - scope: "col", - }) %> - <% end %> + <% row.cell(header: true, text: "Scheme", html_attributes: { scope: "col" }) %> + <% row.cell(header: true, text: "Code", html_attributes: { scope: "col" }) %> + <% row.cell(header: true, text: "Locations", html_attributes: { scope: "col" }) %> + <% row.cell(header: true, text: "Status", html_attributes: { scope: "col" }) %> <% end %> <% end %> <% @schemes.each do |scheme| %> @@ -27,9 +17,7 @@ <% row.cell(text: simple_format(scheme_cell(scheme), { class: "govuk-!-font-weight-bold" }, wrapper_tag: "div")) %> <% row.cell(text: scheme.id_to_display) %> <% row.cell(text: scheme.locations&.count) %> - <% if FeatureToggle.scheme_toggle_enabled? %> - <% row.cell(text: status_tag(scheme.status)) %> - <% end %> + <% row.cell(text: status_tag(scheme.status)) %> <% end %> <% end %> <% end %> diff --git a/app/views/schemes/show.html.erb b/app/views/schemes/show.html.erb index 0005582e8..b6022478b 100644 --- a/app/views/schemes/show.html.erb +++ b/app/views/schemes/show.html.erb @@ -13,6 +13,7 @@
<% end %> + <%= render SubNavigationComponent.new(items: scheme_items(request.path, @scheme.id, "Locations")) %>

Scheme

@@ -34,8 +35,6 @@
<% end %> -<% if FeatureToggle.scheme_toggle_enabled? %> - <% if SchemePolicy.new(current_user, @scheme).deactivate? %> - <%= toggle_scheme_link(@scheme) %> - <% end %> +<% if SchemePolicy.new(current_user, @scheme).deactivate? %> + <%= toggle_scheme_link(@scheme) %> <% end %> diff --git a/spec/helpers/schemes_helper_spec.rb b/spec/helpers/schemes_helper_spec.rb index 09a9c9e2e..905494ac8 100644 --- a/spec/helpers/schemes_helper_spec.rb +++ b/spec/helpers/schemes_helper_spec.rb @@ -195,14 +195,6 @@ RSpec.describe SchemesHelper do expect(display_scheme_attributes(scheme, coordinator_user)).to eq(attributes) end - context "when the scheme toggle is disabled" do - it "doesn't show the scheme status" do - allow(FeatureToggle).to receive(:scheme_toggle_enabled?).and_return(false) - attributes = display_scheme_attributes(scheme, support_user).find { |x| x[:name] == "Status" } - expect(attributes).to be_nil - end - end - context "when the managing organisation is the owning organisation" do it "doesn't show the organisation providing support" do attributes = display_scheme_attributes(scheme_where_managing_organisation_is_owning_organisation, support_user).find { |x| x[:name] == "Organisation providing support" }