Skip to content
Snippets Groups Projects
Commit 3081fcb6 authored by Julian's avatar Julian
Browse files

Use colored chips in the overlay cards

parent f80ba8f1
No related branches found
No related tags found
1 merge request!17Resolve "Show parallel lessons in timetable management view on drag of lessons"
<script> <script>
import BlockingCard from "./BlockingCard.vue"; import BlockingCard from "./BlockingCard.vue";
import ColoredShortNameChip from "../common/ColoredShortNameChip.vue";
export default { export default {
name: "TimetableOverlayCard", name: "TimetableOverlayCard",
components: {BlockingCard}, components: {ColoredShortNameChip, BlockingCard},
props: { props: {
lesson: { lesson: {
type: Object, type: Object,
...@@ -51,11 +52,11 @@ export default { ...@@ -51,11 +52,11 @@ export default {
<template> <template>
<div> <div>
<blocking-card v-if="rooms.length > 0" class="first" icon="mdi-home-off-outline" color="warning"> <blocking-card v-for="room in rooms" icon="mdi-home-off-outline" color="warning">
{{ rooms.map(room => room.shortName).join(", ") }} <colored-short-name-chip class="short" :item="room" :elevation="0"/>
</blocking-card> </blocking-card>
<blocking-card v-if="teachers.length > 0" class="second" icon="mdi-account-off-outline" color="warning"> <blocking-card v-for="teacher in teachers" icon="mdi-account-off-outline" color="warning">
{{ teachers.map(teacher => teacher.shortName).join(", ") }} <colored-short-name-chip class="short" :item="teacher" :elevation="0"/>
</blocking-card> </blocking-card>
</div> </div>
</template> </template>
...@@ -65,18 +66,11 @@ div { ...@@ -65,18 +66,11 @@ div {
grid-column: v-bind(x) / span v-bind(w); grid-column: v-bind(x) / span v-bind(w);
grid-row: v-bind(y) /span v-bind(h); grid-row: v-bind(y) /span v-bind(h);
z-index: 10; z-index: 10;
display: grid; display: flex;
grid-template-rows: auto; flex-direction: row;
grid-template-columns: 1fr 1fr; flex-wrap: nowrap;
grid-template-areas: "left right";
gap: 5px; gap: 5px;
width: 100%;
height: 100%;
} }
</style>
.first {
grid-area: left;
}
.second {
grid-area: right;
}
</style>
\ No newline at end of file
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