From 0b00e393daa051db398efeafcfe984028ae6641e Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Mon, 23 Jun 2025 09:51:52 +0200 Subject: [PATCH] Student Results --- public/js/components/searchbar/result/student.js | 12 +++++++++++- public/js/components/searchbar/searchbar.js | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/public/js/components/searchbar/result/student.js b/public/js/components/searchbar/result/student.js index e85716a94..13354b818 100644 --- a/public/js/components/searchbar/result/student.js +++ b/public/js/components/searchbar/result/student.js @@ -6,11 +6,21 @@ export default { }, emits: [ 'actionexecuted' ], props: { + mode: String, res: Object, actions: Object }, computed: { + photo_url() { + if (this.mode != 'simple') + return this.photo_url; + if (this.res.foto) + return 'data:image/jpeg;base64,' + this.res.foto; + return null; + }, emails() { + if (this.mode == 'simple') + return new Set([this.res.email]); return new Set(this.res.email); } }, @@ -20,7 +30,7 @@ export default { :res="res" :actions="actions" :title="res.name" - :image="res.photo_url" + :image="photo_url" image-fallback="fas fa-user fa-4x" @actionexecuted="$emit('actionexecuted')" > diff --git a/public/js/components/searchbar/searchbar.js b/public/js/components/searchbar/searchbar.js index 7e826399b..8359b932d 100644 --- a/public/js/components/searchbar/searchbar.js +++ b/public/js/components/searchbar/searchbar.js @@ -2,7 +2,7 @@ import person from "./person.js"; import raum from "./raum.js"; import employee from "./employee.js"; import organisationunit from "./organisationunit.js"; -import student from "./student.js"; +import student from "./result/student.js"; import prestudent from "./result/prestudent.js"; export default { @@ -56,7 +56,7 @@ export default {
Es wurden keine Ergebnisse gefunden.