refetches the Stundenplan events also for the Stundenplan and not only for the roomplan

This commit is contained in:
SimonGschnell
2024-09-11 14:00:53 +02:00
parent aef267186f
commit 04aaefd5d8
2 changed files with 8 additions and 16 deletions
@@ -165,15 +165,6 @@ class Content_model extends DB_Model
"menu_open": false,
"aktiv": true,
"childs": []
},
{
"content_id": 1000008,
"template_kurzbz": "redirect",
"titel": "room information (to delete)",
"content": "<content><url><![CDATA[' . site_url('/CisVue/Cms/getRoomInformation/EDV_F4.26') . ']]></url><target><![CDATA[]]></target></content>",
"menu_open": false,
"aktiv": true,
"childs": []
}
]
+8 -7
View File
@@ -26,6 +26,13 @@ const app = Vue.createApp({
},
methods:{
updateRange: function (data) {
this.calendarWeek = new CalendarDate(data.start);
Vue.nextTick(() => {
this.loadEvents();
});
},
calendarDateToString: function (calendarDate) {
return calendarDate instanceof CalendarDate ?
@@ -66,17 +73,11 @@ const app = Vue.createApp({
this.events = promise_events;
});
},
},
created() {
this.loadEvents();
},
template:/*html*/`
<h2>Stundenplan</h2>
<hr>
<fhc-calendar v-slot="{event, day}" :events="events" initial-mode="week" show-weeks>
<fhc-calendar @change:range="updateRange" v-slot="{event, day}" :events="events" initial-mode="week" show-weeks>
<div type="button" class="d-flex flex-column align-items-center justify-content-evenly h-100">
<span>{{event.orig.topic}}</span>
<span v-for="lektor in event.orig.lektor">{{lektor.kurzbz}}</span>