diff --git a/application/controllers/api/frontend/v1/LvMenu.php b/application/controllers/api/frontend/v1/LvMenu.php index 45741b567..6f4f5ad97 100644 --- a/application/controllers/api/frontend/v1/LvMenu.php +++ b/application/controllers/api/frontend/v1/LvMenu.php @@ -423,7 +423,7 @@ class LvMenu extends FHCAPI_Controller { if($row->gruppe_kurzbz != '') { - $bngrp_uids = $this->Benutzergrupp_model->getUids($row->gruppe_kurzbz, $angezeigtes_stsem); + $bngrp_uids = $this->Benutzergruppe_model->getUids($row->gruppe_kurzbz, $angezeigtes_stsem); if(count($bngrp_uids) > 0) { if(!$row->mailgrp) diff --git a/public/js/apps/Cis/Stundenplan.js b/public/js/apps/Cis/Stundenplan.js index cbca415e0..cb019952c 100644 --- a/public/js/apps/Cis/Stundenplan.js +++ b/public/js/apps/Cis/Stundenplan.js @@ -11,6 +11,8 @@ const app = Vue.createApp({ events: null, calendarDate: new CalendarDate(new Date()), currentlySelectedEvent: null, + currentDay: new Date(), + minimized: false, } }, components: { @@ -32,17 +34,23 @@ const app = Vue.createApp({ }, }, methods:{ - + selectDay: function(day){ + this.currentDay = day; + }, showModal: function(event){ this.currentlySelectedEvent = event; Vue.nextTick(() => { this.$refs.lvmodal.show(); }); }, - updateRange: function (data) { - let tmp_date = new CalendarDate(data.start); + updateRange: function ({start,end}) { + + let checkDate = (date) => { + return date.m != this.calendarDate.m || date.y != this.calendarDate.y; + } + // only load month data if the month or year has changed - if(tmp_date.m != this.calendarDate.m || tmp_date.y != this.calendarDate.y){ + if (checkDate(new CalendarDate(start)) && checkDate(new CalendarDate(end))){ // reset the events before querying the new events to activate the loading spinner this.events = null; this.calendarDate = tmp_date; @@ -51,15 +59,12 @@ const app = Vue.createApp({ }); } }, - calendarDateToString: function (calendarDate) { - return calendarDate instanceof CalendarDate ? [calendarDate.y, calendarDate.m + 1, calendarDate.d].join('-') : null; }, - loadEvents: function(){ Promise.allSettled([ this.$fhcApi.factory.stundenplan.getStundenplan(this.monthFirstDay, this.monthLastDay), @@ -96,11 +101,12 @@ const app = Vue.createApp({ created(){ this.loadEvents(); }, + //TODO: Stundenplan phrase template:/*html*/`

Stundenplan


- - + + + +