Skip to content
Snippets Groups Projects

Resolve "Frontend for Models"

Merged Julian requested to merge 1-frontend-for-models into master
Compare and Show latest version
9 files
+ 297
2
Compare changes
  • Side-by-side
  • Inline
Files
9
<script>
import {defineComponent} from 'vue'
export default defineComponent({
name: "LessonCard",
props: {
lesson: {
type: Object,
required: true,
}
},
computed: {
subject() {
return this.lesson.subject || this.lesson.course.subject || {name: ""};
},
teachers() {
return this.lesson.teachers || this.lesson.course.teachers || [];
},
groups() {
return this.lesson.groups || this.lesson.course.groups || [];
},
},
})
</script>
<template>
<v-card>
<v-card-text>
<v-card-title>{{ subject.name }}</v-card-title>
<v-card-subtitle>
<span v-for="teacher in teachers">{{ teacher.shortName }}</span>
<span v-for="room in lesson.rooms">{{ room.shortName }}</span>
</v-card-subtitle>
</v-card-text>
</v-card>
</template>
<style scoped>
</style>
\ No newline at end of file
Loading