From 35691b39c40ab527b52d01134171f0fcf18c892e Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Mon, 11 Nov 2024 16:15:14 +0100 Subject: [PATCH] fix(Calendar scroll): fixes the scroll feature for the Calendar --- public/js/apps/Cis/Stundenplan.js | 16 +++-------- public/js/components/Calendar/Calendar.js | 33 ++++++++++++++++++++--- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/public/js/apps/Cis/Stundenplan.js b/public/js/apps/Cis/Stundenplan.js index 6835dc3a3..1248f18e0 100644 --- a/public/js/apps/Cis/Stundenplan.js +++ b/public/js/apps/Cis/Stundenplan.js @@ -32,17 +32,7 @@ const app = Vue.createApp({ monthLastDay: function () { return this.calendarDateToString(this.calendarDate.cdLastDayOfCalendarMonth); }, - // returns the hour of the earliest event - eventsBeginnTime: function(){ - if(this.events && Array.isArray(this.events) && this.events.length > 0) - { - return parseInt(this.events.sort((a, b) => parseInt(a.beginn) - parseInt(b.beginn))[0].beginn); - } - else - { - return null; - } - }, + }, methods:{ selectDay: function(day){ @@ -64,7 +54,7 @@ const app = Vue.createApp({ 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; + this.calendarDate = new CalendarDate(end); Vue.nextTick(() => { this.loadEvents(); }); @@ -122,7 +112,7 @@ const app = Vue.createApp({

Stundenplan


- +