Only show changes matching the original teacher

This commit is contained in:
2022-06-02 16:35:24 +02:00
parent 5c4bf21a77
commit 5911043ca0

View File

@ -16,7 +16,9 @@ const timetable = computed(() => {
newElement.substitution = substitutions.value.find((entry) => {
const entryDay = new Date(entry.date).getTime();
return (
entry.lesson == index + 1 && entryDay == selectedDate.value.getTime()
entry.lesson == index + 1 &&
entryDay == selectedDate.value.getTime() &&
(entry.teacher == e.teacher || !entry.teacher || !e.teacher)
);
});
return newElement;