From 46b67001d22fb05ad4434633a27c6356525cb3cc Mon Sep 17 00:00:00 2001 From: Julian Leucker <leuckerj@gmail.com> Date: Tue, 21 May 2024 11:14:36 +0200 Subject: [PATCH] Rename notes property of participations --- .../coursebook/absences/participationStatus.graphql | 10 ++++++++++ .../frontend/components/coursebook/coursebook.graphql | 10 ++++++++++ aleksis/apps/alsijil/schema/participation_status.py | 8 ++++---- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/absences/participationStatus.graphql b/aleksis/apps/alsijil/frontend/components/coursebook/absences/participationStatus.graphql index 4c3f8df66..0d139df42 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/absences/participationStatus.graphql +++ b/aleksis/apps/alsijil/frontend/components/coursebook/absences/participationStatus.graphql @@ -32,6 +32,16 @@ mutation touchDocumentation($documentationId: ID!) { name shortName } + notesWithExtraMark { + id + extraMark { + id + } + } + notesWithNote { + id + note + } isOptimistic } } diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/coursebook.graphql b/aleksis/apps/alsijil/frontend/components/coursebook/coursebook.graphql index 83a6a459f..1e5ca9e18 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/coursebook.graphql +++ b/aleksis/apps/alsijil/frontend/components/coursebook/coursebook.graphql @@ -81,6 +81,16 @@ query documentationsForCoursebook( name shortName } + notesWithExtraMark { + id + extraMark { + id + } + } + notesWithNote { + id + note + } isOptimistic } topic diff --git a/aleksis/apps/alsijil/schema/participation_status.py b/aleksis/apps/alsijil/schema/participation_status.py index ac678e676..224043438 100644 --- a/aleksis/apps/alsijil/schema/participation_status.py +++ b/aleksis/apps/alsijil/schema/participation_status.py @@ -27,18 +27,18 @@ class ParticipationStatusType( "base_absence", ) - extra_mark_notes = graphene.List(PersonalNoteType) - note_notes = graphene.List(PersonalNoteType) + notes_with_extra_mark = graphene.List(PersonalNoteType) + notes_with_note = graphene.List(PersonalNoteType) @staticmethod - def resolve_extra_mark_notes(root: ParticipationStatus, info, **kwargs): + def resolve_notes_with_extra_mark(root: ParticipationStatus, info, **kwargs): return NewPersonalNote.objects.filter( person=root.person, documentation=root.related_documentation, extra_mark__isnull=False, ) @staticmethod - def resolve_note_notes(root: ParticipationStatus, info, **kwargs): + def resolve_notes_with_note(root: ParticipationStatus, info, **kwargs): return NewPersonalNote.objects.filter( person=root.person, documentation=root.related_documentation, -- GitLab