Prestudent Results

This commit is contained in:
cgfhtw
2025-06-23 09:26:09 +02:00
parent a2250fc727
commit bc79fe2dd6
2 changed files with 19 additions and 4 deletions
@@ -6,11 +6,26 @@ export default {
},
emits: [ 'actionexecuted' ],
props: {
mode: String,
res: Object,
actions: Object
},
computed: {
title() {
if (this.mode == 'simple')
return this.res.name;
return this.res.name + ' (' + this.res.status + ' ' + this.res.stg_kuerzel + ')';
},
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);
}
},
@@ -19,8 +34,8 @@ export default {
class="searchbar-result-prestudent"
:res="res"
:actions="actions"
:title="res.name + ' (' + res.status + ' ' + res.stg_kuerzel + ')'"
:image="res.photo_url"
:title="title"
:image="photo_url"
image-fallback="fas fa-user fa-4x"
@actionexecuted="$emit('actionexecuted')"
>
+2 -2
View File
@@ -3,7 +3,7 @@ import raum from "./raum.js";
import employee from "./employee.js";
import organisationunit from "./organisationunit.js";
import student from "./student.js";
import prestudent from "./prestudent.js";
import prestudent from "./result/prestudent.js";
export default {
props: [ "searchoptions", "searchfunction" ],
@@ -57,7 +57,7 @@ export default {
<template v-else="" v-for="res in searchresult">
<person v-if="res.type === 'person'" :res="res" :actions="this.searchoptions.actions.person" @actionexecuted="this.hideresult"></person>
<student v-else-if="res.type === 'student' || res.type === 'studentStv'" :res="res" :actions="this.searchoptions.actions.student" @actionexecuted="this.hideresult"></student>
<prestudent v-else-if="res.type === 'prestudent'" :res="res" :actions="this.searchoptions.actions.prestudent" @actionexecuted="this.hideresult"></prestudent>
<prestudent v-else-if="res.type === 'prestudent'" :mode="searchmode" :res="res" :actions="this.searchoptions.actions.prestudent" @actionexecuted="this.hideresult"></prestudent>
<employee v-else-if="res.type === 'mitarbeiter' || res.type === 'mitarbeiter_ohne_zuordnung'" :res="res" :actions="this.searchoptions.actions.employee" @actionexecuted="this.hideresult"></employee>
<organisationunit v-else-if="res.type === 'organisationunit'" :res="res" :actions="this.searchoptions.actions.organisationunit" @actionexecuted="this.hideresult"></organisationunit>
<raum v-else-if="res.type === 'raum'" :res="res" :actions="this.searchoptions.actions.raum" @actionexecuted="this.hideresult"></raum>