From bb9d4bda04156567d73b25bf75b6b94a9d56e5c5 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Mon, 17 Jun 2024 11:39:14 +0200 Subject: [PATCH] adds a general modal for the lehrveranstaltungs Uebersicht with all the links connected to the lehrveranstaltung --- public/js/apps/Dashboard/Admin.js | 2 + public/js/apps/Dashboard/Fhc.js | 2 + public/js/components/Cis/Mylv/LvUebersicht.js | 48 +++++++++++++++++++ .../components/DashboardWidget/Stundenplan.js | 23 ++++++--- 4 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 public/js/components/Cis/Mylv/LvUebersicht.js diff --git a/public/js/apps/Dashboard/Admin.js b/public/js/apps/Dashboard/Admin.js index 70254c955..e0b21cfb5 100755 --- a/public/js/apps/Dashboard/Admin.js +++ b/public/js/apps/Dashboard/Admin.js @@ -1,6 +1,7 @@ import {CoreNavigationCmpt} from '../../components/navigation/Navigation.js'; import DashboardAdmin from '../../components/Dashboard/Admin.js'; import FhcApi from '../../plugin/FhcApi.js'; +import Phrasen from '../../plugin/Phrasen.js'; const app = Vue.createApp({ data: () => ({ @@ -13,4 +14,5 @@ const app = Vue.createApp({ }); app.config.unwrapInjectedRef = true; app.use(FhcApi); +app.use(Phrasen); app.mount('#main'); diff --git a/public/js/apps/Dashboard/Fhc.js b/public/js/apps/Dashboard/Fhc.js index 89d1e2c1e..8dd8fe44b 100755 --- a/public/js/apps/Dashboard/Fhc.js +++ b/public/js/apps/Dashboard/Fhc.js @@ -1,5 +1,6 @@ import FhcDashboard from '../../components/Dashboard/Dashboard.js'; import FhcApi from '../../plugin/FhcApi.js'; +import Phrasen from '../../plugin/Phrasen.js'; const app = Vue.createApp({ data: () => ({ @@ -11,4 +12,5 @@ const app = Vue.createApp({ }); app.config.unwrapInjectedRef = true; app.use(FhcApi); +app.use(Phrasen); app.mount('#content'); diff --git a/public/js/components/Cis/Mylv/LvUebersicht.js b/public/js/components/Cis/Mylv/LvUebersicht.js new file mode 100644 index 000000000..c21cf200d --- /dev/null +++ b/public/js/components/Cis/Mylv/LvUebersicht.js @@ -0,0 +1,48 @@ +import BsModal from "../../Bootstrap/Modal"; + +export default { + + + data(){ + return { + // reactive data + items:["lehrveranstaltungsInformationen","Notenlisten","Moodle","Gesamtnote","E-mail","Pinboard","Alle Termine der LV","Anrechnung","Evaluierung","Neue Einmeldung"], + lehreinheit:null, + stg:null, + lv:null, + + result: false, + } + }, + mixins:[BsModal], + components:{ + BsModal, + }, + mounted(){ + this.modal = this.$refs.modalContainer; + }, + template:/*html*/` + + + + + + `, +}; \ No newline at end of file diff --git a/public/js/components/DashboardWidget/Stundenplan.js b/public/js/components/DashboardWidget/Stundenplan.js index 91b8d48cd..d2e1f9693 100755 --- a/public/js/components/DashboardWidget/Stundenplan.js +++ b/public/js/components/DashboardWidget/Stundenplan.js @@ -1,6 +1,8 @@ import Phrasen from '../../mixins/Phrasen.js'; import AbstractWidget from './Abstract.js'; import FhcCalendar from '../Calendar/Calendar.js'; +import LvUebersicht from '../Cis/Mylv/LvUebersicht.js'; + export default { mixins: [ @@ -8,14 +10,17 @@ export default { AbstractWidget ], components: { - FhcCalendar + FhcCalendar, + LvUebersicht, }, + data() { return { stunden: [], minimized: true, events: null, - currentDay: new Date() + currentDay: new Date(), + } }, computed: { @@ -30,9 +35,14 @@ export default { } }, methods: { - printEntry: function(item){ - console.log(item); + showLvUebersicht: function (event){ + + this.$refs.lvUebersicht.lehreinheit = event.lehreinheit_id; + this.$refs.lvUebersicht.lv = event.title; + this.$refs.lvUebersicht.stg = event.stg_typ + event.stg_kurzbz + (event.verband?'-' + event.verband:'' ); + this.$refs.lvUebersicht.show(); }, + selectDay(day) { this.currentDay = day; this.minimized = true; @@ -76,15 +86,16 @@ export default { }) .catch(err => { console.error('ERROR: ', err.response.data) }); }, - template: ` + template: /*html*/`
+
-
+
{{evt.title}}