mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
use teaching units for calendar
This commit is contained in:
@@ -43,7 +43,8 @@ export default {
|
||||
studiensemester_kurzbz: null,
|
||||
studiensemester_start: null,
|
||||
studiensemester_ende: null,
|
||||
uid: null
|
||||
uid: null,
|
||||
teachingunits: null
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
@@ -158,6 +159,15 @@ export default {
|
||||
.then(res => {
|
||||
this.uid = res.data.uid;
|
||||
});
|
||||
this.$api
|
||||
.call(ApiLvPlan.getStunden())
|
||||
.then(res => {
|
||||
return this.teachingunits = res.data.map(el => ({
|
||||
id: el.stunde,
|
||||
start: el.beginn,
|
||||
end: el.ende
|
||||
}));
|
||||
});
|
||||
},
|
||||
template:/*html*/`
|
||||
<div class="fhc-lvplan d-flex flex-column h-100" v-if="renderers">
|
||||
@@ -186,6 +196,7 @@ export default {
|
||||
show-btns
|
||||
:events="events || []"
|
||||
:backgrounds="backgrounds"
|
||||
:time-grid="teachingunits"
|
||||
>
|
||||
<template v-slot="{ event, mode }">
|
||||
<div
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import FhcCalendar from "../../Calendar/Base.js";
|
||||
|
||||
import ApiStudenplan from '../../../api/factory/lvPlan.js';
|
||||
import ApiLvPlan from '../../../api/factory/lvPlan.js';
|
||||
|
||||
import { useEventLoader } from '../../../composables/EventLoader.js';
|
||||
|
||||
@@ -37,7 +37,8 @@ export default {
|
||||
week: {
|
||||
collapseEmptyDays: false
|
||||
}
|
||||
}
|
||||
},
|
||||
teachingunits: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -100,8 +101,8 @@ export default {
|
||||
|
||||
const { events } = useEventLoader(rangeInterval, (start, end) => {
|
||||
return [
|
||||
$api.call(ApiStudenplan.getRoomInfo(props.propsViewData.ort_kurzbz, start.toISODate(), end.toISODate())),
|
||||
$api.call(ApiStudenplan.getOrtReservierungen(props.propsViewData.ort_kurzbz, start.toISODate(), end.toISODate()))
|
||||
$api.call(ApiLvPlan.getRoomInfo(props.propsViewData.ort_kurzbz, start.toISODate(), end.toISODate())),
|
||||
$api.call(ApiLvPlan.getOrtReservierungen(props.propsViewData.ort_kurzbz, start.toISODate(), end.toISODate()))
|
||||
];
|
||||
});
|
||||
|
||||
@@ -110,6 +111,17 @@ export default {
|
||||
events
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.$api
|
||||
.call(ApiLvPlan.getStunden())
|
||||
.then(res => {
|
||||
return this.teachingunits = res.data.map(el => ({
|
||||
id: el.stunde,
|
||||
start: el.beginn,
|
||||
end: el.ende
|
||||
}));
|
||||
});
|
||||
},
|
||||
template: /*html*/`
|
||||
<div class="fhc-roominformation d-flex flex-column h-100">
|
||||
<h2>{{ $p.t('rauminfo/rauminfo') }} {{ propsViewData.ort_kurzbz }}</h2>
|
||||
@@ -129,6 +141,7 @@ export default {
|
||||
show-btns
|
||||
:events="events || []"
|
||||
:backgrounds="backgrounds"
|
||||
:time-grid="teachingunits"
|
||||
>
|
||||
<template v-slot="{ event, mode }">
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user