diff --git a/aleksis/apps/alsijil/models.py b/aleksis/apps/alsijil/models.py index 9e68ccd06773dc8b0f6ee65ccd16c81319b94a8b..9e60596c343c6917af6894db3272b38a4d591372 100644 --- a/aleksis/apps/alsijil/models.py +++ b/aleksis/apps/alsijil/models.py @@ -832,9 +832,10 @@ class NewPersonalNote(ExtensibleModel): extra_mark = models.ForeignKey( ExtraMark, on_delete=models.PROTECT, blank=True, null=True, verbose_name=_("Extra Mark") ) + tardiness = models.PositiveSmallIntegerField(blank=True, null=True, verbose_name=_("Tardiness")) def __str__(self) -> str: - return f"{self.person}, {self.note}, {self.extra_mark}" + return f"{self.person}, {self.note}, {self.extra_mark}, {self.tardiness}" class Meta: verbose_name = _("Personal Note") diff --git a/aleksis/apps/alsijil/schema/personal_note.py b/aleksis/apps/alsijil/schema/personal_note.py index 7558378aefcefbef8b86d8ed694e5266317ff713..3aa70220bb84d777ceec5a35847421559e7a4a30 100644 --- a/aleksis/apps/alsijil/schema/personal_note.py +++ b/aleksis/apps/alsijil/schema/personal_note.py @@ -23,6 +23,7 @@ class PersonalNoteType( "id", "note", "extra_mark", + "tardiness", ) @@ -31,7 +32,7 @@ class PersonalNoteBatchCreateMutation(BaseBatchCreateMutation): model = NewPersonalNote type_name = "BatchCreatePersonalNoteInput" return_field_name = "personalNotes" - fields = ("note", "extra_mark", "documentation", "person") + fields = ("note", "extra_mark", "documentation", "person", "tardiness") permissions = ("alsijil.create_personal_note",) # FIXME @@ -40,7 +41,7 @@ class PersonalNoteBatchPatchMutation(BaseBatchPatchMutation): model = NewPersonalNote type_name = "BatchPatchPersonalNoteInput" return_field_name = "personalNotes" - fields = ("id", "note", "extra_mark", "documentation", "person") + fields = ("id", "note", "extra_mark", "documentation", "person", "tardiness") permissions = ("alsijil.change_personal_note",) # FIXME