From 34242e12ea79b6bf4022f3af433ab5de9a77451a Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Fri, 7 Nov 2025 02:22:21 +0100 Subject: [PATCH] Projektabgabe Uebersicht: added person status --- .../models/education/Paabgabe_model.php | 30 ++++++++++++++++++- .../ProjektabgabeUebersicht.js | 3 +- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/application/models/education/Paabgabe_model.php b/application/models/education/Paabgabe_model.php index d48ddf9a2..9bec3fcca 100644 --- a/application/models/education/Paabgabe_model.php +++ b/application/models/education/Paabgabe_model.php @@ -76,7 +76,35 @@ class Paabgabe_model extends DB_Model stg.bezeichnung AS stgbez, paabg.datum AS termin, paabg.paabgabe_id, paabg.projektarbeit_id, paabg.paabgabetyp_kurzbz, paabg.abgabedatum, abgabetyp.bezeichnung AS paabgabetyp_bezeichnung, ben.uid, pers.vorname, pers.nachname, pa.projekttyp_kurzbz, pa.titel, - UPPER(stg.typ || stg.kurzbz) AS studiengang_kuerzel + UPPER(stg.typ || stg.kurzbz) AS studiengang_kuerzel, + ( + /* show all relevant Studiengänge of person and wether it is an employee*/ + SELECT + STRING_AGG(studiengang || ' ' || last_status, ' | ') + || (CASE WHEN EXISTS ( + SELECT 1 FROM public.tbl_mitarbeiter ma + JOIN public.tbl_benutzer ben ON ma.mitarbeiter_uid = ben.uid + WHERE person_id = prestudents.person_id + AND ben.aktiv + ) THEN ' | Mitarbeiter' ELSE '' END) + FROM ( + SELECT + DISTINCT person_id, prestudent_id, UPPER(stg.typ || stg.kurzbz) AS studiengang, + get_rolle_prestudent(ps.prestudent_id, null) AS last_status + FROM + public.tbl_prestudent ps + JOIN public.tbl_studiengang stg USING (studiengang_kz) + WHERE + person_id = pers.person_id + ORDER BY + prestudent_id DESC + ) prestudents + WHERE + last_status IN ('Abgewiesener','Aufgenommener', 'Student', 'Incoming', 'Diplomand', 'Abbrecher', 'Unterbrecher', 'Absolvent') + GROUP BY + person_id + LIMIT 1; + ) AS status FROM lehre.tbl_projektarbeit pa JOIN campus.tbl_paabgabe paabg USING(projektarbeit_id) diff --git a/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js b/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js index f01c0a40c..6e73e97da 100644 --- a/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js +++ b/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js @@ -97,7 +97,8 @@ export const ProjektabgabeUebersicht = { {title: Vue.computed(() => this.$p.t('person/vorname')), field: 'vorname', widthGrow: 1}, {title: Vue.computed(() => this.$p.t('person/nachname')), field: 'nachname', widthGrow: 1}, {title: Vue.computed(() => this.$p.t('abgabetool/typ')), field: 'projekttyp_kurzbz', widthGrow: 1}, - {title: Vue.computed(() => this.$p.t('abgabetool/titel')), field: 'titel', widthGrow: 1} + {title: Vue.computed(() => this.$p.t('abgabetool/titel')), field: 'titel', widthGrow: 1}, + {title: Vue.computed(() => this.$p.t('abgabetool/status')), field: 'status', widthGrow: 1} ], persistence: false, },