add Standard-Kostenstelle to search result for employees

This commit is contained in:
Harald Bamberger
2022-09-21 15:23:45 +02:00
parent aa217a42d4
commit de667990a3
2 changed files with 18 additions and 5 deletions
+5 -2
View File
@@ -124,9 +124,12 @@ class SearchBarLib
ARRAY_AGG(DISTINCT(org.bezeichnung)) AS organisationunit_name,
b.uid || \''.'@'.DOMAIN.'\' AS email,
TRIM(COALESCE(k.kontakt, \'\') || \' \' || COALESCE(m.telefonklappe, \'\')) AS phone,
\''.base_url(self::PHOTO_IMG_URL).'\' || p.person_id AS photo_url
\''.base_url(self::PHOTO_IMG_URL).'\' || p.person_id AS photo_url,
ARRAY_AGG(DISTINCT(oe.bezeichnung)) AS standardkostenstelle
FROM public.tbl_mitarbeiter m
JOIN public.tbl_benutzer b ON(b.uid = m.mitarbeiter_uid)
JOIN public.tbl_benutzerfunktion bf ON bf.uid = b.uid AND bf.funktion_kurzbz = \'kstzuordnung\'
JOIN public.tbl_organisationseinheit oe ON oe.oe_kurzbz = bf.oe_kurzbz
JOIN public.tbl_person p USING(person_id)
JOIN (
SELECT o.bezeichnung, bf.uid
@@ -136,7 +139,7 @@ class SearchBarLib
AND (bf.datum_von IS NULL OR bf.datum_von <= NOW())
AND (bf.datum_bis IS NULL OR bf.datum_bis >= NOW())
GROUP BY o.bezeichnung, bf.uid
) org USING(uid)
) org ON org.uid = b.uid
LEFT JOIN (
SELECT kontakt, standort_id
FROM public.tbl_kontakt
+13 -3
View File
@@ -28,9 +28,19 @@ export default {
<div class="mb-3"></div>
<div class="searchbar_table">
<div class="searchbar_tablerow">
<div class="searchbar_tablecell">OrgEinheit</div>
<div class="searchbar_tablecell">Standard-Kostenstelle</div>
<div class="searchbar_tablecell">
<ul class="searchbar_inline_ul" v-if="res.standardkostenstelle.length > 0">
<li v-for="(stdkst, idx) in res.standardkostenstelle" :key="idx">{{ stdkst }}</li>
</ul>
<span v-else="">keine</span>
</div>
</div>
<div class="searchbar_tablerow">
<div class="searchbar_tablecell">Organisations-Einheit</div>
<div class="searchbar_tablecell">
<ul class="searchbar_inline_ul" v-if="res.organisationunit_name.length > 0">
<li v-for="(oe, idx) in res.organisationunit_name" :key="idx">{{ oe }}</li>
@@ -49,7 +59,7 @@ export default {
</div>
<div class="searchbar_tablerow">
<div class="searchbar_tablecell">Phone</div>
<div class="searchbar_tablecell">Telefon</div>
<div class="searchbar_tablecell">
<a :href="this.telurl">
{{ res.phone }}