Add new component for displaying an attendence day
This commit is contained in:
parent
2ef998c12f
commit
34546d35e2
|
|
@ -0,0 +1,26 @@
|
||||||
|
<template>
|
||||||
|
<div class="mb-12 grid grid-cols-icon-card gap-x-4 grid-areas-icon-card">
|
||||||
|
<it-icon-calendar class="w-[60px] grid-in-icon" />
|
||||||
|
<h2 class="text-large font-bold grid-in-title">Datum</h2>
|
||||||
|
<p class="grid-in-value">{{ attendanceDay.date }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="mb-12 grid grid-cols-icon-card gap-x-4 grid-areas-icon-card">
|
||||||
|
<it-icon-location class="w-[60px] grid-in-icon" />
|
||||||
|
<h2 class="text-large font-bold grid-in-title">Standort</h2>
|
||||||
|
<p class="grid-in-value">{{ attendanceDay.location }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="grid grid-cols-icon-card content-between gap-x-4 grid-areas-icon-card">
|
||||||
|
<it-icon-trainer class="w-[60px] grid-in-icon" />
|
||||||
|
<h2 class="text-large font-bold grid-in-title">Trainer</h2>
|
||||||
|
<p class="grid-in-value">{{ attendanceDay.trainer }}</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import type { CourseSessionAttendanceDay } from "@/types";
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
attendanceDay: CourseSessionAttendanceDay;
|
||||||
|
}
|
||||||
|
defineProps<Props>();
|
||||||
|
</script>
|
||||||
|
|
@ -2,13 +2,15 @@
|
||||||
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
import { useCourseSessionsStore } from "@/stores/courseSessions";
|
||||||
import type { LearningContent } from "@/types";
|
import type { LearningContent } from "@/types";
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
import AttendanceDay from "../attendanceDay/AttendanceDay.vue";
|
||||||
|
import LearningContentSimpleLayout from "../layouts/LearningContentSimpleLayout.vue";
|
||||||
|
|
||||||
const courseSessionsStore = useCourseSessionsStore();
|
export interface Value {
|
||||||
|
|
||||||
interface Value {
|
|
||||||
description: string;
|
description: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const courseSessionsStore = useCourseSessionsStore();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
value: Value;
|
value: Value;
|
||||||
content: LearningContent;
|
content: LearningContent;
|
||||||
|
|
@ -20,12 +22,21 @@ const attendanceDay = computed(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="container-medium">
|
<LearningContentSimpleLayout
|
||||||
<div class="lg:mt-8">
|
:title="content.title"
|
||||||
<div class="text-large my-4">
|
learning-content-type="attendance_day"
|
||||||
<div v-if="attendanceDay">{{ attendanceDay }}</div>
|
>
|
||||||
<div v-else>Für diese Durchführung existieren noch keine Details</div>
|
<div class="container-medium">
|
||||||
|
<div class="lg:mt-8">
|
||||||
|
<div class="text-large my-4">
|
||||||
|
<div v-if="attendanceDay">
|
||||||
|
<AttendanceDay :attendance-day="attendanceDay" />
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
Für diese Durchführung {{ content.id }} existieren noch keine Details
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</LearningContentSimpleLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ export function learningContentTypeData(t: LearningContentType): LearningContent
|
||||||
case "feedback":
|
case "feedback":
|
||||||
return { title: "Feedback", icon: "it-icon-lc-feedback" };
|
return { title: "Feedback", icon: "it-icon-lc-feedback" };
|
||||||
case "attendance_day":
|
case "attendance_day":
|
||||||
return { title: "Feedback", icon: "it-icon-lc-exercise" };
|
return { title: "Präsenztag", icon: "it-icon-lc-training" };
|
||||||
case "placeholder":
|
case "placeholder":
|
||||||
return { title: "In Umsetzung", icon: "it-icon-lc-document" };
|
return { title: "In Umsetzung", icon: "it-icon-lc-document" };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,12 @@ module.exports = {
|
||||||
"fst fst snd snd trd trd fth fth",
|
"fst fst snd snd trd trd fth fth",
|
||||||
],
|
],
|
||||||
"rating-scale-slim": ["bar bar bar", "fst mid fth"],
|
"rating-scale-slim": ["bar bar bar", "fst mid fth"],
|
||||||
|
"icon-card": ["icon title", "icon value"]
|
||||||
},
|
},
|
||||||
gridTemplateColumns: {
|
gridTemplateColumns: {
|
||||||
"horizontal-bar-chart": "50px 1fr 300px 4fr 300px 1fr",
|
"horizontal-bar-chart": "50px 1fr 300px 4fr 300px 1fr",
|
||||||
"horizontal-bar-chart-slim": "50px 1fr 78px 4fr 78px 1fr",
|
"horizontal-bar-chart-slim": "50px 1fr 78px 4fr 78px 1fr",
|
||||||
|
"icon-card": "60px auto"
|
||||||
},
|
},
|
||||||
gridTemplateRows: {
|
gridTemplateRows: {
|
||||||
"horizontal-bar-chart": "200px 40px",
|
"horizontal-bar-chart": "200px 40px",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue