use studentStv in Studentenverwaltung config, add aktiv to student and studentStv result, use studentStv in searchbar component, add searchbar_inaktiv css class, use aktiv to render inactive studentStv results with css class searchbar_inaktiv

This commit is contained in:
Harald Bamberger
2024-12-13 11:25:02 +01:00
parent a3840d4c77
commit 5a174e554a
5 changed files with 28 additions and 8 deletions
+13 -4
View File
@@ -375,9 +375,11 @@ EOSC;
p.vorname || \' \' || p.nachname AS name,
CASE
when s.student_uid = \''.getAuthUID().'\' then p.foto
when p.foto IS NULL then \''.$gesperrtes_foto.'\'
when p.foto_sperre = false then p.foto
else \''.$gesperrtes_foto.'\'
end as foto
end as foto,
b.aktiv
FROM public.tbl_student s
JOIN public.tbl_studiengang stg USING(studiengang_kz)
JOIN public.tbl_benutzer b ON(b.uid = s.student_uid)
@@ -392,7 +394,10 @@ EOSC;
AND (b.uid ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
OR p.vorname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
OR p.nachname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\')
GROUP BY type, s.student_uid, s.matrikelnr, p.person_id, name, email, p.foto, s.verband, s.semester, stg.bezeichnung, stg.kurzbzlang
GROUP BY type, s.student_uid, s.matrikelnr, p.person_id, name,
email, p.foto, s.verband, s.semester, stg.bezeichnung,
stg.kurzbzlang, b.aktiv
ORDER BY b.aktiv DESC, p.nachname ASC, p.vorname ASC
');
// If something has been found then return it
@@ -416,7 +421,8 @@ EOSC;
stg.bezeichnung AS studiengang,
p.person_id AS person_id,
p.vorname || \' \' || p.nachname AS name,
p.foto
p.foto,
b.aktiv
FROM public.tbl_student s
JOIN public.tbl_studiengang stg USING(studiengang_kz)
JOIN public.tbl_benutzer b ON(b.uid = s.student_uid)
@@ -430,7 +436,10 @@ EOSC;
b.uid ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
OR p.vorname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
OR p.nachname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
GROUP BY type, s.student_uid, s.matrikelnr, p.person_id, name, email, p.foto, s.verband, s.semester, stg.bezeichnung, stg.kurzbzlang
GROUP BY type, s.student_uid, s.matrikelnr, p.person_id, name,
email, p.foto, s.verband, s.semester, stg.bezeichnung,
stg.kurzbzlang, b.aktiv
ORDER BY b.aktiv DESC, p.nachname ASC, p.vorname ASC
');
// If something has been found then return it
@@ -110,3 +110,7 @@
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE/Edge */
}
.searchbar_inaktiv {
opacity: .6;
}
@@ -70,7 +70,7 @@ export default {
cssclass: "position-relative",
calcheightonly: true,
types: [
"student",
"studentStv",
"prestudent"
],
actions: {
+1 -1
View File
@@ -52,7 +52,7 @@ export default {
<div v-else-if="searchresult.length < 1">Es wurden keine Ergebnisse gefunden.</div>
<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="res" :actions="this.searchoptions.actions.student" @actionexecuted="this.hideresult"></student>
<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>
<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>
+9 -2
View File
@@ -9,7 +9,7 @@ export default {
},
emits: [ 'actionexecuted' ],
template: `
<div class="searchbar_result searchbar_student">
<div class="searchbar_result searchbar_student" :class="(!res?.aktiv) ? 'searchbar_inaktiv' : ''">
<div class="searchbar_grid">
<div class="searchbar_icon">
@@ -29,7 +29,14 @@ export default {
<div class="mb-3"></div>
<div class="searchbar_table">
<div class="searchbar_tablerow">
<div class="searchbar_tablecell">Student UID</div>
<div class="searchbar_tablecell">
{{ res.uid }}
</div>
</div>
<div class="searchbar_tablerow">
<div class="searchbar_tablecell">Studiengang</div>
<div class="searchbar_tablecell">