From de667990a397ed6e931ec8e194b727843d6a3697 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Wed, 21 Sep 2022 15:23:45 +0200 Subject: [PATCH] add Standard-Kostenstelle to search result for employees --- application/libraries/SearchBarLib.php | 7 +++++-- public/js/components/searchbar/employee.js | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/application/libraries/SearchBarLib.php b/application/libraries/SearchBarLib.php index ff2ae8934..29a454de5 100644 --- a/application/libraries/SearchBarLib.php +++ b/application/libraries/SearchBarLib.php @@ -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 diff --git a/public/js/components/searchbar/employee.js b/public/js/components/searchbar/employee.js index 17ef35f8d..3cf3a1350 100644 --- a/public/js/components/searchbar/employee.js +++ b/public/js/components/searchbar/employee.js @@ -28,9 +28,19 @@ export default {
- +
-
OrgEinheit
+
Standard-Kostenstelle
+
+
    +
  • {{ stdkst }}
  • +
+ keine +
+
+ +
+
Organisations-Einheit
  • {{ oe }}
  • @@ -49,7 +59,7 @@ export default {
-
Phone
+
Telefon