Skip to content
Snippets Groups Projects
Verified Commit f0d37d79 authored by Julian's avatar Julian Committed by magicfelix
Browse files

Add possibility to edit and view extra marks

parent 20d716a7
No related branches found
No related tags found
1 merge request!284Draft: Redesign entering of lesson documentation
......@@ -21,6 +21,7 @@ export default {
item.excused = false;
item.excuseType = null;
item.extraMarks = [];
item.remarks = "";
}
});
this.$emit('change', this.personalNotes)
......@@ -38,6 +39,7 @@ export default {
this.editedExcused = personalNote.excused || false;
this.editedExcuseType = personalNote.excuseType || null;
this.editedExtraMarks = personalNote.extraMarks || [];
this.editedRemarks = personalNote.remarks || "";
this.newPersonalNote = !!(personalNote && Object.keys(personalNote).length === 0 && Object.getPrototypeOf(personalNote) === Object.prototype);
},
......@@ -48,6 +50,7 @@ export default {
this.editedExcused = false;
this.editedExcuseType = null;
this.editedExtraMarks = [];
this.editedRemarks = "";
this.newPersonalNote = true;
this.dialog = true;
},
......@@ -72,7 +75,8 @@ export default {
absent: this.editedAbsent,
excused: this.editedExcused,
excuseType: this.editedExcuseType,
extraMarks: this.editedExtraMarks
extraMarks: this.editedExtraMarks,
remarks: this.editedRemarks,
});
} else {
// Loop through all personal notes and update the ones that match the editedPersonID
......@@ -83,6 +87,7 @@ export default {
item.excused = this.editedExcused;
item.excuseType = this.editedExcuseType;
item.extraMarks = this.editedExtraMarks;
item.remarks = this.editedRemarks;
}
});
}
......@@ -117,7 +122,10 @@ export default {
personalNoteString += item.name + ", ";
});
personalNoteString = personalNoteString.substring(0, personalNoteString.length - 2);
personalNoteString += ")";
personalNoteString += ") ";
}
if (personalNote.remarks) {
personalNoteString += "\"" + personalNote.remarks + "\" ";
}
return personalNoteString;
},
......@@ -142,6 +150,7 @@ export default {
editedExcused: false,
editedExcuseType: null,
editedExtraMarks: [],
editedRemarks: "",
newPersonalNote: false,
}
},
......@@ -246,6 +255,11 @@ export default {
multiple
chips
></v-select>
<v-text-field
label="Remarks"
v-model="editedRemarks"
:disabled="editedPersonID === ID_NO_PERSON"
></v-text-field>
</v-container>
</v-card-text>
<v-card-actions>
......
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