✨ Add "trusted" and "source" to Timetable
This commit is contained in:
@ -22,7 +22,7 @@ watch(timetableGroups, (newValue) => {
|
||||
export const selectedDate = ref(new Date(new Date().setUTCHours(0, 0, 0, 0)));
|
||||
export const selectedDay = computed(() => selectedDate.value.getDay() - 1);
|
||||
|
||||
export const timetable = ref([]);
|
||||
export const timetable = ref({ trusted: true });
|
||||
export const substitutions = ref([]);
|
||||
export const history = ref([]);
|
||||
export const classList = ref([]);
|
||||
@ -48,7 +48,8 @@ export const substitutionsForDate = computed(() => {
|
||||
});
|
||||
|
||||
export const parsedTimetable = computed(() => {
|
||||
return timetable.value.map((day) => {
|
||||
if (!timetable.value.data) return [];
|
||||
return timetable.value.data.map((day) => {
|
||||
const newDay = [];
|
||||
for (const lesson of day) {
|
||||
var usedLesson = lesson;
|
||||
@ -76,7 +77,8 @@ export const parsedTimetable = computed(() => {
|
||||
|
||||
export const possibleTimetableGroups = computed(() => {
|
||||
const foundTimetableGroups = [];
|
||||
for (const day of timetable.value) {
|
||||
if (!timetable.value.data) return [];
|
||||
for (const day of timetable.value.data) {
|
||||
for (const lesson of day) {
|
||||
if (Array.isArray(lesson)) {
|
||||
for (const group of lesson) {
|
||||
|
Reference in New Issue
Block a user