Browse Source

CLDC-2372 Remove sales bulk upload feature flag (#1693)

* feat: remove sales bu feature flag

* refactor: lint
pull/1676/head
natdeanlewissoftwire 2 years ago committed by GitHub
parent
commit
9d98c391a5
  1. 10
      app/components/create_log_actions_component.rb
  2. 4
      app/services/feature_toggle.rb

10
app/components/create_log_actions_component.rb

@ -38,17 +38,19 @@ class CreateLogActionsComponent < ViewComponent::Base
end end
def upload_button_copy def upload_button_copy
if log_type == "lettings" case log_type
when "lettings"
"Upload lettings logs in bulk" "Upload lettings logs in bulk"
elsif FeatureToggle.bulk_upload_sales_logs? && log_type == "sales" when "sales"
"Upload sales logs in bulk" "Upload sales logs in bulk"
end end
end end
def upload_button_href def upload_button_href
if log_type == "lettings" case log_type
when "lettings"
bulk_upload_lettings_log_path(id: "start") bulk_upload_lettings_log_path(id: "start")
elsif FeatureToggle.bulk_upload_sales_logs? && log_type == "sales" when "sales"
bulk_upload_sales_log_path(id: "start") bulk_upload_sales_log_path(id: "start")
end end
end end

4
app/services/feature_toggle.rb

@ -20,10 +20,6 @@ class FeatureToggle
true true
end end
def self.bulk_upload_sales_logs?
!Rails.env.production?
end
def self.bulk_upload_duplicate_log_check_enabled? def self.bulk_upload_duplicate_log_check_enabled?
!Rails.env.staging? !Rails.env.staging?
end end

Loading…
Cancel
Save