Add timetable group feature

This commit is contained in:
2022-06-13 00:28:43 +02:00
parent cc56c7ae7c
commit 813c936c4f
3 changed files with 73 additions and 7 deletions

View File

@ -1,6 +1,11 @@
<script setup>
import { classList } from "../store";
import { substitutionFilter, timetableClass } from "../store";
import {
classList,
possibleTimetableGroups,
substitutionFilter,
timetableClass,
timetableGroups,
} from "../store";
// eslint-disable-next-line no-undef
const gitHash = GITVERSION;
@ -35,6 +40,23 @@ const gitHash = GITVERSION;
</option>
</select>
<div class="spacer"></div>
<h2>Timetable Groups</h2>
<p>
The a timetable group defines, which lesson should be displayed, and for
which substitution should be shown if there are multiple possibilities for
a single lesson within one class.
</p>
<select v-model="timetableGroups" multiple>
<option value="none">None</option>
<option
v-for="option in possibleTimetableGroups"
:value="option"
:key="option"
>
{{ option }}
</option>
</select>
<div class="spacer"></div>
<h2>About</h2>
<p>
This Tool queries and parses the latest timetable data every minute. The
@ -69,6 +91,10 @@ select {
border-radius: 5px;
}
select[multiple] {
min-width: 90px;
}
.spacer {
display: block;
margin: 15px 0;

View File

@ -69,12 +69,14 @@ function isCancelled(substitution) {
<s>{{ lesson.teacher }}</s>
{{ lesson.substitution.change.teacher }},
</span>
<span class="info" v-else> {{ lesson.teacher }}, </span>
<span class="info" v-else> {{ lesson.teacher }}</span>
<!-- Room changed -->
<span class="info" v-if="isChanged(lesson, 'room')">
<s>{{ lesson.room }}</s> {{ lesson.substitution.change.room }}
</span>
<span class="info" v-else>{{ lesson.room }}</span>
<span class="info" v-else-if="lesson.room"
>, {{ lesson.room }}</span
>
<!-- Show notes if available -->
<span class="info" v-if="getNotes(lesson.substitution)"
>, Notes: {{ getNotes(lesson.substitution) }}