mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-12 17:00:34 -07:00
Use category presenters on page.
Show category and subcategory cards Conditionally render subcategory icons fix styling
This commit is contained in:
parent
8e0af1f17f
commit
b29107688e
11 changed files with 171 additions and 14 deletions
|
|
@ -1,13 +1,21 @@
|
|||
class DashboardController < SqmApplicationController
|
||||
|
||||
def index
|
||||
@presenters = measure_ids
|
||||
.map { |measure_id| Measure.find_by_measure_id measure_id }
|
||||
.map(&method(:presenter_for_measure))
|
||||
.sort
|
||||
.reverse
|
||||
@measure_graph_row_presenters = measure_ids
|
||||
.map { |measure_id| Measure.find_by_measure_id measure_id }
|
||||
.map(&method(:presenter_for_measure))
|
||||
.sort
|
||||
.reverse
|
||||
|
||||
@category_presenters = SqmCategory.all.map { |sqm_category| CategoryPresenter.new(
|
||||
category: sqm_category,
|
||||
academic_year: academic_year,
|
||||
school: school,
|
||||
)}
|
||||
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def measure_ids
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue