Skip to content

Commit 9cb4317

Browse files
authored
fix(Dr. Rai Reports): Fix flipper check in Progress (#5693)
**Story card:** [sc-16344](https://app.shortcut.com/simpledotorg/story/16344/add-dr-rai-to-progress-tab) ## Because In some environments, depending on how the feature is enabled, the component does not show up in the Progress tab ## This addresses Ensuring we check Flipper the right way ## Test instructions - selectively turn on the feature for a few users; yourself included - ensure it shows up in the Progress tab
1 parent b9e105c commit 9cb4317

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/controllers/reports/progress_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ def set_dr_rai_vars
7272
@dr_rai_periods = Period.quarters_between(10.months.ago, 2.months.from_now)
7373

7474
option_keys = %i[selected_quarter with_non_contactable]
75-
@dr_rai_options = params.select { |k, _| option_keys.include?(k) }
75+
@dr_rai_options = params.slice(*option_keys)
7676
end
7777
end

app/views/api/v3/analytics/user_analytics/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</head>
2020
<body>
2121
<div id="home-page">
22-
<% if Flipper.enabled?(:dr_rai_reports) && Flipper.enabled?(:dr_rai_progress) && @region.facility_region? %>
22+
<% if Flipper.enabled?(:dr_rai_reports, current_user) && Flipper.enabled?(:dr_rai_progress) && @region.facility_region? %>
2323
<% dr_rai_component = Dashboard::DrRaiReport.new(nil, @region.slug, @dr_rai_options, true) %>
2424
<% unless dr_rai_component.action_plans.empty? %>
2525
<div class="mb-8px p-16px bgc-white bs-card">

0 commit comments

Comments
 (0)