mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
reset newTermin object when switching projektarbeit so they are assigned to the correct student
This commit is contained in:
@@ -643,6 +643,24 @@ export const AbgabeMitarbeiterDetail = {
|
||||
'projektarbeit'(newVal) {
|
||||
// set invertedFixtermin field for UI/UX purposes -> avoid double negation in text
|
||||
|
||||
// reset newTermin object
|
||||
const typ = this.abgabeTypeOptions.find(opt => opt.paabgabetyp_kurzbz === 'zwischen')
|
||||
this.newTermin = {
|
||||
'paabgabe_id': -1,
|
||||
'projektarbeit_id': newVal.projektarbeit_id,
|
||||
'fixtermin': false,
|
||||
'invertedFixtermin': true,
|
||||
'kurzbz': '',
|
||||
'datum': new Date().toISOString().split('T')[0],
|
||||
'note': this.allowedNotenOptions.find(opt => opt.note == 9),
|
||||
'beurteilungsnotiz': '',
|
||||
'upload_allowed': typ.upload_allowed_default,
|
||||
'paabgabetyp_kurzbz': '',
|
||||
'bezeichnung': typ,
|
||||
'abgabedatum': null,
|
||||
'insertvon': this.viewData?.uid ?? ''
|
||||
}
|
||||
|
||||
newVal?.abgabetermine?.forEach(termin => termin.invertedFixtermin = !termin.fixtermin)
|
||||
|
||||
// default select german if projektarbeit sprache was null
|
||||
|
||||
@@ -333,7 +333,6 @@ export const AbgabetoolMitarbeiter = {
|
||||
pa.student = `${pa.vorname} ${pa.nachname}`
|
||||
|
||||
this.selectedProjektarbeit = pa
|
||||
|
||||
this.$refs.modalContainerAbgabeDetail.show()
|
||||
|
||||
}).finally(()=>{this.loading = false})
|
||||
|
||||
Reference in New Issue
Block a user