feat: show n_size on parent graph

rpp-main
rebuilt 9 months ago
parent e38bdfb761
commit a5b3cf311c

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

@ -37,6 +37,10 @@ module Analyze
def type def type
:parent :parent
end 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 end
end end

Loading…
Cancel
Save