Skip to content
Snippets Groups Projects
Verified Commit 77bfa49d authored by permcu's avatar permcu Committed by Jonathan Weth
Browse files

Add print-button & reformat header

parent cb74184a
No related branches found
No related tags found
1 merge request!373Resolve "Substitutions table for new data model"
<script setup>
import CRUDList from "aleksis.core/components/generic/CRUDList.vue";
import PrimaryActionButton from "aleksis.core/components/generic/buttons/PrimaryActionButton.vue";
</script>
<template>
......@@ -14,43 +15,48 @@ import CRUDList from "aleksis.core/components/generic/CRUDList.vue";
:enable-edit="false"
>
<template #title>
<v-card-title class="text-h3"> {{ $d(new Date(date), "dateWithWeekday") }} </v-card-title>
<v-container>
<v-row>
<v-col cols="4"> {{ $t("chronos.substitutions.affected_teachers") }} </v-col>
<v-col cols="8">
<v-chip
v-for="(teacher, i) in affectedTeachers"
class="ma-1"
:to="{
name: 'chronos.timetableWithId',
params: {
type: 'person',
id: teacher.id,
},
}"
>
{{ teacher.shortName || teacher.fullName }}
</v-chip>
</v-col>
<v-spacer/>
<v-row class="d-flex align-center pt-2 pa-2">
<v-card-title class="text-h4"> {{ $d(new Date(date), "dateWithWeekday") }} </v-card-title>
<v-spacer/>
<primary-action-button
class="mr-4"
i18n-key="chronos.substitutions.print"
:to="{
name: 'chronos.printSubstitutionsForDate',
params: {
date: date,
},
}"
/>
</v-row>
<v-row>
<v-col> {{ $t("chronos.substitutions.affected_groups") }} </v-col>
<v-col>
<!-- TODO: Link to group-timetable as well -->
<!-- as soon as it becomes possible to resolve a -->
<!-- group-timetable from the lesson-event group too. -->
<v-chip
v-for="group in affectedGroups"
class="ma-1"
>
{{ group.shortName }}
</v-chip>
</v-col>
<v-spacer/>
</v-row>
</v-container>
<v-card-text>
<span> {{ $t("chronos.substitutions.affected_teachers") }} </span>
<v-chip
v-for="(teacher, i) in affectedTeachers"
class="ma-1"
:to="{
name: 'chronos.timetableWithId',
params: {
type: 'person',
id: teacher.id,
},
}"
>
{{ teacher.shortName || teacher.fullName }}
</v-chip>
</v-card-text>
<v-card-text>
<span> {{ $t("chronos.substitutions.affected_groups") }} </span>
<!-- TODO: Link to group-timetable as well -->
<!-- as soon as it becomes possible to resolve a -->
<!-- group-timetable from the lesson-event group too. -->
<v-chip
v-for="group in affectedGroups"
class="ma-1"
>
{{ group.shortName }}
</v-chip>
</v-card-text>
</template>
<!-- TODO: Component for strike -> bold || normal -->
<template #groups="{ item: { oldGroups, newGroups } }">
......
......@@ -23,6 +23,7 @@
"menu_title": "Stundenpläne",
"substitutions": {
"menu_title": "Vertretungen",
"print": "Drucken",
"groups": "Gruppen",
"time": "Zeit",
"teachers": "Lehrer",
......
......@@ -24,6 +24,7 @@
},
"substitutions": {
"menu_title": "Substitutions",
"print": "Print",
"groups": "Groups",
"time": "Time",
"teachers": "Teachers",
......
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