From 7e326153a864a98d37a6f3821bc3053140219482 Mon Sep 17 00:00:00 2001 From: "s0wlz (Matthias Puchstein)" Date: Tue, 28 Apr 2026 15:39:28 +0200 Subject: [PATCH] feat(frontend): add TutorShell sidebar layout and NoteEditor with auto-save --- frontend/src/lib/components/NoteEditor.svelte | 187 ++++++++++++++++++ frontend/src/lib/components/TutorShell.svelte | 96 +++++++++ 2 files changed, 283 insertions(+) create mode 100644 frontend/src/lib/components/NoteEditor.svelte create mode 100644 frontend/src/lib/components/TutorShell.svelte diff --git a/frontend/src/lib/components/NoteEditor.svelte b/frontend/src/lib/components/NoteEditor.svelte new file mode 100644 index 0000000..62601fd --- /dev/null +++ b/frontend/src/lib/components/NoteEditor.svelte @@ -0,0 +1,187 @@ + + +
+ + +
+
Studierende
+
{present.length} anwesend · {absent.length} fehlen
+
+ + +
+ {#each present as s} + {@const isSel = s.id === selectedStudentId} + + {/each} + {#each absent as s} + + {/each} +
+ + + {#if selected} +
+ + +
+ + {initials(selected.name)} + +
+
{selected.name}
+
+ Sitzplatz {selectedAttendance?.seat_id ?? '—'} · seit {checkinTime(selected.id)} +
+
+ Präsent +
+ +
+ Notiz · Woche {String(weekNr).padStart(2, '0')} +
+ + + + +
+ {#each TAGS as tag} + + {/each} +
+ + +
+ {savedAt ? `Auto-gespeichert · ${savedAt}` : 'Noch nicht gespeichert'} + Notizen vergangener Wochen ↗ +
+ +
+ {:else} +
+ Sitz anklicken um Notiz zu schreiben +
+ {/if} + +
diff --git a/frontend/src/lib/components/TutorShell.svelte b/frontend/src/lib/components/TutorShell.svelte new file mode 100644 index 0000000..a2784c0 --- /dev/null +++ b/frontend/src/lib/components/TutorShell.svelte @@ -0,0 +1,96 @@ + + +
+ + +
+ {@render children()} +
+