Browse Source

feat: replace 21/22 filter with 24/25 filter, add feature toggle so this appears everywhere but prod

pull/2216/head
natdeanlewissoftwire 2 years ago
parent
commit
52afd90a65
  1. 8
      app/helpers/filters_helper.rb
  2. 4
      app/services/feature_toggle.rb

8
app/helpers/filters_helper.rb

@ -93,8 +93,12 @@ module FiltersHelper
end
def collection_year_options
if FeatureToggle.collection_2024_2025_year_enabled?
{ "2024": "2024/25", "2023": "2023/24", "2022": "2022/23" }
else
{ "2023": "2023/24", "2022": "2022/23", "2021": "2021/22" }
end
end
def filters_applied_text(filter_type)
applied_filters_count(filter_type).zero? ? "No filters applied" : "#{pluralize(applied_filters_count(filter_type), 'filter')} applied"
@ -174,4 +178,8 @@ private
end
end
end
def year_combo(year)
"#{year}/#{year - 2000 + 1}"
end
end

4
app/services/feature_toggle.rb

@ -1,4 +1,8 @@
class FeatureToggle
def self.collection_2024_2025_year_enabled?
!Rails.env.production?
end
# Disable check on preview apps to allow for testing of future forms
def self.saledate_collection_window_validation_enabled?
Rails.env.production? || Rails.env.test? || Rails.env.staging?

Loading…
Cancel
Save