✨ Add history view
This commit is contained in:
13
src/store.js
13
src/store.js
@ -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 = {};
|
||||
|
Reference in New Issue
Block a user