Add prompt for selecting a class

This commit is contained in:
2022-07-06 18:35:42 +02:00
parent 14cf7f5f60
commit 9a5d7d5717
2 changed files with 102 additions and 0 deletions

View File

@ -1,12 +1,15 @@
<script setup>
import {
parsedTimetable,
classFilter,
classList,
substitutions,
selectedDate,
selectedDay,
} from "../store";
import { getSubstitutionColor } from "../util";
import { computed } from "vue";
import TimetableSetup from "../components/initial-setup.vue";
const timetable = computed(() => {
const currentDay = parsedTimetable.value[selectedDay.value];
@ -47,6 +50,14 @@ function isCancelled(substitution) {
}
</script>
<template>
<TimetableSetup
v-show="!classFilter || classFilter == 'none'"
title="No Class Selected"
description="Please select your class so you can view your timetable and only see substitutions that affect you. You can change this later in the settings."
selectPrompt="Select a class"
:options="classList"
v-model="classFilter"
/>
<div class="timetable">
<template v-for="(lesson, index) in timetable" :key="index">
<div class="lesson" :style="getSubstitutionColor(lesson.substitution)">