Add history view

This commit is contained in:
2022-04-30 18:21:45 +02:00
parent 63d335d04a
commit 6e118221b9
5 changed files with 166 additions and 29 deletions

View File

@ -1,8 +1,17 @@
import { computed } from "@vue/reactivity";
import { ref } from "vue";
export const timetable = ref([]);
export const substitutions = ref([]);
export const history = ref([]);
export const historyOfDate = computed(() => {
const dates = {};
for (const entry of history.value) {
const date = entry.date;
if (!dates[date]) dates[date] = [];
dates[entry.date].push(entry);
}
return dates;
});
export const substitutionsForDate = computed(() => {
const dates = {};