From 9dfa8d13a607dbad4f87d9f875bac13b5eb02f1d Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Thu, 28 Nov 2024 12:46:23 +0100 Subject: [PATCH] feature(Mylv/Info.js): adds Profil view links to the Lektoren in MyLv Info and fixes the dupplicate lektoren names --- .../Cis/Mylv/Semester/Studiengang/Lv/Info.js | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/public/js/components/Cis/Mylv/Semester/Studiengang/Lv/Info.js b/public/js/components/Cis/Mylv/Semester/Studiengang/Lv/Info.js index 4d505a998..2c0f7f044 100644 --- a/public/js/components/Cis/Mylv/Semester/Studiengang/Lv/Info.js +++ b/public/js/components/Cis/Mylv/Semester/Studiengang/Lv/Info.js @@ -19,8 +19,16 @@ export default { info: null, }), computed: { - lektorNames() { - return this.info.lektoren.map(e => ((e.titelpre || '') + ' ' + (e.vorname || '') + ' ' + (e.nachname || '') + ' ' + (e.titelpost || '')).trim()); + lektorNamesLinks(){ + let lektorenLinks = {}; + this.info.lektoren.forEach(e => { + let name = ((e.titelpre || '') + ' ' + (e.vorname || '') + ' ' + (e.nachname || '') + ' ' + (e.titelpost || '')).trim(); + lektorenLinks[name] = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + `/Cis/Profil/View/${e.uid}`; + }); + return lektorenLinks; + }, + lektorNames(){ + return this.info.lektoren.map((e)=>((e.titelpre || '') + ' ' + (e.vorname || '') + ' ' + (e.nachname || '') + ' ' + (e.titelpost || '')).trim()); }, lvLeitung() { return this.info.lvLeitung && this.info.lvLeitung.length ? this.info.lvLeitung.map(e => ((e.titelpre || '') + ' ' + (e.vorname || '') + ' ' + (e.nachname || '') + ' ' + (e.titelpost || '')).trim()) : null; @@ -69,16 +77,11 @@ export default { this.info = infos[this.lehrveranstaltung_id]; } else { axios.get(FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + '/components/Cis/Mylv/Info/' + this.studien_semester + '/' + this.lehrveranstaltung_id).then(res => { - this.info = infos[this.lehrveranstaltung_id] = res.data.retval || []; }).catch(() => this.info = {}); } }, template: /*html*/` - -

{{$p.t('lvinfo/lehrveranstaltungsinformationen')}}


@@ -110,8 +113,8 @@ export default { {{$p.t('lehre/lehrbeauftragter')}} @@ -125,7 +128,7 @@ export default {