mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 00:24:35 +00:00
MergedPerson Results
This commit is contained in:
@@ -8,6 +8,7 @@ export default {
|
||||
},
|
||||
emits: [ 'actionexecuted' ],
|
||||
props: {
|
||||
mode: String,
|
||||
res: Object,
|
||||
actions: Object
|
||||
},
|
||||
@@ -24,14 +25,23 @@ export default {
|
||||
// Those properties should be the same in all entries
|
||||
const { person_id, name } = this.res.list[0];
|
||||
// Get first photo (prefer student photo if available)
|
||||
const photo_url = ((this.students ? this.students.find(el => el.photo_url) : null) || this.employee)?.photo_url;
|
||||
let photo_url;
|
||||
if (this.mode == 'simple') {
|
||||
let foto = (this.students ? this.students.find(el => el.foto) : null)?.foto;
|
||||
if (foto)
|
||||
foto = 'data:image/jpeg;base64,' + foto;
|
||||
photo_url = foto || this.employee?.photo_url;
|
||||
} else
|
||||
photo_url = ((this.students ? this.students.find(el => el.photo_url) : null) || this.employee)?.photo_url;
|
||||
|
||||
return { person_id, name, photo_url, email };
|
||||
},
|
||||
employee() {
|
||||
return this.res.list.find(item => [
|
||||
'employee',
|
||||
'unassigned_employee'
|
||||
'unassigned_employee',
|
||||
'mitarbeiter',
|
||||
'mitarbeiter_ohne_zuordnung'
|
||||
].includes(item.type)) || null;
|
||||
},
|
||||
students() {
|
||||
@@ -132,7 +142,12 @@ export default {
|
||||
:action="actions.defaultactionstudent || actions.defaultaction"
|
||||
@actionexecuted="$emit('actionexecuted')"
|
||||
>
|
||||
{{ student.status }} ({{ student.stg_kuerzel }})
|
||||
<template v-if="mode == 'simple'">
|
||||
{{ student.studiengang_kz }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ student.status }} ({{ student.stg_kuerzel }})
|
||||
</template>
|
||||
</template-action>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,7 @@ import organisationunit from "./organisationunit.js";
|
||||
import student from "./result/student.js";
|
||||
import prestudent from "./result/prestudent.js";
|
||||
import mergedStudent from "./result/mergedstudent.js";
|
||||
import mergedPerson from "./result/mergedperson.js";
|
||||
|
||||
export default {
|
||||
props: [ "searchoptions", "searchfunction" ],
|
||||
@@ -32,7 +33,8 @@ export default {
|
||||
organisationunit: organisationunit,
|
||||
student: student,
|
||||
prestudent: prestudent,
|
||||
mergedStudent
|
||||
mergedStudent,
|
||||
mergedPerson
|
||||
},
|
||||
template: /*html*/`
|
||||
<form ref="searchform" class="d-flex me-3" :class="searchoptions.cssclass" action="javascript:void(0);"
|
||||
@@ -61,6 +63,7 @@ export default {
|
||||
<student v-else-if="res.type === 'student' || res.type === 'studentStv'" :mode="searchmode" :res="res" :actions="this.searchoptions.actions.student" @actionexecuted="this.hideresult"></student>
|
||||
<prestudent v-else-if="res.type === 'prestudent'" :mode="searchmode" :res="res" :actions="this.searchoptions.actions.prestudent" @actionexecuted="this.hideresult"></prestudent>
|
||||
<merged-student v-else-if="res.type === 'mergedstudent'" :mode="searchmode" :res="res" :actions="this.searchoptions.actions.mergedstudent" @actionexecuted="this.hideresult"></merged-student>
|
||||
<merged-person v-else-if="res.type === 'mergedperson'" :mode="searchmode" :res="res" :actions="this.searchoptions.actions.mergedperson" @actionexecuted="this.hideresult"></merged-person>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user