💄 Add timetable design
This commit is contained in:
16
src/store.js
Normal file
16
src/store.js
Normal 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;
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user