From 56e6efe416bf06b066721db13e04e9d1b294c2f3 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Tue, 14 May 2024 15:57:48 +0200 Subject: [PATCH] WIP sql query for the raum search --- application/libraries/SearchBarLib.php | 13 +++++++++---- public/js/components/searchbar/searchbar.js | 5 ----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/application/libraries/SearchBarLib.php b/application/libraries/SearchBarLib.php index 5d60200a9..9ed8b8922 100644 --- a/application/libraries/SearchBarLib.php +++ b/application/libraries/SearchBarLib.php @@ -406,11 +406,16 @@ EOSC; ort.ort_kurzbz as ort_kurzbz, ort.gebteil as building, ort.stockwerk as floor, - ort.dislozierung as room_number - + ort.dislozierung as room_number, + CONCAT(standort.plz,\' \',standort.ort,\', \',standort.strasse,\' \\ \',ort.stockwerk,\' Stockwerk\') as strasse, + CONCAT(ort.max_person,\', davon \',ort.arbeitsplaetze,\' PC-Plätze\') as plaetze FROM public.tbl_ort as ort - - WHERE ort.ort_kurzbz like \'%'. $searchstr . '%\' GROUP BY ort.ort_kurzbz' + LEFT JOIN ( + select ort,standort_id,strasse, plz + FROM public.tbl_standort + LEFT JOIN public.tbl_adresse USING(adresse_id) + ) standort USING(standort_id) + WHERE LOWER(ort.ort_kurzbz) like LOWER(\'%'. $searchstr . '%\') ' /* org joins: diff --git a/public/js/components/searchbar/searchbar.js b/public/js/components/searchbar/searchbar.js index 41816292b..c6c3ce42d 100644 --- a/public/js/components/searchbar/searchbar.js +++ b/public/js/components/searchbar/searchbar.js @@ -26,13 +26,8 @@ export default { employee: employee, organisationunit: organisationunit }, -<<<<<<< Updated upstream - template: ` -
>>>>>> Stashed changes @focusin="this.searchfocusin" @focusout="this.searchfocusout">