From 16f90604b6ef94feea16ab60fa02e9e618ebfe13 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Fri, 24 May 2024 11:17:06 +0200 Subject: [PATCH] stundenplan modal for LVs and making calendar header sticky --- public/js/apps/Cis/Stundenplan.js | 2 + public/js/components/Calendar/Calendar.js | 2 +- .../js/components/Calendar/CalendarModal.js | 43 +++++++++++++++++-- public/js/components/Calendar/Pane.js | 3 +- public/js/components/Calendar/Week/Page.js | 6 +-- 5 files changed, 47 insertions(+), 9 deletions(-) diff --git a/public/js/apps/Cis/Stundenplan.js b/public/js/apps/Cis/Stundenplan.js index eaa75bca3..25823b193 100755 --- a/public/js/apps/Cis/Stundenplan.js +++ b/public/js/apps/Cis/Stundenplan.js @@ -1,4 +1,5 @@ import FhcCalendar from "../../components/Calendar/Calendar.js"; +import Phrasen from "../../plugin/Phrasen.js"; const app = Vue.createApp({ components: { @@ -50,4 +51,5 @@ const app = Vue.createApp({ } }); app.config.unwrapInjectedRef = true; +app.use(Phrasen); app.mount('#content'); \ No newline at end of file diff --git a/public/js/components/Calendar/Calendar.js b/public/js/components/Calendar/Calendar.js index ae36eab1f..2b4f7b8a3 100755 --- a/public/js/components/Calendar/Calendar.js +++ b/public/js/components/Calendar/Calendar.js @@ -106,7 +106,7 @@ export default { methods: { handleInput(day) { // set the event when clicking on the lernveranstaltung in the data - this.currentlySelectedEvent = day; + this.currentlySelectedEvent = day[1]; console.log(this.currentlySelectedEvent) // showing the modal Vue.nextTick(()=>{ diff --git a/public/js/components/Calendar/CalendarModal.js b/public/js/components/Calendar/CalendarModal.js index f8bf57de6..5f6fd9d09 100644 --- a/public/js/components/Calendar/CalendarModal.js +++ b/public/js/components/Calendar/CalendarModal.js @@ -133,7 +133,16 @@ export default { } }, }, - computed: {}, + computed: { + start_time: function(){ + if(!this.data.start) return 'N/A'; + return this.data.start.getHours() + ":" + this.data.start.getMinutes(); + }, + end_time: function(){ + if(!this.data.end) return 'N/A'; + return this.data.end.getHours() + ":" + this.data.end.getMinutes(); + } + }, created() { console.log("this is an test") }, @@ -145,11 +154,37 @@ export default { }, template: /*html*/ ` - + - + + + `, }; diff --git a/public/js/components/Calendar/Pane.js b/public/js/components/Calendar/Pane.js index bbc21af0c..8ff9b6259 100755 --- a/public/js/components/Calendar/Pane.js +++ b/public/js/components/Calendar/Pane.js @@ -46,7 +46,8 @@ export default { }, template: `