mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
fix viewData prop validator, change nullish coalescing operator to logical or since optional router param is empty string and not an unset prop
This commit is contained in:
@@ -16,9 +16,9 @@ export const AbgabetoolStudent = {
|
||||
viewData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({name: '', uid: ''}),
|
||||
default: () => ({uid: ''}),
|
||||
validator(value) {
|
||||
return value && value.name && value.uid
|
||||
return value && value.uid
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -186,7 +186,7 @@ export const AbgabetoolStudent = {
|
||||
this.$refs.abgabeTable.tabulator.setData(d);
|
||||
},
|
||||
loadProjektarbeiten() {
|
||||
this.$fhcApi.factory.lehre.getStudentProjektarbeiten(this.student_uid_prop ?? this.viewData?.uid ?? null)
|
||||
this.$fhcApi.factory.lehre.getStudentProjektarbeiten(this.student_uid_prop || this.viewData?.uid || null)
|
||||
.then(res => {
|
||||
if(res?.data) this.setupData(res.data)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user