Skip to content
Snippets Groups Projects
Commit 56d1d23f authored by Julian's avatar Julian
Browse files

Create constant for ID_NO_PERSON

parent 20856932
No related branches found
No related tags found
No related merge requests found
const ID_NO_PERSON = null;
export default {
created() {
this.ID_NO_PERSON = ID_NO_PERSON;
},
methods: {
removePersonalNote(item) {
console.log("removing personal note", item);
......@@ -18,6 +23,9 @@ export default {
this.editedExtraMarks = personalNote.extra_marks || [];
},
personalNoteByStudentID(studentID) {
if (this.editedPersonID === ID_NO_PERSON) {
return {};
}
return this.personalNotes.filter(item => item.student.id === studentID)[0] || {};
}
},
......@@ -28,7 +36,7 @@ export default {
dialog: false,
// Absent versp. exc. type hw note
editPersonalNoteId: null,
editedPersonID: -1,
editedPersonID: ID_NO_PERSON,
editedTardiness: 0,
editedAbsent: false,
editedExcused: false,
......
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