mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
fixed student_uid variable aquisition inside StudentComponent; No allowedToSave check in client for Betreuer at all, everything done at backend level (WIP); added legacy phrasen to phrasesupdate to guarantee their existence;
This commit is contained in:
@@ -305,9 +305,8 @@ export const AbgabetoolMitarbeiter = {
|
||||
termin.note = this.allowedNotenOptions.find(opt => opt.note == termin.note)
|
||||
termin.file = []
|
||||
|
||||
// lektoren are only allowed to edit their own deadline entries
|
||||
// TODO: cis old
|
||||
termin.allowedToSave = termin.insertvon == this.viewData?.uid && pa.betreuerart_kurzbz != 'Zweitbegutachter'
|
||||
// update 08-01-20206: everybody is allowed to do everything in client, critical checks happen at backend level
|
||||
termin.allowedToSave = true
|
||||
|
||||
// lektoren are not allowed to delete deadlines with existing submissions
|
||||
termin.allowedToDelete = termin.allowedToSave && !termin.abgabedatum
|
||||
|
||||
@@ -40,8 +40,6 @@ export const AbgabetoolStudent = {
|
||||
phrasenResolved: false,
|
||||
loading: false,
|
||||
notenOptions: null,
|
||||
domain: '',
|
||||
student_uid: null,
|
||||
detail: null,
|
||||
projektarbeiten: null,
|
||||
selectedProjektarbeit: null
|
||||
@@ -155,7 +153,7 @@ export const AbgabetoolStudent = {
|
||||
|
||||
// development purposes
|
||||
// termin.allowedToUpload = this.checkQualityGatesStrict(pa.abgabetermine)
|
||||
// termin.allowedToUpload = true
|
||||
termin.allowedToUpload = true
|
||||
|
||||
} else if(termin.fixtermin) {
|
||||
termin.allowedToUpload = !this.isPastDate(termin.datum)
|
||||
@@ -206,19 +204,14 @@ export const AbgabetoolStudent = {
|
||||
} else return '-'
|
||||
},
|
||||
buildMailToLink(projekt) {
|
||||
if(projekt.mitarbeiter_uid) { // standard
|
||||
return 'mailto:' + projekt.mitarbeiter_uid +'@'+ this.domain
|
||||
} else { // private
|
||||
return 'mailto:' + projekt.email
|
||||
}
|
||||
// should always be "projekt.mitarbeiter_uid +'@'+ this.domain", built in backend
|
||||
return 'mailto:' + projekt.email
|
||||
},
|
||||
buildBetreuer(abgabe) {
|
||||
return (abgabe.btitelpre ? abgabe.btitelpre + ' ' : '') + abgabe.bvorname + ' ' + abgabe.bnachname + (abgabe.btitelpost ? ' ' + abgabe.btitelpost : '')
|
||||
},
|
||||
async setupData(data){
|
||||
// this.projektarbeiten = data[0]
|
||||
this.domain = data[1]
|
||||
this.student_uid = data[2]
|
||||
const projektarbeiten = data[0] ?? null
|
||||
if(!projektarbeiten) return
|
||||
this.projektarbeiten = projektarbeiten.map(projekt => {
|
||||
@@ -246,7 +239,7 @@ export const AbgabetoolStudent = {
|
||||
|
||||
},
|
||||
loadProjektarbeiten() {
|
||||
this.$api.call(ApiAbgabe.getStudentProjektarbeiten(this.student_uid_prop || this.viewData?.uid || null))
|
||||
this.$api.call(ApiAbgabe.getStudentProjektarbeiten(this.student_uid))
|
||||
.then(res => {
|
||||
if(res?.data) this.setupData(res.data)
|
||||
})
|
||||
@@ -295,6 +288,9 @@ export const AbgabetoolStudent = {
|
||||
computed: {
|
||||
isViewMode() {
|
||||
return this.student_uid !== this.viewData.uid
|
||||
},
|
||||
student_uid() {
|
||||
return this.student_uid_prop || this.viewData?.uid || null
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
|
||||
Reference in New Issue
Block a user