From 7f630f24d5b3157cea701ea517e83bce72f19d63 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Tue, 26 May 2026 07:54:41 +0200 Subject: [PATCH 1/7] StundenplanLib: check array index access before --- application/libraries/StundenplanLib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/libraries/StundenplanLib.php b/application/libraries/StundenplanLib.php index 0ee80fa86..a7bec61ec 100644 --- a/application/libraries/StundenplanLib.php +++ b/application/libraries/StundenplanLib.php @@ -360,7 +360,10 @@ class StundenplanLib if (isError($ort_content_object)) { return error(getData($ort_content_object)); } - $ort_content_object = getData($ort_content_object)[0]; + $ort_content_object_data = getData($ort_content_object); + $ort_content_object = (is_array($ort_content_object_data) && count($ort_content_object_data) > 0) + ? $ort_content_object_data[0] + : null; if($ort_content_object) { $item->ort_content_id = $ort_content_object->content_id; } From fa58635a22d9555172df7938fd0d713d31df0edc Mon Sep 17 00:00:00 2001 From: adisposkofh Date: Mon, 11 May 2026 16:47:41 +0200 Subject: [PATCH 2/7] positioning of profile cards 'quick links' and 'calendar sync' --- .../Cis/Profil/MitarbeiterProfil.js | 82 +++++++++++-------- .../Cis/Profil/MitarbeiterViewProfil.js | 27 +++--- public/js/components/Cis/Profil/Profil.js | 1 + .../js/components/Cis/Profil/StudentProfil.js | 53 +++++++----- .../Cis/Profil/StudentViewProfil.js | 15 ++-- 5 files changed, 102 insertions(+), 76 deletions(-) diff --git a/public/js/components/Cis/Profil/MitarbeiterProfil.js b/public/js/components/Cis/Profil/MitarbeiterProfil.js index 58b9bfc09..bccbf4eb5 100644 --- a/public/js/components/Cis/Profil/MitarbeiterProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterProfil.js @@ -338,8 +338,8 @@ export default {
-
- +
+
+
-
@@ -367,30 +367,42 @@ export default {
+
-
+ +
+
+ +
+
+ +
+
+ +
+
+
-
+
-
+
-
@@ -412,9 +424,9 @@ export default {
+
-
@@ -439,8 +451,8 @@ export default {
+
-
+
-
-
-
- -
-
@@ -485,29 +492,36 @@ export default {
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
diff --git a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js index a1cf77aea..3362b56d7 100644 --- a/public/js/components/Cis/Profil/MitarbeiterViewProfil.js +++ b/public/js/components/Cis/Profil/MitarbeiterViewProfil.js @@ -225,15 +225,6 @@ export default {
- - -
@@ -242,27 +233,33 @@ export default {
+
-
+ +
+
+ +
+
+
-
+
-
@@ -284,15 +281,15 @@ export default {
- -
+ +
+
-
diff --git a/public/js/components/Cis/Profil/Profil.js b/public/js/components/Cis/Profil/Profil.js index cba34951c..ab7eb0f3d 100644 --- a/public/js/components/Cis/Profil/Profil.js +++ b/public/js/components/Cis/Profil/Profil.js @@ -176,6 +176,7 @@ export const Profil = { this.data = data.profil_data.data; this.calendarSyncUrls = data.calendar_sync_urls ?? []; this.authPermissions = data.permissions; + console.log(data.profil_data); }, zustellAdressenCount() { if (!this.data || !this.data.adressen) { diff --git a/public/js/components/Cis/Profil/StudentProfil.js b/public/js/components/Cis/Profil/StudentProfil.js index 9b0367f84..ac4f367b5 100644 --- a/public/js/components/Cis/Profil/StudentProfil.js +++ b/public/js/components/Cis/Profil/StudentProfil.js @@ -292,14 +292,13 @@ export default {
+
-
-
@@ -308,30 +307,42 @@ export default {
+
-
+ +
+
+ +
+
+ +
+
+ +
+
+
-
+
-
+
-
@@ -354,9 +365,9 @@ export default {
+
-
@@ -408,11 +419,6 @@ export default {
-
-
- -
-
@@ -426,9 +432,21 @@ export default {
+ +
+
+ +
+
+ +
+
+ +
+
+
-
@@ -438,18 +456,13 @@ export default {
+
-
-
-
-
- -
-
+
diff --git a/public/js/components/Cis/Profil/StudentViewProfil.js b/public/js/components/Cis/Profil/StudentViewProfil.js index 426bb9df3..cca9b22a5 100644 --- a/public/js/components/Cis/Profil/StudentViewProfil.js +++ b/public/js/components/Cis/Profil/StudentViewProfil.js @@ -121,12 +121,12 @@ export default {
- -
-
- -
-
+ +
+
+ +
+
@@ -155,7 +155,8 @@ export default {
-
+ +
From 23506430b135d1250e4feb8e9acd9ac28182e684 Mon Sep 17 00:00:00 2001 From: adisposkofh Date: Mon, 11 May 2026 17:35:09 +0200 Subject: [PATCH 3/7] initializing stg org lv plan with provided url params --- public/js/components/Cis/LvPlan/StgOrg.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/js/components/Cis/LvPlan/StgOrg.js b/public/js/components/Cis/LvPlan/StgOrg.js index 3a42505e9..5b6ddb8e6 100644 --- a/public/js/components/Cis/LvPlan/StgOrg.js +++ b/public/js/components/Cis/LvPlan/StgOrg.js @@ -319,6 +319,10 @@ export default { this.loadListGroup(); } } + + if (this.formData.stgkz) { + this.loadLvPlan(); + } }, template: `
From fa91e204f03e7d0070d7b61dbf4ad015458ae45f Mon Sep 17 00:00:00 2001 From: adisposkofh Date: Tue, 26 May 2026 12:02:08 +0200 Subject: [PATCH 4/7] always displaying timeslot on calendar event in list view --- public/js/components/Calendar/LvPlan.js | 3 +++ public/js/components/Calendar/Widget.js | 1 + .../Cis/Renderer/Lehreinheit/calendarEvent.js | 22 ++++++++++++++--- .../Renderer/Reservierungen/calendarEvent.js | 24 +++++++++++++++---- 4 files changed, 43 insertions(+), 7 deletions(-) diff --git a/public/js/components/Calendar/LvPlan.js b/public/js/components/Calendar/LvPlan.js index 99c7ba8ef..97246a5d4 100644 --- a/public/js/components/Calendar/LvPlan.js +++ b/public/js/components/Calendar/LvPlan.js @@ -194,6 +194,9 @@ export default { v-else :is="renderers[event.type]?.calendarEvent" :event="event" + :timeSlotDisplayBehavior=" + $props.mode.toLowerCase() === 'list' ? 'always' : 'default' + " >
diff --git a/public/js/components/Calendar/Widget.js b/public/js/components/Calendar/Widget.js index 54109268e..2266ce422 100644 --- a/public/js/components/Calendar/Widget.js +++ b/public/js/components/Calendar/Widget.js @@ -97,6 +97,7 @@ export default {
diff --git a/public/js/components/Cis/Renderer/Lehreinheit/calendarEvent.js b/public/js/components/Cis/Renderer/Lehreinheit/calendarEvent.js index fa3ea6618..652b29645 100644 --- a/public/js/components/Cis/Renderer/Lehreinheit/calendarEvent.js +++ b/public/js/components/Cis/Renderer/Lehreinheit/calendarEvent.js @@ -3,6 +3,11 @@ export default { event: { type: Object, required: true + }, + timeSlotDisplayBehavior: { + type: String, + default: "default", + // options: default, always, never } }, computed:{ @@ -50,7 +55,17 @@ export default { return luxon.Duration .fromISOTime(this.event.ende) .toISOTime({ suppressSeconds: true }); - } + }, + timeSlotDisplayClasses() { + switch (this.$props.timeSlotDisplayBehavior) { + case "always": + return "d-grid"; + case "never": + return "d-none"; + default: + return "d-none d-xl-grid"; + } + }, }, template: /*html*/`
{{ start }} {{ end }} diff --git a/public/js/components/Cis/Renderer/Reservierungen/calendarEvent.js b/public/js/components/Cis/Renderer/Reservierungen/calendarEvent.js index 2447c4f61..181ef29bd 100644 --- a/public/js/components/Cis/Renderer/Reservierungen/calendarEvent.js +++ b/public/js/components/Cis/Renderer/Reservierungen/calendarEvent.js @@ -3,6 +3,11 @@ export default { event: { type: Object, required: true + }, + timeSlotDisplayBehavior: { + type: String, + default: "default", + // options: default, always, never } }, computed: { @@ -50,21 +55,33 @@ export default { return luxon.Duration .fromISOTime(this.event.ende) .toISOTime({ suppressSeconds: true }); - } + }, + timeSlotDisplayClasses() { + switch (this.$props.timeSlotDisplayBehavior) { + case "always": + return "d-grid"; + case "never": + return "d-none"; + default: + return "d-none d-xl-grid"; + } + }, }, template: /* html */`
{{ start }} {{ end }}
{{ event.topic }} + {{ event.ort_kurzbz }} ... +{{ event.lektor.length - 3 }} - {{ event.ort_kurzbz }}
`, From d7b2964e4e40cf1146f3244406112e9feb1a8a02 Mon Sep 17 00:00:00 2001 From: adisposkofh Date: Tue, 26 May 2026 17:33:38 +0200 Subject: [PATCH 5/7] obsolete use of viewData object from cisRouterView --- .../Cis/ProjektabgabeUebersicht.php | 8 +------- .../v1/education/PaabgabeUebersicht.php | 14 +++++++++++++- public/js/api/factory/paabgabeUebersicht.js | 6 ++++++ .../ProjektabgabeUebersicht.js | 19 ++++++++++++------- public/js/components/filter/Filter/Config.js | 1 + 5 files changed, 33 insertions(+), 15 deletions(-) diff --git a/application/controllers/Cis/ProjektabgabeUebersicht.php b/application/controllers/Cis/ProjektabgabeUebersicht.php index 62c46dd5f..e7ce692f0 100644 --- a/application/controllers/Cis/ProjektabgabeUebersicht.php +++ b/application/controllers/Cis/ProjektabgabeUebersicht.php @@ -25,12 +25,6 @@ class ProjektabgabeUebersicht extends Auth_Controller */ public function index() { - // TODO create permission - $viewData = array( - 'uid' => getAuthUID(), - 'showEdit' => true - ); - - $this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'ProjektabgabeUebersicht']); + $this->load->view('CisRouterView/CisRouterView.php', ['route' => 'ProjektabgabeUebersicht']); } } diff --git a/application/controllers/api/frontend/v1/education/PaabgabeUebersicht.php b/application/controllers/api/frontend/v1/education/PaabgabeUebersicht.php index 13824d6df..f4efe2942 100644 --- a/application/controllers/api/frontend/v1/education/PaabgabeUebersicht.php +++ b/application/controllers/api/frontend/v1/education/PaabgabeUebersicht.php @@ -27,11 +27,12 @@ class PaabgabeUebersicht extends FHCAPI_Controller public function __construct() { parent::__construct([ + 'viewData' => self::PERM_LOGGED, 'getPaAbgaben' => array('lehre/abgabetool:r'), 'getStudiengaenge' => array('lehre/abgabetool:r'), 'getTermine' => array('lehre/abgabetool:r'), 'getPaAbgabetypen' => array('lehre/abgabetool:r'), - 'downloadZip' => array('lehre/abgabetool:r') + 'downloadZip' => array('lehre/abgabetool:r'), //'downloadProjektarbeit' => array('lehre/abgabetool:r') ]); @@ -45,6 +46,17 @@ class PaabgabeUebersicht extends FHCAPI_Controller ]); } + public function viewData() + { + $viewData = [ + "uid" => getAuthUID(), + // TODO create permission + "showEdit" => true, + ]; + + $this->terminateWithSuccess($viewData); + } + /** * Get Projektabgaben for search criteria. */ diff --git a/public/js/api/factory/paabgabeUebersicht.js b/public/js/api/factory/paabgabeUebersicht.js index 35120d2ab..bea754a14 100644 --- a/public/js/api/factory/paabgabeUebersicht.js +++ b/public/js/api/factory/paabgabeUebersicht.js @@ -26,5 +26,11 @@ export default { method: 'get', url: '/api/frontend/v1/education/PaabgabeUebersicht/getPaAbgabetypen' }; + }, + getViewData() { + return { + method: 'get', + url: '/api/frontend/v1/education/PaabgabeUebersicht/viewData' + }; } }; \ No newline at end of file diff --git a/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js b/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js index 4a36339a8..ea5471280 100644 --- a/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js +++ b/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js @@ -4,9 +4,6 @@ import Loader from "../../Loader.js"; export const ProjektabgabeUebersicht = { name: "ProjektabgabeUebersicht", - props: { - viewData: Object // NOTE: this is inherited from router-view - }, components: { CoreFilterCmpt, Loader @@ -60,7 +57,7 @@ export const ProjektabgabeUebersicht = { }); container.append(downloadButton); - if (this.viewData.showEdit) + if (this.showEdit) { let editButton = document.createElement('button'); editButton.className = 'btn btn-outline-secondary'; @@ -116,7 +113,9 @@ export const ProjektabgabeUebersicht = { this.tableBuiltResolve() } } - ]}; + ], + showEdit: null, + }; }, methods: { tableResolve(resolve) { @@ -220,7 +219,12 @@ export const ProjektabgabeUebersicht = { if (this.selectedTermin) url.searchParams.append('abgabedatum', this.selectedTermin); if (this.personSearchString) url.searchParams.append('personSearchString', this.personSearchString); window.open(url.toString(), '_blank'); - } + }, + async getViewData() { + const viewDataResponse = await this.$api.call(ApiPaabgabe.getViewData()); + const viewData = viewDataResponse.data; + this.showEdit = viewData.showEdit; + }, }, computed: { isDarkMode() { @@ -236,7 +240,8 @@ export const ProjektabgabeUebersicht = { return FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + '/api/frontend/v1/education/PaabgabeUebersicht/downloadZip'; } }, - created() { + async created() { + await this.getViewData(); this.phrasenPromise = this.$p.loadCategory(['abgabetool', 'global', 'person', 'ui']); this.phrasenPromise.then(()=> {this.phrasenResolved = true}); }, diff --git a/public/js/components/filter/Filter/Config.js b/public/js/components/filter/Filter/Config.js index 3c75c5a3c..3cee5f3e1 100644 --- a/public/js/components/filter/Filter/Config.js +++ b/public/js/components/filter/Filter/Config.js @@ -75,6 +75,7 @@ export default { }, methods: { switchFilter(evt) { + console.log(evt); this.$emit('switchFilter', evt.currentTarget.value); }, applyFilterConfig() { From 8e569a9ccdf09b847395760c52b2d2fecf8368d1 Mon Sep 17 00:00:00 2001 From: adisposkofh Date: Wed, 27 May 2026 10:43:28 +0200 Subject: [PATCH 6/7] displaying forbidden room reservation slots --- public/js/components/Calendar/Base/Grid.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/js/components/Calendar/Base/Grid.js b/public/js/components/Calendar/Base/Grid.js index 1a10533b3..f52cd2509 100644 --- a/public/js/components/Calendar/Base/Grid.js +++ b/public/js/components/Calendar/Base/Grid.js @@ -19,7 +19,8 @@ export default { originalBackgrounds: "backgrounds", dropAllowed: "dropAllowed", timezone: "timezone", - reservierbar: "isReservierbar" + reservierbar: "isReservierbar", + reservierbarMap: "reservierbarMap", }, provide() { return { @@ -426,7 +427,8 @@ export default { v-cal-click:slot="{ date, part }" >
- + +
From fc79f927966c772de4eaba69c6b14791893c6b3d Mon Sep 17 00:00:00 2001 From: adisposkofh Date: Wed, 27 May 2026 15:35:45 +0200 Subject: [PATCH 7/7] added 'add reservation'/'reservation not allowed' tooltips in calendar --- public/js/components/Calendar/Base/Grid.js | 4 +++ system/phrasesupdate.php | 40 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/public/js/components/Calendar/Base/Grid.js b/public/js/components/Calendar/Base/Grid.js index f52cd2509..91f954d35 100644 --- a/public/js/components/Calendar/Base/Grid.js +++ b/public/js/components/Calendar/Base/Grid.js @@ -329,6 +329,9 @@ export default { return !dayEvents.some(ev => ev.start < end && ev.end > start); } }, + created() { + this.$p.loadCategory(["LvPlan"]); + }, beforeUnmount() { this.disableAutoScroll(); }, @@ -425,6 +428,7 @@ export default { class="fhc-calendar-empty-slot" style="position:absolute; inset:0; z-index:1" v-cal-click:slot="{ date, part }" + :title="this.reservierbarMap?.[date.toISODate()] ? $p.t('LvPlan/add_reservation') : $p.t('LvPlan/reservation_not_allowed')" >
diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index a2d0364cd..ec35a0718 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -29924,6 +29924,46 @@ array( ) ) ), + array( + 'app' => 'core', + 'category' => 'LvPlan', + 'phrase' => 'add_reservation', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Reservierung hinzufügen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Add reservation', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'LvPlan', + 'phrase' => 'reservation_not_allowed', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Reservierung nicht erlaubt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Reservation not allowed', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), // LvPlan Phrasen ende //ProfilUpdate Phrasen start array(