🐛 Fix issues with UTC time handling

- Using `.setUTCHours` can cause the day to shift at specific times
This commit is contained in:
2023-06-11 23:54:18 +02:00
parent dee01cc21a
commit dac0d09167
5 changed files with 40 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
<script setup>
import { substitutions, loadingFailed } from "@/store";
import { substitutions, loadingFailed, classFilter } from "@/store";
import { getSubstitutionText, getSubstitutionColor } from "@/util";
import { computed } from "vue";
import InfoCard from "@/components/info-card.vue";
@@ -46,13 +46,19 @@ const substitutionsForDate = computed(() => {
<span class="hour">{{ substitution.lesson }}</span>
<div class="infos">
<span class="text">{{
$t(getSubstitutionText(substitution), {
subject: substitution.change.subject,
class: substitution.class.join(", "),
teacher: substitution.teacher,
new_teacher: substitution.change.teacher,
room: substitution.change.room,
})
$t(
getSubstitutionText(
substitution,
!classFilter || classFilter == "none"
),
{
subject: substitution.change.subject,
class: substitution.class.join(", "),
teacher: substitution.teacher,
new_teacher: substitution.change.teacher,
room: substitution.change.room,
}
)
}}</span>
<span class="notes" v-if="substitution.notes">
{{ $t("timetable.notes") }} {{ substitution.notes }}