Skip to content
Snippets Groups Projects
Commit 4c79b195 authored by permcu's avatar permcu
Browse files

Return school-term for statistics-by-person-query

Query can send no school-term and will receive the result for the
current school-term. With the additional school-term parameter the
frontend now knows which school-term is current.
parent 604ee125
No related branches found
No related tags found
1 merge request!361Resolve "Add statistics page for absences"
fragment statistics on StatisticsByPersonType { fragment statistics on StatisticsByPersonType {
schoolTerm
participationCount participationCount
absenceCount absenceCount
absenceReasons { absenceReasons {
......
...@@ -27,6 +27,7 @@ class ExtraMarkWithCountType(graphene.ObjectType): ...@@ -27,6 +27,7 @@ class ExtraMarkWithCountType(graphene.ObjectType):
class StatisticsByPersonType(graphene.ObjectType): class StatisticsByPersonType(graphene.ObjectType):
school_term = graphene.Int()
participation_count = graphene.Int() participation_count = graphene.Int()
absence_count = graphene.Int() absence_count = graphene.Int()
absence_reasons = graphene.List(AbsenceReasonWithCountType) absence_reasons = graphene.List(AbsenceReasonWithCountType)
...@@ -34,6 +35,9 @@ class StatisticsByPersonType(graphene.ObjectType): ...@@ -34,6 +35,9 @@ class StatisticsByPersonType(graphene.ObjectType):
tardiness_count = graphene.Int() tardiness_count = graphene.Int()
extra_marks = graphene.List(ExtraMarkWithCountType) extra_marks = graphene.List(ExtraMarkWithCountType)
def resolve_school_term(root, info):
return 1
def resolve_participation_count(root, info): def resolve_participation_count(root, info):
return 3 return 3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment