mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
the calendar modal is correctly opened when the correct event is called
This commit is contained in:
@@ -5,7 +5,7 @@ import CalendarWeek from './Week.js';
|
||||
import CalendarWeeks from './Weeks.js';
|
||||
import CalendarMinimized from './Minimized.js';
|
||||
import CalendarDate from '../../composables/CalendarDate.js';
|
||||
import CalendarModal from './CalendarModal.js';
|
||||
|
||||
|
||||
// TODO(chris): week/month toggle
|
||||
|
||||
@@ -17,7 +17,6 @@ export default {
|
||||
CalendarWeek,
|
||||
CalendarWeeks,
|
||||
CalendarMinimized,
|
||||
CalendarModal
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
@@ -105,15 +104,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleInput(day) {
|
||||
// set the event when clicking on the lernveranstaltung in the data
|
||||
this.currentlySelectedEvent = day[1];
|
||||
console.log(this.currentlySelectedEvent)
|
||||
// showing the modal
|
||||
Vue.nextTick(()=>{
|
||||
this.$refs.calendarModal.show();
|
||||
})
|
||||
|
||||
console.log(day,"this is the day")
|
||||
this.$emit(day[0], day[1]);
|
||||
}
|
||||
},
|
||||
@@ -145,9 +135,8 @@ export default {
|
||||
}).observe(this.$refs.container);
|
||||
}
|
||||
},
|
||||
template: `
|
||||
template: /*html*/`
|
||||
<div ref="container" class="fhc-calendar card" :class="sizeClass">
|
||||
<calendar-modal v-if="currentlySelectedEvent" :event="currentlySelectedEvent" ref="calendarModal" />
|
||||
<component v-slot="{event}" :is="'calendar-' + mode" @update:mode="mode=$event" @change:range="$emit('change:range',$event)" @input="handleInput" >
|
||||
<!--Week Page layout-->
|
||||
<slot :event="event">
|
||||
|
||||
@@ -153,7 +153,8 @@ export default {
|
||||
this.modal = this.$refs.modalContainer.modal;
|
||||
},
|
||||
popup(options) {
|
||||
return BsModal.popup.bind(this)(null, options);
|
||||
BsModal.popup.bind(this);
|
||||
return BsModal.popup(null, options);
|
||||
},
|
||||
template: /*html*/ `
|
||||
<bs-modal v-show="!loading" ref="modalContainer" v-bind="$props" body-class="" dialog-class="modal-lg" class="bootstrap-alert" backdrop="false" >
|
||||
|
||||
Reference in New Issue
Block a user