mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 18:02:18 +00:00
Calendar: Get rid of Warnings
This commit is contained in:
@@ -117,7 +117,6 @@ const app = Vue.createApp({
|
||||
}
|
||||
}
|
||||
});
|
||||
app.use(FhcApi);
|
||||
app.use(primevue.config.default, {
|
||||
zIndex: {
|
||||
overlay: 9000,
|
||||
|
||||
@@ -266,7 +266,6 @@ const app = Vue.createApp({
|
||||
// kind of a bandaid for bad css on some pages to avoid horizontal scroll
|
||||
setScrollbarWidth();
|
||||
app.use(router);
|
||||
app.use(FhcApi);
|
||||
app.use(primevue.config.default, {
|
||||
zIndex: {
|
||||
overlay: 9000,
|
||||
|
||||
@@ -96,6 +96,7 @@ export default {
|
||||
'select:day',
|
||||
'select:event',
|
||||
'change:range',
|
||||
'change:mode',
|
||||
'update:minimized',
|
||||
'selectedEvent',
|
||||
'change:offset'
|
||||
|
||||
@@ -403,25 +403,29 @@ export default {
|
||||
<div class="all-day-event-container" >
|
||||
<div @wheel.stop class="all-day-event all-day-event-border" v-for="(day,dayindex) in eventsPerDayAndHour">
|
||||
<template v-for="(events,_day) in allDayEvents" :key="_day">
|
||||
|
||||
<div v-if="dayindex == _day" v-for="event in events" :key="event" class="d-grid m-1" style="top:0;" @click.prevent="eventClick(event)"
|
||||
:selected="event == selectedEvent"
|
||||
:style="{'background-color': event?.color, 'margin-bottom':'1px'}"
|
||||
class="small rounded overflow-hidden fhc-entry"
|
||||
v-contrast
|
||||
>
|
||||
<div class="d-none d-xl-block">
|
||||
<slot name="dayPage" :event="event" :day="day" :mobile="false">
|
||||
<p>this is a placeholder which means that no template was passed to the Calendar Page slot</p>
|
||||
</slot>
|
||||
</div>
|
||||
<div class="d-block d-xl-none">
|
||||
<slot name="dayPage" :event="event" :day="day" :mobile="true">
|
||||
<p>this is a placeholder which means that no template was passed to the Calendar Page slot</p>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div
|
||||
v-if="dayindex == _day"
|
||||
v-for="event in events"
|
||||
:key="event"
|
||||
style="top:0;"
|
||||
@click.prevent="eventClick(event)"
|
||||
:selected="event == selectedEvent"
|
||||
:style="{'background-color': event?.color, 'margin-bottom':'1px'}"
|
||||
class="d-grid m-1 small rounded overflow-hidden fhc-entry"
|
||||
v-contrast
|
||||
>
|
||||
<div class="d-none d-xl-block">
|
||||
<slot name="dayPage" :event="event" :day="day" :mobile="false">
|
||||
<p>this is a placeholder which means that no template was passed to the Calendar Page slot</p>
|
||||
</slot>
|
||||
</div>
|
||||
<div class="d-block d-xl-none">
|
||||
<slot name="dayPage" :event="event" :day="day" :mobile="true">
|
||||
<p>this is a placeholder which means that no template was passed to the Calendar Page slot</p>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@ export default {
|
||||
BsModal,
|
||||
Months
|
||||
},
|
||||
emits: [
|
||||
"change:offset"
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
syncOnNextChange: false
|
||||
|
||||
@@ -14,6 +14,9 @@ export default {
|
||||
BsModal,
|
||||
Weeks
|
||||
},
|
||||
emits: [
|
||||
"change:offset"
|
||||
],
|
||||
computed: {
|
||||
title() {
|
||||
return this.focusDate.wYear + ' KW ' + this.focusDate.w;
|
||||
@@ -28,7 +31,8 @@ export default {
|
||||
this.$refs.modalDatepickerContainer.hide()
|
||||
},
|
||||
handleHeaderClickWeek() {
|
||||
this.$refs.modalDatepickerContainer.show()
|
||||
this.$emit('updateMode', 'weeks');//
|
||||
//this.$refs.modalDatepickerContainer.show()
|
||||
},
|
||||
paneChanged(dir) {
|
||||
this.focusDate.d += dir * 7;
|
||||
|
||||
@@ -227,7 +227,7 @@ export default {
|
||||
if (event.orig.allDayEvent)
|
||||
{
|
||||
return;
|
||||
return {
|
||||
/*return {
|
||||
'z-index': '2',
|
||||
'grid-column': '1 / -1',
|
||||
'background-color': 'rgb(204, 204, 204)',
|
||||
@@ -235,7 +235,7 @@ export default {
|
||||
color: 'black',
|
||||
position: 'sticky',
|
||||
top: '44px',
|
||||
};
|
||||
};*/
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -363,10 +363,15 @@ export default {
|
||||
<div @wheel.stop class="all-day-event all-day-event-border" v-for="(day,dayindex) in eventsPerDayAndHour">
|
||||
<template v-for="(events,_day) in allDayEvents" :key="_day">
|
||||
|
||||
<div v-if="dayindex == _day" v-for="event in events" :key="event" class="d-grid m-1" style="top:0;" @click.prevent="weekPageClick(event, _day)"
|
||||
<div
|
||||
v-if="dayindex == _day"
|
||||
v-for="event in events"
|
||||
:key="event"
|
||||
style="top:0;"
|
||||
@click.prevent="weekPageClick(event, _day)"
|
||||
:selected="event == selectedEvent"
|
||||
:style="{'background-color': event?.color, 'margin-bottom':'1px'}"
|
||||
class="small rounded overflow-hidden fhc-entry"
|
||||
class="d-grid m-1 small rounded overflow-hidden fhc-entry"
|
||||
v-contrast
|
||||
>
|
||||
<slot class="p-1" name="weekPage" :event="event" :day="day">
|
||||
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
setWeek(week) {
|
||||
// TODO(chris): test is there a week jump on year select? => yes there is if the same month/day are in different weeks ... should we prevent that?
|
||||
this.focusDate.w = week;
|
||||
this.$emit('change', week);
|
||||
this.$emit('updateMode', 'week');
|
||||
},
|
||||
prev(){
|
||||
this.focusDate.y--;
|
||||
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.modal = this.$refs.modalContainer.modal;
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
return BsModal.popup.bind(this)(null, options);
|
||||
},
|
||||
template: /*html*/ `
|
||||
<bs-modal ref="modalContainer" @showBsModal="onModalShow" @hideBsModal="onModalHide" v-bind="$props" :bodyClass="''" dialogClass='modal-lg' class="bootstrap-alert" :backdrop="false" >
|
||||
<bs-modal ref="modalContainer" @showBsModal="onModalShow" v-bind="$props" :bodyClass="''" dialogClass='modal-lg' class="bootstrap-alert" :backdrop="false" >
|
||||
<template v-slot:title>
|
||||
<template v-if="event?.type=='moodle'">{{event.titel}}</template>
|
||||
<template v-else-if="event.titel">{{ event.titel + ' - ' + event.lehrfach_bez + ' [' + event.ort_kurzbz+']'}}</template>
|
||||
|
||||
@@ -62,10 +62,10 @@ export default {
|
||||
return !this.menu || !Array.isArray(this.menu) || Array.isArray(this.menu) && this.menu.length == 0;
|
||||
},
|
||||
bodyStyle() {return {};
|
||||
const bodyStyle = {};
|
||||
/*const bodyStyle = {};
|
||||
if (this.farbe)
|
||||
bodyStyle['background-color'] = '#' + this.farbe;
|
||||
return bodyStyle;
|
||||
return bodyStyle;*/
|
||||
},
|
||||
grade() {
|
||||
const languageIndex = this.$p.user_language.value === 'English' ? 1 : 0
|
||||
|
||||
@@ -26,6 +26,7 @@ const Stundenplan = {
|
||||
}
|
||||
},
|
||||
props: {
|
||||
viewData: Object, // NOTE(chris): this is inherited from router-view
|
||||
propsViewData: Object,
|
||||
rowMinHeight: {
|
||||
type: String,
|
||||
@@ -155,11 +156,13 @@ const Stundenplan = {
|
||||
},
|
||||
handleChangeMode(mode) {
|
||||
let m = mode[0].toUpperCase() + mode.slice(1)
|
||||
if(m === this.calendarMode) return
|
||||
if(m === this.calendarMode) return; // TODO(chris): check for date and lv_id too!
|
||||
const date = this.currentDay.getFullYear() + "-" +
|
||||
String(this.currentDay.getMonth() + 1).padStart(2, "0") + "-" +
|
||||
String(this.currentDay.getDate()).padStart(2, "0");
|
||||
|
||||
if (m == 'Weeks' || m == 'Years' || m == 'Months') return;
|
||||
|
||||
this.$router.push({
|
||||
name: "Stundenplan",
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user