From a858049e15bf4363aa97215560f67de90d55d583 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 15 May 2025 18:54:28 +0200 Subject: [PATCH] fix viewData prop validator, change nullish coalescing operator to logical or since optional router param is empty string and not an unset prop --- public/js/components/Cis/Abgabetool/AbgabetoolStudent.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js b/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js index 1ac9ad912..7a8482a3f 100644 --- a/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js +++ b/public/js/components/Cis/Abgabetool/AbgabetoolStudent.js @@ -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) })