From f9a45a4917c0e8217528386d4354e0f513481948 Mon Sep 17 00:00:00 2001 From: chfhtw Date: Tue, 22 Jul 2025 10:45:51 +0200 Subject: [PATCH] LvPlan Now-background --- public/js/components/Cis/LvPlan/LvPlan.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/public/js/components/Cis/LvPlan/LvPlan.js b/public/js/components/Cis/LvPlan/LvPlan.js index 01b026fdd..25538bc33 100644 --- a/public/js/components/Cis/LvPlan/LvPlan.js +++ b/public/js/components/Cis/LvPlan/LvPlan.js @@ -1,4 +1,5 @@ import FhcCalendar from "../../Calendar/Base.js"; + import ApiLvPlan from '../../../api/factory/lvPlan.js'; import ApiAuthinfo from '../../../api/factory/authinfo.js'; @@ -23,6 +24,7 @@ export default { propsViewData: Object }, data() { + const now = luxon.DateTime.now().setZone(this.viewData.timezone); return { modes: { day: Vue.markRaw(ModeDay), @@ -41,11 +43,17 @@ export default { }, currentDay: this.propsViewData?.focus_date, calendarMode: this.propsViewData?.mode ?? DEFAULT_MODE_LVPLAN, - + backgrounds: [ + { + class: 'background-past', + end: now, + label: now.startOf('minute').toISOTime({ suppressSeconds: true, includeOffset: false }) + } + ], studiensemester_kurzbz: null, studiensemester_start: null, studiensemester_ende: null, - uid: null, + uid: null }; }, computed:{ @@ -151,9 +159,6 @@ export default { .then(res => { this.uid = res.data.uid; }); - /*window.addEventListener("resize", () => { - this.modeOptions.day.compact = document.body.offsetWidth < 1200; - });*/ }, template:/*html*/`
@@ -171,7 +176,7 @@ export default { ref="calendar" :date="currentDay" :modes="modes" - :modeOptions="modeOptions" + :mode-options="modeOptions" :mode="propsViewData.mode.toLowerCase()" @update:date="handleChangeDate" @update:mode="handleChangeMode" @@ -180,7 +185,7 @@ export default { :locale="$p.user_locale.value" show-btns :events="events || []" - :backgrounds="[]" + :backgrounds="backgrounds" >