From e2e537b09c8c328b4ed0ace6c358a0a0c61d706f Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Tue, 18 Feb 2025 10:55:46 +0100 Subject: [PATCH] fix calendar mode watch/emit handling; WIP roomInfo routes --- public/js/apps/Dashboard/Fhc.js | 2 -- public/js/components/Calendar/Calendar.js | 4 +++ .../js/components/Cis/Mylv/RoomInformation.js | 12 ++++--- .../components/Cis/Stundenplan/Stundenplan.js | 33 ++++++++++--------- 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/public/js/apps/Dashboard/Fhc.js b/public/js/apps/Dashboard/Fhc.js index aba5d2f40..610abba0c 100644 --- a/public/js/apps/Dashboard/Fhc.js +++ b/public/js/apps/Dashboard/Fhc.js @@ -64,7 +64,6 @@ const router = VueRouter.createRouter({ name: "StundenplanNumeric", component: Stundenplan, redirect: (to) => { - debugger return { // redirect to longer Stundenplan url and map params name: "Stundenplan", params: { @@ -106,7 +105,6 @@ const router = VueRouter.createRouter({ }; }, beforeEnter: (to, from, next) => { - console.log('beforeEnter') // If missing mode or focus_date, redirect with defaults if (!to.params.mode || !to.params.focus_date) { next({ diff --git a/public/js/components/Calendar/Calendar.js b/public/js/components/Calendar/Calendar.js index f9d836bd1..9ea37c19e 100644 --- a/public/js/components/Calendar/Calendar.js +++ b/public/js/components/Calendar/Calendar.js @@ -62,6 +62,9 @@ export default { noMonthView: Boolean }, watch:{ + mode(newVal) { + console.log('mode watcher', newVal) + }, selectedEvent:{ handler(newSelectedEvent) { this.$emit('selectedEvent', newSelectedEvent); @@ -122,6 +125,7 @@ export default { this.prevMode = this.currMode; this.currMode = v; } + this.$emit('change:mode', this.currMode) } }, eventsPerDay() { diff --git a/public/js/components/Cis/Mylv/RoomInformation.js b/public/js/components/Cis/Mylv/RoomInformation.js index 10308673c..889651261 100644 --- a/public/js/components/Cis/Mylv/RoomInformation.js +++ b/public/js/components/Cis/Mylv/RoomInformation.js @@ -3,7 +3,9 @@ import CalendarDate from "../../../composables/CalendarDate.js"; import LvModal from "../../../components/Cis/Mylv/LvModal.js"; import LvInfo from "../../../components/Cis/Mylv/LvInfo.js" -export default{ +export const DEFAULT_MODE = 'Week' + +const RoomInformation = { name: "RoomInformation", props:{ ort_kurzbz: { @@ -123,7 +125,7 @@ export default{

Room Information {{ ort_kurzbz }}


- +