From 4e2c3f7741b0bfb63d59f17dfca49b01b1198296 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 26 Feb 2026 11:18:27 +0100 Subject: [PATCH] show qgate benotungsstatus of saved note, not currently selected note --- .../Cis/Abgabetool/AbgabeMitarbeiterDetail.js | 27 ++++++++----------- .../Cis/Abgabetool/AbgabeStudentDetail.js | 2 +- .../Cis/Abgabetool/AbgabetoolAssistenz.js | 5 ++++ .../Cis/Abgabetool/AbgabetoolMitarbeiter.js | 5 ++++ system/phrasesupdate.php | 2 +- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js b/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js index 4c5aa3e66..a39aa364c 100644 --- a/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js +++ b/public/js/components/Cis/Abgabetool/AbgabeMitarbeiterDetail.js @@ -81,9 +81,9 @@ export const AbgabeMitarbeiterDetail = { }, methods: { getNoteBezeichnung(termin){ - if(termin.note?.bezeichnung) { - return termin.note?.positiv ? this.$capitalize(this.$p.t('abgabetool/c4positivBenotet')) + ' ✅' : this.$capitalize(this.$p.t('abgabetool/c4negativBenotet')) + ' ❌' - } else if(termin.bezeichnung?.benotbar === true && !termin.note) { + if(termin.noteBackend?.bezeichnung) { + return termin.noteBackend?.positiv ? this.$capitalize(this.$p.t('abgabetool/c4positivBenotet')) + ' ✅' : this.$capitalize(this.$p.t('abgabetool/c4negativBenotet')) + ' ❌' + } else if(termin.bezeichnung?.benotbar === true && !termin.noteBackend) { return this.$capitalize(this.$p.t('abgabetool/c4notYetGraded')); } else { return '' @@ -109,7 +109,10 @@ export const AbgabeMitarbeiterDetail = { 'allowedToDelete': true, ...res.data[0] } - if(newTerminRes.note) newTerminRes.note = noteOpt + if(newTerminRes.note) { + newTerminRes.note = noteOpt + newTerminRes.noteBackend = noteOpt // certain UI elements should only reflect persisted state + } newTerminRes.invertedFixtermin = !newTerminRes.fixtermin const existingTerminRes = res.data[1] @@ -121,8 +124,6 @@ export const AbgabeMitarbeiterDetail = { benotbar: abgabeOpt.benotbar } - - // only insert new abgabe if we actually created a new one, not when saving/editing existing if(!existingTerminRes){ newTerminRes.dateStyle = getDateStyleClass(newTerminRes, this.notenOptions) @@ -130,6 +131,9 @@ export const AbgabeMitarbeiterDetail = { } else { const noteOptExisting = this.allowedNotenOptions.find(opt => opt.note == existingTerminRes.note) existingTerminRes.note = noteOptExisting + + const existingTerminResCurrObj = this.projektarbeit.abgabetermine.find(paa => paa.paabgabe_id == existingTerminRes.paabgabe_id) + existingTerminResCurrObj.noteBackend = noteOpt // do NOT take noteOptExisting -> should reflect the "yes the qgate grade is confirmed in backend ux behaviour" termin.dateStyle = getDateStyleClass(termin, this.notenOptions) } @@ -742,16 +746,7 @@ export const AbgabeMitarbeiterDetail = {