diff --git a/assets/js/vue/components/alsijil/PersonalNotes.js b/assets/js/vue/components/alsijil/PersonalNotes.js index cc90fc939181a901541f248af1209ffa958ebdbe..c05f949389cad1076ac0292b661b9cb150d207c0 100644 --- a/assets/js/vue/components/alsijil/PersonalNotes.js +++ b/assets/js/vue/components/alsijil/PersonalNotes.js @@ -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>