From bcc8564033cfc12108778cf462a99bad579c3c6c Mon Sep 17 00:00:00 2001
From: Julian Leucker <leuckerj@gmail.com>
Date: Sat, 16 Jul 2022 23:35:35 +0200
Subject: [PATCH] Use camelcase in frontend

---
 .../js/vue/components/alsijil/CourseBook.js   | 764 ++++++++++++++----
 .../components/alsijil/LessonDocumentation.js |   5 +-
 .../vue/components/alsijil/PersonalNotes.js   |  50 +-
 3 files changed, 646 insertions(+), 173 deletions(-)

diff --git a/aleksis/apps/alsijil/static/js/vue/components/alsijil/CourseBook.js b/aleksis/apps/alsijil/static/js/vue/components/alsijil/CourseBook.js
index af4538eb6..eab98e352 100644
--- a/aleksis/apps/alsijil/static/js/vue/components/alsijil/CourseBook.js
+++ b/aleksis/apps/alsijil/static/js/vue/components/alsijil/CourseBook.js
@@ -1,4 +1,4 @@
-import {ERROR, SAVED, UPDATING, CHANGES} from "../../alsijil/UpdateStatuses.js";
+import {CHANGES, SAVED, UPDATING} from "../../alsijil/UpdateStatuses.js";
 
 export default {
     methods: {
@@ -7,11 +7,11 @@ export default {
             // alert("Probably save the data");
             console.log(event);
             setTimeout(() => {
-              this.status = UPDATING;
+                this.status = UPDATING;
             }, 500)
 
             setTimeout(() => {
-              this.status = SAVED;
+                this.status = SAVED;
             }, 1000)
 
         },
@@ -19,7 +19,7 @@ export default {
             alert("Data sync triggered manually");
             this.status = UPDATING;
             setTimeout(() => {
-              this.status = SAVED;
+                this.status = SAVED;
             }, 500)
         }
     },
@@ -27,145 +27,619 @@ export default {
     name: "course-book",
     data: () => {
         return {
-          status: SAVED,
-          "lesson":{
-            "teachers":[
-              {
-                "id":1245,
-                "full_name":"Teacher, first_name"
-              }
-            ],
-            "subject":{
-              "name":"Informatik"
-            },
-            "groups":[
-              {
-                "name":"Q2b",
-                "short_name":"q2b",
-                "members":[
-                  {
-                    "id":3212,
-                    "full_name":"Student, first_name"
-                  },
-                  {
-                    "id":7428,
-                    "full_name":"Student2, first_name"
-                  },
-                    {
-                    "id":392,
-                    "full_name":"Wendt, Gesch."
-                  },
-                ]
-              },
-              {
-                "name":"Q1b",
-                "short_name":"q1b",
-                "members":[
-                  {
-                    "id":4212,
-                    "full_name":"Student21, first_name"
-                  },
-                  {
-                    "id":123,
-                    "full_name":"Elf, Mais"
-                  },
-                  {
-                    "id":571,
-                    "full_name":"Pil, Mail-Pu"
-                  },
-                ]
-              }
+            status: SAVED,
+            "excuseTypes": [
+                {
+                    "name": "🐬",
+                    "shortName": "🐬"
+                },
+                {
+                    "name": ":",
+                    "shortName": ":"
+                },
+                {
+                    "name": ":))))",
+                    "shortName": "(😀)"
+                },
+                {
+                    "name": "Schulisch entschuldigt",
+                    "shortName": "s"
+                },
+                {
+                    "name": "asdlasdhlaksdhalkshd",
+                    "shortName": "a"
+                },
+                {
+                    "name": "ddddd",
+                    "shortName": "d"
+                },
+                {
+                    "name": "smiley",
+                    "shortName": "😀"
+                },
+                {
+                    "name": "ääääääääääääääääääääääääääääää",
+                    "shortName": "üüüüüüüüüüüüüüüüüüüüüüüüüüüü"
+                }
             ],
-            "validity_range":{
-              "date_start":"2022-01-01",
-              "date_end":"2022-12-31"
-            }
-          },
-          "excuse_types":[
-            {
-              "name":"Schulisch entschuldigt",
-              "short_name":"s"
-            },
-            {
-              "name":"Something else",
-              "short_name":"o"
-            }
-          ],
-          "extra_marks":[
-            {
-              "short_name":"hw",
-              "name":"Homework Forgotten"
-            }
-          ],
-          "lesson_documentations":[
-            {
-              "topic":"Rechner auseinanderschrauben",
-              "homework":"Aufgabe 1 programmieren",
-              "group_note":"Einweisung Feueralarm durchgeführt",
-              "date":"2022-05-26",
-              "period_formatted":"5.",
-              "personal_notes":[
-
-              ]
-            },
-            {
-              "topic":"Python Basics",
-              "homework":"Aufgabe 2 angucken",
-              "group_note":"",
-              "date":"2022-05-25",
-              "period_formatted":"5.",
-              "personal_notes":[
-                {
-                  "id":1,
-                  "student":{
-                    "id":571,
-                    "full_name":"Pil, Mail-Pu"
-                  },
-                  "tardiness":5,
-                  "absent":false,
-                  "excused":false,
-                  "excuse_type":null,
-                  "extra_marks":[
-
-                  ]
-                },
-                {
-                  "id":2,
-                  "student":{
-                    "id":123,
-                    "full_name":"Elf, Mais"
-                  },
-                  "tardiness":0,
-                  "absent":false,
-                  "excused":false,
-                  "excuse_type":null,
-                  "extra_marks":[
+            "lesson": {
+                "groups": [
                     {
-                      "short_name":"hw",
-                      "name":"Homework Forgotten"
+                        "name": "Ea, Eb, Ec, Ed: La1",
+                        "shortName": "EaEbEcEd-La1",
+                        "members": [
+                            {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            }
+                        ]
                     }
-                  ]
-                },
-                {
-                  "id":3,
-                  "student":{
-                    "id":392,
-                    "full_name":"Wendt, Gesch."
-                  },
-                  "tardiness":0,
-                  "absent":true,
-                  "excused":true,
-                  "excuse_type":{
-                    "name":"Schulisch entschuldigt",
-                    "short_name":"s"
-                  },
-                  "extra_marks":[
-
-                  ]
+                ],
+                "subject": {
+                    "name": "Latein 1"
+                }
+            },
+            "lessonDocumentations": [
+                {
+                    "topic": "",
+                    "homework": "",
+                    "groupNote": "",
+                    "period": 1,
+                    "date": "2020-03-02",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": false,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "",
+                    "homework": "",
+                    "groupNote": "",
+                    "period": 2,
+                    "date": "2020-03-02",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": false,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "",
+                    "homework": "",
+                    "groupNote": "",
+                    "period": 5,
+                    "date": "2020-03-06",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": false,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "",
+                    "homework": "",
+                    "groupNote": "",
+                    "period": 5,
+                    "date": "2020-05-01",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": false,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "Metrische Analyse des Proömiums, Übersetzung bis V.11, Charakterisierung Aeneas' und Junos",
+                    "homework": "Übersetzung bis V. 17 \"fuit\", Vokabeln Rest, Proömium üben!!",
+                    "groupNote": "Einige Mitglieder des Kurses leiden an Vokabeleritis",
+                    "period": 1,
+                    "date": "2020-05-04",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "Test",
+                    "homework": "AB beenden",
+                    "groupNote": "Stört!",
+                    "period": 2,
+                    "date": "2020-05-04",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 5,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "Petta",
+                            "extraMarks": [
+                                {
+                                    "name": "Homework forgotten",
+                                    "shortName": "HA"
+                                }
+                            ]
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "",
+                    "homework": "",
+                    "groupNote": "",
+                    "period": 5,
+                    "date": "2020-05-08",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 5,
+                            "absent": false,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": [
+                                {
+                                    "name": "Homework forgotten",
+                                    "shortName": "HA"
+                                }
+                            ]
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": [
+                                {
+                                    "name": "Homework forgotten",
+                                    "shortName": "HA"
+                                }
+                            ]
+                        }
+                    ]
+                },
+                {
+                    "topic": "",
+                    "homework": "",
+                    "groupNote": "",
+                    "period": 2,
+                    "date": "2020-06-08",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": false,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": {
+                                "name": "Schulisch entschuldigt",
+                                "shortName": "s"
+                            },
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "Blub",
+                    "homework": "Das ist die HA",
+                    "groupNote": "",
+                    "period": 5,
+                    "date": "2020-06-12",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "",
+                    "homework": "",
+                    "groupNote": "",
+                    "period": 1,
+                    "date": "2020-06-15",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": false,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": [
+                                {
+                                    "name": "Homework forgotten",
+                                    "shortName": "HA"
+                                }
+                            ]
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": [
+                                {
+                                    "name": "Homework forgotten",
+                                    "shortName": "HA"
+                                }
+                            ]
+                        }
+                    ]
+                },
+                {
+                    "topic": "",
+                    "homework": "",
+                    "groupNote": "",
+                    "period": 2,
+                    "date": "2020-06-15",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": false,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "",
+                    "homework": "",
+                    "groupNote": "",
+                    "period": 5,
+                    "date": "2020-06-19",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": false,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "",
+                    "homework": "",
+                    "groupNote": "",
+                    "period": 1,
+                    "date": "2020-06-22",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "",
+                    "homework": "",
+                    "groupNote": "",
+                    "period": 2,
+                    "date": "2020-06-22",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "Ovid gelesen",
+                    "homework": "übersetzen zeile 1",
+                    "groupNote": "",
+                    "period": 5,
+                    "date": "2020-06-26",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": false,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "sehr laut",
+                            "extraMarks": [
+                                {
+                                    "name": "Homework forgotten",
+                                    "shortName": "HA"
+                                }
+                            ]
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": true,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                },
+                {
+                    "topic": "",
+                    "homework": "",
+                    "groupNote": "",
+                    "period": 1,
+                    "date": "2020-08-03",
+                    "personalNotes": [
+                        {
+                            "person": {
+                                "id": "87",
+                                "fullName": "Mustermann, Max"
+                            },
+                            "late": 0,
+                            "absent": true,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        },
+                        {
+                            "person": {
+                                "id": "76",
+                                "fullName": "Weth, Jonathan"
+                            },
+                            "late": 0,
+                            "absent": false,
+                            "excused": false,
+                            "excuseType": null,
+                            "remarks": "",
+                            "extraMarks": []
+                        }
+                    ]
+                }
+            ],
+            "extraMarks": [
+                {
+                    "name": "Homework forgotten",
+                    "shortName": "HA"
                 }
-              ]
-            }
-          ]
+            ]
         }
     },
     template: `
@@ -173,12 +647,12 @@ export default {
       <update-indicator @manual-update="updateManually()" ref="indicator" :status="status"></update-indicator>
       <v-subheader>{{ lesson.subject.name }}</v-subheader>
       <v-row>
-        <v-col v-for="item in lesson_documentations" cols="12" v-bind:key="item.id">
+        <v-col v-for="item in lessonDocumentations" cols="12" v-bind:key="item.id">
           <lesson-documentation
-            v-bind:key="item.id" :groups="lesson.groups" :excuse-types="excuse_types" :extra-marks="extra_marks"
-             :period="item.period_formatted"
+            v-bind:key="item.id" :groups="lesson.groups" :excuse-types="excuseTypes" :extra-marks="extraMarks"
+             :period="item.period"
              
-             :personal-notes="item.personal_notes"
+             :personal-notes="item.personalNotes"
              @change-personal-notes="processDataChange"
              
              :date="item.date"
@@ -190,8 +664,8 @@ export default {
              :homework="item.homework"
              @change-homework="processDataChange"
              
-             :group-note="item.group_note"
-             @change-group-note="createNotification('course-book');"
+             :group-note="item.groupNote"
+             @change-group-note="processDataChange"
           ></lesson-documentation>
         </v-col>
       </v-row>
diff --git a/aleksis/apps/alsijil/static/js/vue/components/alsijil/LessonDocumentation.js b/aleksis/apps/alsijil/static/js/vue/components/alsijil/LessonDocumentation.js
index 973ad7bf2..df4b3647c 100644
--- a/aleksis/apps/alsijil/static/js/vue/components/alsijil/LessonDocumentation.js
+++ b/aleksis/apps/alsijil/static/js/vue/components/alsijil/LessonDocumentation.js
@@ -4,7 +4,6 @@ export default {
     data: () => {
         return {
             valid: false,
-            datePick: "2030-09-29",
             showPicker: false,
             dateAndPeriodEditable: false,
         }
@@ -25,7 +24,7 @@ export default {
                 >
                   <template v-slot:activator="{ on, attrs }">
                     <v-card-title>
-                      <span v-text="new Date(datePick).toLocaleDateString()" class="ma-1"></span>
+                      <span v-text="new Date(date).toLocaleDateString($root.languageCode)" class="ma-1"></span>
                       <v-btn right v-bind="attrs" v-on="on" icon v-if="hover && dateAndPeriodEditable">
                         <v-icon>mdi-pencil-outline</v-icon>
                       </v-btn>
@@ -35,7 +34,7 @@ export default {
                     scrollable
                     no-title 
                     @input="showPicker = false; $emit('change-date', $event)"
-                    v-model="datePick"
+                    v-model="date"
                   ></v-date-picker>
                 </v-menu>
               </div>
diff --git a/aleksis/apps/alsijil/static/js/vue/components/alsijil/PersonalNotes.js b/aleksis/apps/alsijil/static/js/vue/components/alsijil/PersonalNotes.js
index bc42ce6ea..cc90fc939 100644
--- a/aleksis/apps/alsijil/static/js/vue/components/alsijil/PersonalNotes.js
+++ b/aleksis/apps/alsijil/static/js/vue/components/alsijil/PersonalNotes.js
@@ -15,12 +15,12 @@ export default {
             }
             console.log("removing personal note of person", personID);
             this.personalNotes.forEach(item => {
-                if (item.student.id === personID) {
+                if (item.person.id === personID) {
                     item.tardiness = 0;
                     item.absent = false;
                     item.excused = false;
-                    item.excuse_type = null;
-                    item.extra_marks = [];
+                    item.excuseType = null;
+                    item.extraMarks = [];
                 }
             });
             this.$emit('change', this.personalNotes)
@@ -36,8 +36,8 @@ export default {
             this.editedTardiness = personalNote.tardiness || 0;
             this.editedAbsent = personalNote.absent || false;
             this.editedExcused = personalNote.excused || false;
-            this.editedExcuseType = personalNote.excuse_type || null;
-            this.editedExtraMarks = personalNote.extra_marks || [];
+            this.editedExcuseType = personalNote.excuseType || null;
+            this.editedExtraMarks = personalNote.extraMarks || [];
 
             this.newPersonalNote = !!(personalNote && Object.keys(personalNote).length === 0 && Object.getPrototypeOf(personalNote) === Object.prototype);
         },
@@ -55,7 +55,7 @@ export default {
             if (this.editedPersonID === ID_NO_PERSON) {
                 return {};
             }
-            return this.personalNotes.filter(item => item.student.id === studentID)[0] || {};
+            return this.personalNotes.filter(item => item.person.id === studentID)[0] || {};
         },
         savePersonalNote() {
             if (this.editedPersonID === ID_NO_PERSON) {
@@ -64,25 +64,25 @@ export default {
 
             if (this.newPersonalNote) {
                 this.personalNotes.push({
-                    student: {
+                    person: {
                         id: this.editedPersonID,
-                        full_name: this.studentNameByID(this.editedPersonID)
+                        fullName: this.studentNameByID(this.editedPersonID)
                     },
                     tardiness: this.editedTardiness,
                     absent: this.editedAbsent,
                     excused: this.editedExcused,
-                    excuse_type: this.editedExcuseType,
-                    extra_marks: this.editedExtraMarks
+                    excuseType: this.editedExcuseType,
+                    extraMarks: this.editedExtraMarks
                 });
             } else {
                 // Loop through all personal notes and update the ones that match the editedPersonID
                 this.personalNotes.forEach(item => {
-                    if (item.student.id === this.editedPersonID) {
+                    if (item.person.id === this.editedPersonID) {
                         item.tardiness = this.editedTardiness;
                         item.absent = this.editedAbsent;
                         item.excused = this.editedExcused;
-                        item.excuse_type = this.editedExcuseType;
-                        item.extra_marks = this.editedExtraMarks;
+                        item.excuseType = this.editedExcuseType;
+                        item.extraMarks = this.editedExtraMarks;
                     }
                 });
             }
@@ -108,12 +108,12 @@ export default {
             if (personalNote.excused) {
                 personalNoteString += "entschuldigt ";
             }
-            if (personalNote.excuse_type) {
-                personalNoteString += personalNote.excuse_type.name;
+            if (personalNote.excuseType) {
+                personalNoteString += personalNote.excuseType.name;
             }
-            if (personalNote.extra_marks.length > 0) {
+            if (personalNote.extraMarks.length > 0) {
                 personalNoteString += " (";
-                personalNote.extra_marks.forEach(item => {
+                personalNote.extraMarks.forEach(item => {
                     personalNoteString += item.name + ", ";
                 });
                 personalNoteString = personalNoteString.substring(0, personalNoteString.length - 2);
@@ -123,7 +123,7 @@ export default {
         },
         studentNameByID(studentID) {
             try {
-                return this.persons.filter(item => item.id === studentID)[0].full_name;
+                return this.persons.filter(item => item.id === studentID)[0].fullName;
             } catch (TypeError) {
                 return "";
             }
@@ -153,7 +153,7 @@ export default {
             return this.groups.map(
                 group => {
                     return [
-                        {header: group.name, id: group.short_name},
+                        {header: group.name, id: group.shortName},
                         group.members
                     ]
                 }
@@ -168,10 +168,10 @@ export default {
     >
       <template v-slot:activator="{ on, attrs }">
         <div>
-          <template v-for="personal_note in personalNotes">
-            <v-chip class="ma-1" close @click="editPersonalNote(personal_note.student.id)"
-              @click:close="removePersonalNote(personal_note.student.id)" v-if="personalNoteString(personal_note)">
-              {{ personal_note.student.full_name }}: {{ personalNoteString(personal_note) }}
+          <template v-for="personalNote in personalNotes">
+            <v-chip class="ma-1" close @click="editPersonalNote(personalNote.person.id)"
+              @click:close="removePersonalNote(personalNote.person.id)" v-if="personalNoteString(personalNote)">
+              {{ personalNote.person.fullName }}: {{ personalNoteString(personalNote) }}
             </v-chip>
           </template>
         </div>
@@ -201,7 +201,7 @@ export default {
         <v-card-text>
           <v-container>
             <v-select
-              item-text="full_name"
+              item-text="fullName"
               item-value="id"
               :items="persons"
               label="Student"
@@ -232,7 +232,7 @@ export default {
               v-model="editedExcuseType"
               :items="excuseTypes"
               item-text="name"
-              item-value="short_name"
+              item-value="shortName"
               :disabled="editedPersonID === ID_NO_PERSON || !editedAbsent || !editedExcused"
             ></v-select>
             <!-- FIXME: get extra mark itself as value -->
-- 
GitLab