From 2ed5df8c1c18f644bac7de3ff0aad41c9103f7dc Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Thu, 7 Nov 2024 17:01:51 +0100 Subject: [PATCH] Orgform of Stg in searchresults --- application/config/search.php | 13 ++++++++++++- .../js/components/searchbar/result/mergedperson.js | 2 +- public/js/components/searchbar/result/prestudent.js | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/application/config/search.php b/application/config/search.php index 8c601e046..3a2c27a18 100644 --- a/application/config/search.php +++ b/application/config/search.php @@ -309,7 +309,18 @@ $config['prestudent'] = [ FROM public.tbl_status WHERE status_kurzbz = public.get_rolle_prestudent(ps.prestudent_id, NULL) LIMIT 1 - ) as status" + ) AS status", + "COALESCE( + ( + SELECT COALESCE(plan.orgform_kurzbz, pss.orgform_kurzbz) + FROM public.tbl_prestudentstatus pss + LEFT JOIN lehre.tbl_studienplan plan USING (studienplan_id) + WHERE pss.prestudent_id=ps.prestudent_id + ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC + LIMIT 1 + ), + sg.orgform_kurzbz + ) AS orgform" ], 'resultjoin' => " LEFT JOIN public.tbl_prestudent ps USING (prestudent_id) diff --git a/public/js/components/searchbar/result/mergedperson.js b/public/js/components/searchbar/result/mergedperson.js index e6fc5833b..be9d1e735 100644 --- a/public/js/components/searchbar/result/mergedperson.js +++ b/public/js/components/searchbar/result/mergedperson.js @@ -139,7 +139,7 @@ export default {
{{ $p.t('lehre/studiengang') }}
- {{ student.bezeichnung }} + {{ student.bezeichnung }} {{ student.orgform ? '(' + student.orgform + ')' : '' }}
diff --git a/public/js/components/searchbar/result/prestudent.js b/public/js/components/searchbar/result/prestudent.js index 51b4ccd9b..c33877bf0 100644 --- a/public/js/components/searchbar/result/prestudent.js +++ b/public/js/components/searchbar/result/prestudent.js @@ -60,7 +60,7 @@ export default {
{{ $p.t('lehre/studiengang') }}
- {{ res.bezeichnung }} + {{ res.bezeichnung }} {{ res.orgform ? '(' + res.orgform + ')' : '' }}