chore: start adding overview page

This commit is contained in:
Nelson Jovel 2024-01-17 12:49:23 -08:00
parent 1b0af124f7
commit 64b4d599c7
33 changed files with 783 additions and 199 deletions

View file

@ -1,7 +1,18 @@
module Dashboard
class ResponseRate < ApplicationRecord
belongs_to :dashboard_subcategory
belongs_to :school
belongs_to :dashboard_academic_year
TEACHER_RATE_THRESHOLD = 24.5
STUDENT_RATE_THRESHOLD = 24.5
belongs_to :subcategory, class_name: "Subcategory", foreign_key: :dashboard_subcategory_id
belongs_to :school, class_name: "School", foreign_key: :dashboard_school_id
belongs_to :academic_year, class_name: "AcademicYear", foreign_key: :dashboard_academic_year_id
def meets_student_threshold?
student_response_rate >= 24.5
end
def meets_teacher_threshold?
teacher_response_rate >= 24.5
end
end
end