diff --git a/src/routes/settings/timetable/+page.svelte b/src/routes/settings/timetable/+page.svelte index 6c9ed58..b2f2ac2 100644 --- a/src/routes/settings/timetable/+page.svelte +++ b/src/routes/settings/timetable/+page.svelte @@ -4,6 +4,7 @@ import { getWeekdayByAbbreviation } from '$lib/dates/dataWeekday'; import QuickActionButton from '$lib/QuickActionButton.svelte'; import I18n from '$lib/I18n.svelte'; + import { subjectsSortetCapitalized } from '../../../constants/subjecticons'; const getWeekdays = () => (Object.keys($timetable) as WeekDay[]).map((abbr) => ({ @@ -108,17 +109,25 @@ sanitizeTimetable(); }} class="rounded-sm text-light-text dark:text-light-text px-2 py-0.5 bg-gray-200" + list="subjects" /> - { - const lessons = $timetable[weekdays[j].abbr]; - const splicedLessons = lessons.toSpliced(i, 1); - - timetable.update((t) => ({ ...t, [weekdays[j].abbr]: splicedLessons })); - }} - /> + + {#each subjectsSortetCapitalized as subj} + + {#if lesson.trim()} + { + const lessons = $timetable[weekdays[j].abbr]; + const splicedLessons = lessons.toSpliced(i, 1); + + timetable.update((t) => ({ ...t, [weekdays[j].abbr]: splicedLessons })); + }} + /> + {/if} {/each}