Skip to content

Commit

Permalink
Change overdue dashboard order (#5290)
Browse files Browse the repository at this point in the history
**Story card:**
[sc-11217](https://app.shortcut.com/simpledotorg/story/11217/change-placement-of-overdue-section-in-dashboard)

## Because

A request from the India team to move the overdue section further down
on the dashboard, below other more important cards.

## This addresses

This actions the request. The overdue section is place under the
'COMPARE PERFORMANCE' section

## Test instructions

Load the dashboard and check that the overdue section is now positioned
below the compare performance section.
  • Loading branch information
jamiecarter7 authored Oct 16, 2023
1 parent b5a3382 commit dd31193
Showing 1 changed file with 30 additions and 36 deletions.
66 changes: 30 additions & 36 deletions app/views/reports/regions/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,23 @@
) %>
<%= render(Dashboard::Hypertension::LostToFollowUpComponent.new(data: @data, region: @region, period: @period)) %>
</div>
<% if current_admin.feature_enabled?(:medications_dispensation) %>
<h4 class="mt-5 mb-32px">Medications</h4>
<%= render Dashboard::MedicationDispensationComponent.new(data: @data, region: @region, period: @period) %>
<% end %>
<% if @children_data.any? %>
<h4 class="mt-5 mb-32px">Compare performance</h4>
<%= render "child_data_tables", data: @children_data, localized_region_type: @child_regions.first.localized_region_type %>
<% end %>
<% if @region.facility_region? %>
<h4 class="mt-5 mb-32px">Facility activity</h4>
<%= render "facility_details" %>
<% else %>
<%= render(RegistrationsAndFollowUpsComponent.new(@region,
current_admin: current_admin,
repository: @details_repository,
current_period: @period)) %>
<% end %>
<div class="d-flex jc-space-between">
<h4 class="mt-5 mb-32px">Overdue</h4>
<div class="d-flex" style="margin-top: 43px;">
Expand All @@ -240,25 +257,24 @@
<% if @with_non_contactable %>checked<% end %>>
<label class="font-weight-normal custom-control-label <% unless false %>c-grey-dark<% end %>"
for="overdue-section">
Include non-contactable patients
Include non-contactable patients
</label>
</div>
</form>
<div class="ml-8px" style="margin-top: 2px;">
<%= render "definition_tooltip",
</div>
</form>
<div class="ml-8px" style="margin-top: 2px;">
<%= render "definition_tooltip",
definitions: {"" => t("overdue_toggle_tooltip.additional"),
"list" => t("overdue_toggle_tooltip.list")} %>
</div>
</div>
</div>

<div class="d-lg-flex flex-lg-wrap">
<%= render(Dashboard::Hypertension::OverduePatientsComponent.new(
</div>
<div class="d-lg-flex flex-lg-wrap">
<%= render(Dashboard::Hypertension::OverduePatientsComponent.new(
region: @region,
data: @data,
period: @period,
with_non_contactable: @with_non_contactable)) %>
<%= render(Dashboard::Hypertension::OverduePatientsCalledComponent.new(
<%= render(Dashboard::Hypertension::OverduePatientsCalledComponent.new(
region: @region,
data: @data,
period: @period,
Expand All @@ -268,10 +284,10 @@
data: @data,
period: @period,
with_non_contactable: @with_non_contactable)) %>
<div class="d-lg-flex w-lg-50 pl-lg-2 hidden mb-16px">
<div class="no-card-gap-filler">
<p>
Intentionally blank
<div class="d-lg-flex w-lg-50 pl-lg-2 hidden mb-16px">
<div class="no-card-gap-filler">
<p>
Intentionally blank
</p>
</div>
</div>
Expand All @@ -283,39 +299,17 @@
current_admin: @current_admin,
with_non_contactable: @with_non_contactable)) %>
</div>
<% if current_admin.feature_enabled?(:medications_dispensation) %>
<h4 class="mt-5 mb-32px">Medications</h4>
<%= render Dashboard::MedicationDispensationComponent.new(data: @data, region: @region, period: @period) %>
<% end %>
<% if @children_data.any? %>
<h4 class="mt-5 mb-32px">Compare performance</h4>
<%= render "child_data_tables", data: @children_data, localized_region_type: @child_regions.first.localized_region_type %>
<% end %>
<% if @region.facility_region? %>
<h4 class="mt-5 mb-32px">Facility activity</h4>
<%= render "facility_details" %>
<% else %>
<%= render(RegistrationsAndFollowUpsComponent.new(@region,
current_admin: current_admin,
repository: @details_repository,
current_period: @period)) %>
<% end %>

<h4 class="mt-5 mb-32px">Cohort reports</h4>

<div class="d-lg-flex">
<%= render Reports::CohortComponent.new(@cohort_period, @cohort_data) %>
</div>

<% if @region.facility_region? %>
<h4 class="mt-5 mb-32px">BP Recording Activity</h4>
<%= render "shared/recent_bp_log",
blood_pressures: @recent_blood_pressures,
display_model: :facility %>
<% end %>

<%= render "overview_footnotes" %>

<div id="data-json" style="display: none;">
<%= raw @data.to_json %>
</div>
Expand Down

0 comments on commit dd31193

Please sign in to comment.