Skip to content
Snippets Groups Projects
Verified Commit e9cbeb88 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Improve displaying of supervisions in calendar view

parent 089d0e07
No related branches found
No related tags found
1 merge request!339Fix some bugs with displaying lesson events
......@@ -5,13 +5,8 @@
without-location
>
<template #title>
<div
:style="{
color: currentSubject ? currentSubject.colour_fg || 'white' : 'white',
}"
>
<lesson-event-subject :event="selectedEvent" />
</div>
<v-icon class="mr-1">mdi-coffee</v-icon>
{{ $t("chronos.supervisions.title") }}
</template>
<template #badge>
<cancelled-calendar-status-chip
......@@ -94,11 +89,9 @@ import CancelledCalendarStatusChip from "aleksis.core/components/calendar/Cancel
import LessonRelatedObjectChip from "../../LessonRelatedObjectChip.vue";
import lessonEvent from "../mixins/lessonEvent";
import LessonEventSubject from "../../LessonEventSubject.vue";
export default {
name: "LessonDetails",
components: {
LessonEventSubject,
LessonRelatedObjectChip,
BaseCalendarFeedDetails,
CalendarStatusChip,
......
<template>
<base-calendar-feed-event-bar
:with-padding="false"
:without-time="true"
v-bind="$props"
>
<template #icon> </template>
<template #title>
<div
class="d-flex justify-start"
:class="{
'px-1': true,
'orange-border':
selectedEvent.meta.amended && !selectedEvent.meta.cancelled,
'red-border': selectedEvent.meta.cancelled,
'text-decoration-line-through': selectedEvent.meta.cancelled,
}"
:style="{
height: '100%',
borderRadius: '4px',
}"
>
<span
v-if="calendarType === 'month' && eventParsed.start.hasTime"
class="mr-1 font-weight-bold ml-1"
>
{{ eventParsed.start.time }}
</span>
<div
class="d-flex justify-center align-center flex-grow-1 text-truncate"
>
<div class="d-flex justify-center align-center flex-wrap text">
<v-icon size="12" color="white" class="mr-1">mdi-coffee</v-icon>
<lesson-event-old-new
v-if="!selectedEvent.meta.is_teacher || newTeachers.length > 0"
:new-items="newTeachers"
:old-items="oldTeachers"
attr="short_name"
class="mr-1"
/>
<lesson-event-old-new
:new-items="newRooms"
:old-items="oldRooms"
attr="short_name"
/>
</div>
</div>
</div>
</template>
</base-calendar-feed-event-bar>
</template>
<script>
import calendarFeedEventBarMixin from "aleksis.core/mixins/calendarFeedEventBar.js";
import BaseCalendarFeedEventBar from "aleksis.core/components/calendar/BaseCalendarFeedEventBar.vue";
import lessonEvent from "../mixins/lessonEvent";
import LessonEventOldNew from "../../LessonEventOldNew.vue";
export default {
name: "LessonEventBar",
components: {
LessonEventOldNew,
BaseCalendarFeedEventBar,
},
computed: {
selectedEvent() {
return this.event;
},
},
mixins: [calendarFeedEventBarMixin, lessonEvent],
};
</script>
<style scoped>
.orange-border {
border: 3px orange solid;
}
.red-border {
border: 3px red solid;
}
.text {
line-height: 1.1;
font-size: 12px;
}
</style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment