From 603622a3f19aaa45b86c487ce49f1348dabf931e Mon Sep 17 00:00:00 2001 From: chfhtw Date: Tue, 5 Aug 2025 14:38:59 +0200 Subject: [PATCH] LvPlan use computed for lv title --- .../js/components/Cis/LvPlan/Lehrveranstaltung.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/public/js/components/Cis/LvPlan/Lehrveranstaltung.js b/public/js/components/Cis/LvPlan/Lehrveranstaltung.js index 70773dce6..4364a5df4 100644 --- a/public/js/components/Cis/LvPlan/Lehrveranstaltung.js +++ b/public/js/components/Cis/LvPlan/Lehrveranstaltung.js @@ -34,6 +34,17 @@ export default { if (isNaN(parseInt(this.propsViewData?.lv_id))) return null; return this.propsViewData.lv_id; + }, + lvTitle() { + if (this.currentLv === null) + return ''; + if (!this.lv) + return ''; + + if (this.$p.user_language.value === 'English') + return this.lv.bezeichnung_english; + + return this.lv.bezeichnung; } }, methods: { @@ -73,8 +84,8 @@ export default {

{{ $p.t('lehre/stundenplan') }} - - {{ $p.user_language.value === 'German' ? lv.bezeichnung : lv.bezeichnung_english }} + + {{ lvTitle }}