💄 Add timetable design

This commit is contained in:
2022-04-30 01:18:37 +02:00
parent 1050ff1344
commit 237c88789a
3 changed files with 85 additions and 3 deletions

16
src/store.js Normal file
View File

@ -0,0 +1,16 @@
import { computed } from "@vue/reactivity";
import { ref } from "vue";
export const timetable = ref([]);
export const parsedTimetable = computed(() => {
return timetable.value.map((day) => {
const newDay = [];
for (const lesson of day) {
const lessonLength = lesson.length || 1;
delete lesson.length;
for (var i = 0; i < lessonLength; i++) newDay.push(lesson);
}
return newDay;
});
});