feat: show n_size on parent graph

This commit is contained in:
rebuilt 2025-03-11 13:40:57 -07:00
parent 255dd67310
commit 2cbb8271f3
2 changed files with 5 additions and 1 deletions

View file

@ -64,7 +64,7 @@ module Analyze
end
def show_popover?
%i[student teacher].include? type
%i[student teacher parent].include? type
end
def popover_content(academic_year)

View file

@ -37,6 +37,10 @@ module Analyze
def type
:parent
end
def n_size(measure:, school:, academic_year:)
SurveyItemResponse.where(survey_item: scale.survey_items.parent_survey_items, school:, academic_year:).select(:response_id).distinct.count
end
end
end
end