From c53f4a770b5a43e40d0f6ffaa604ef087ec48c47 Mon Sep 17 00:00:00 2001 From: Arthur Campbell <51094020+arfacamble@users.noreply.github.com> Date: Thu, 15 Jun 2023 15:06:38 +0100 Subject: [PATCH] Remove feature toggle for schemes and locations (#1700) * remove scheme toggle * remove location toggle * minor linting complaint --- app/helpers/locations_helper.rb | 9 +- app/helpers/schemes_helper.rb | 5 +- app/services/feature_toggle.rb | 8 -- app/views/locations/index.html.erb | 148 ++++++--------------- app/views/locations/show.html.erb | 6 +- app/views/schemes/_scheme_list.html.erb | 22 +-- app/views/schemes/show.html.erb | 37 +++--- spec/features/schemes_spec.rb | 17 --- spec/helpers/schemes_helper_spec.rb | 8 -- spec/requests/locations_controller_spec.rb | 26 ---- 10 files changed, 69 insertions(+), 217 deletions(-) diff --git a/app/helpers/locations_helper.rb b/app/helpers/locations_helper.rb index 7e38ed36c..58fffd2e0 100644 --- a/app/helpers/locations_helper.rb +++ b/app/helpers/locations_helper.rb @@ -24,7 +24,7 @@ module LocationsHelper end def display_location_attributes(location) - base_attributes = [ + [ { name: "Postcode", value: location.postcode, attribute: "postcode" }, { name: "Location name", value: location.name, attribute: "name" }, { name: "Local authority", value: formatted_local_authority_timeline(location, "name"), attribute: "local_authority" }, @@ -33,13 +33,8 @@ module LocationsHelper { name: "Mobility standards", value: location.mobility_type, attribute: "mobility_standards" }, { name: "Location code", value: formatted_local_authority_timeline(location, "code"), attribute: "location_code" }, { name: "Availability", value: location_availability(location), attribute: "availability" }, + { name: "Status", value: location.status, attribute: "status" }, ] - - if FeatureToggle.location_toggle_enabled? - base_attributes.append({ name: "Status", value: location.status, attribute: "status" }) - end - - base_attributes end def display_location_attributes_for_check_answers(location) 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..2690d1e06 100644 --- a/app/services/feature_toggle.rb +++ b/app/services/feature_toggle.rb @@ -12,14 +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 - def self.bulk_upload_duplicate_log_check_enabled? !Rails.env.staging? end diff --git a/app/views/locations/index.html.erb b/app/views/locations/index.html.erb index 85ae27fed..e974d7dfb 100644 --- a/app/views/locations/index.html.erb +++ b/app/views/locations/index.html.erb @@ -10,120 +10,60 @@ <%= render partial: "organisations/headings", locals: { main: @scheme.service_name, sub: nil } %> -<% if FeatureToggle.location_toggle_enabled? %> -