From c960b4832d110794842de25d9c8caa5274dfff0a Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Mon, 17 Feb 2025 14:40:24 +0100 Subject: [PATCH] test --- public/js/api/stundenplan.js | 11 +++++++++++ public/js/apps/Dashboard/Fhc.js | 16 ++++++++-------- public/js/components/Calendar/Week/Page.js | 4 +++- public/js/components/Cis/Cms/Content.js | 2 +- public/js/components/Cis/Cms/News.js | 2 +- .../StudiengangInformation.js | 4 ++-- public/js/components/Cis/Mylv/LvUebersicht.js | 4 ++-- .../js/components/Cis/Stundenplan/Stundenplan.js | 5 +++++ 8 files changed, 33 insertions(+), 15 deletions(-) diff --git a/public/js/api/stundenplan.js b/public/js/api/stundenplan.js index 9ddbeff54..0f5de934e 100644 --- a/public/js/api/stundenplan.js +++ b/public/js/api/stundenplan.js @@ -42,4 +42,15 @@ export default { {} ); }, + getMoodleEventsByUserid(username, timestart, timeend) { + return this.$fhcApi.get( + FHC_JS_DATA_STORAGE_OBJECT.app_root + + `addons/moodle/cis/get_events_by_userid.php`, + { + username: username, + timestart: timestart, + timeend: timeend, + } + ); + }, }; \ No newline at end of file diff --git a/public/js/apps/Dashboard/Fhc.js b/public/js/apps/Dashboard/Fhc.js index 9f77d4b9b..19f6b3a2b 100644 --- a/public/js/apps/Dashboard/Fhc.js +++ b/public/js/apps/Dashboard/Fhc.js @@ -2,14 +2,14 @@ import FhcDashboard from '../../components/Dashboard/Dashboard.js'; import FhcApi from '../../plugin/FhcApi.js'; import Phrasen from '../../plugin/Phrasen.js'; import contrast from '../../directives/contrast.js'; -import {setScrollbarWidth} from "../../helpers/CssVarCalcHelpers"; -import Stundenplan from "../../components/Cis/Stundenplan/Stundenplan"; -import MylvStudent from "../../components/Cis/Mylv/Student"; -import Profil from "../../components/Cis/Profil/Profil"; -import CmsNews from "../../components/Cis/Cms/News"; -import CmsContent from "../../components/Cis/Cms/Content"; -import Info from "../../components/Cis/Mylv/Semester/Studiengang/Lv/Info"; -import RoomInformation from "../../components/Cis/Mylv/RoomInformation"; +import {setScrollbarWidth} from "../../helpers/CssVarCalcHelpers.js"; +import Stundenplan from "../../components/Cis/Stundenplan/Stundenplan.js"; +import MylvStudent from "../../components/Cis/Mylv/Student.js"; +import Profil from "../../components/Cis/Profil/Profil.js"; +import CmsNews from "../../components/Cis/Cms/News.js"; +import CmsContent from "../../components/Cis/Cms/Content.js"; +import Info from "../../components/Cis/Mylv/Semester/Studiengang/Lv/Info.js"; +import RoomInformation from "../../components/Cis/Mylv/RoomInformation.js"; const ciPath = FHC_JS_DATA_STORAGE_OBJECT.app_root.replace(/(https:|)(^|\/\/)(.*?\/)/g, '') + FHC_JS_DATA_STORAGE_OBJECT.ci_router; diff --git a/public/js/components/Calendar/Week/Page.js b/public/js/components/Calendar/Week/Page.js index 10ff6c495..b029b854a 100644 --- a/public/js/components/Calendar/Week/Page.js +++ b/public/js/components/Calendar/Week/Page.js @@ -197,7 +197,9 @@ export default { 'grid-template-columns': 'repeat(' + day.lanes + ', 1fr)', 'grid-template-rows': 'repeat(' + (this.hours.length * 60 / this.smallestTimeFrame) + ', 1fr)', } - + console.log(this.smallestTimeFrame,"this is the smallest timeframe") + console.log(this.hours.length,"this is the length of the hours") + console.log(this.hours.length/60, "this is the length of the hours multiplied by 60 resulting in minutes") if(day.isPast) { styleObj['background-color'] = '#F5E9D7' styleObj['border-color'] = '#E8E8E8'; diff --git a/public/js/components/Cis/Cms/Content.js b/public/js/components/Cis/Cms/Content.js index ed87e1aae..d657322ba 100644 --- a/public/js/components/Cis/Cms/Content.js +++ b/public/js/components/Cis/Cms/Content.js @@ -1,6 +1,6 @@ import raum_contentmittitel from './Content_types/Raum_contentmittitel.js' import general from './Content_types/General.js' -import BsConfirm from "../../Bootstrap/Confirm"; +import BsConfirm from "../../Bootstrap/Confirm.js"; export default { name: "ContentComponent", diff --git a/public/js/components/Cis/Cms/News.js b/public/js/components/Cis/Cms/News.js index 89bed18d7..1567cbef4 100644 --- a/public/js/components/Cis/Cms/News.js +++ b/public/js/components/Cis/Cms/News.js @@ -1,6 +1,6 @@ import Pagination from "../../Pagination/Pagination.js"; import StudiengangInformation from "./StudiengangInformation/StudiengangInformation.js"; -import BsConfirm from "../../Bootstrap/Confirm"; +import BsConfirm from "../../Bootstrap/Confirm.js"; export default { name: "NewsComponent", diff --git a/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js b/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js index 06743ae5d..92e303801 100644 --- a/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js +++ b/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js @@ -1,5 +1,5 @@ -import StudiengangPerson from "./StudiengangPerson"; -import StudiengangVertretung from "./StudiengangVertretung"; +import StudiengangPerson from "./StudiengangPerson.js"; +import StudiengangVertretung from "./StudiengangVertretung.js"; export default { data(){ diff --git a/public/js/components/Cis/Mylv/LvUebersicht.js b/public/js/components/Cis/Mylv/LvUebersicht.js index 6670a0c76..13972af5e 100644 --- a/public/js/components/Cis/Mylv/LvUebersicht.js +++ b/public/js/components/Cis/Mylv/LvUebersicht.js @@ -1,5 +1,5 @@ -import BsModal from "../../Bootstrap/Modal"; -import LvMenu from "./LvMenu"; +import BsModal from "../../Bootstrap/Modal.js"; +import LvMenu from "./LvMenu.js"; export default { props:{ diff --git a/public/js/components/Cis/Stundenplan/Stundenplan.js b/public/js/components/Cis/Stundenplan/Stundenplan.js index d35c9c536..ba3a3c649 100644 --- a/public/js/components/Cis/Stundenplan/Stundenplan.js +++ b/public/js/components/Cis/Stundenplan/Stundenplan.js @@ -150,6 +150,11 @@ export const Stundenplan = { }, created() { + let time_start = Math.floor(this.eventCalendarDate.firstDayOfCalendarMonth.getTime() / 1000); + let time_end = Math.floor(this.eventCalendarDate.lastDayOfCalendarMonth.getTime() / 1000); + this.$fhcApi.factory.stundenplan.getMoodleEventsByUserid('io23m005', time_start, time_end).then((response) => { + console.log(response); + }) this.$fhcApi.factory.authinfo.getAuthUID().then((res) => res.data) .then(data=>{ this.uid = data.uid;