Add warning detail popup and quick blocks for Vorgänge
CI / build-and-test (push) Canceled after 0s

Dashboard warnings (attendance, homework, lateness) get a "Details" flyout
with key figures, a list of dates and the compact month calendar from the
class teacher overview, now extracted as a shared control. The calendar
now aligns days under their weekday (Mo-So header, blank leading cells).

Creating Vorgänge and documentation is supported by quick blocks with the
current figures, dated standard phrases (e.g. "Klassenleitung informiert")
and documentation templates (status snapshot, conversation, informing the
class/subject teachers, parent call, parent letter). The class teacher
Vorgänge tab uses WebUntis figures (absences across all subjects, class
register) for the same blocks and templates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-09-26 11:16:13 +02:00
1 parent 0f6cadc9c8
commit aa326cf8b6
25 files changed
+1571 -75

No files matched your search

@@ -43,6 +43,7 @@ public partial class DashboardViewModel : ObservableObject
private readonly SchoolWeatherService? _schoolWeather;
private readonly UntisHubService _untisHub;
private readonly WebUntisIntegrationService _webUntis;
private readonly StudentWarningEvidenceService _evidence;
private readonly Func<DateTime> _now;
private const int OpenExcuseMaxAgeDays = 21;
@@ -240,6 +241,11 @@ public partial class DashboardViewModel : ObservableObject
// waeren Tests fuer "kurz vor/nach Ablauf einer Wartezeit" je nach Ausfuehrungsuhrzeit
// zufaellig rot oder gruen (siehe TODO.md, Abschnitt 9, Nachtrag Uhrzeit-Wraparound).
_now = now ?? (() => DateTime.Now);
// Bewusst hier aus den ohnehin injizierten Repositories gebaut statt als weiterer
// Konstruktor-Parameter — dieselben Datenquellen wie die Warnungen selbst, und die lange
// Parameterliste (inkl. aller Test-Aufrufer) bleibt unverändert.
_evidence = new StudentWarningEvidenceService(students, participationSessions, participationEntries,
groups, sy, attendanceBalance, _now);
if (annualPlanSync is not null)
{
annualPlanSync.DataChanged += () => Avalonia.Threading.Dispatcher.UIThread.Post(LoadCalendar);
@@ -518,7 +524,8 @@ public partial class DashboardViewModel : ObservableObject
AttentionKind.Attendance, w.StudentName, trailingText: $"{w.AbsenceRatePercent:0.#} %",
isWarningTrailing: true, isDefused: isDefused,
actions: [SnoozeAction(w.StudentId, AbsentismusTag, $"Fehlzeiten – {w.StudentName}")],
navigate: () => OnNavigateToStudentCase?.Invoke(w.StudentId, AbsentismusTag, "Fehlzeiten"));
navigate: () => OnNavigateToStudentCase?.Invoke(w.StudentId, AbsentismusTag, "Fehlzeiten"),
detailFactory: () => new StudentWarningDetailViewModel(AttentionKind.Attendance, _evidence.Build(w.StudentId)));
// ── Hausaufgaben-Warnung (Nutzer-Feedback: analog zur Fehlzeiten-Warnung, klassenübergreifend) ──
@@ -552,7 +559,8 @@ public partial class DashboardViewModel : ObservableObject
AttentionKind.MissingHomework, w.StudentName, trailingText: $"{w.MissingCount} offen",
isWarningTrailing: true, isDefused: isDefused,
actions: [SnoozeAction(w.StudentId, HausaufgabenTag, $"Hausaufgaben – {w.StudentName}")],
navigate: () => OnNavigateToStudentCase?.Invoke(w.StudentId, HausaufgabenTag, "Hausaufgaben"));
navigate: () => OnNavigateToStudentCase?.Invoke(w.StudentId, HausaufgabenTag, "Hausaufgaben"),
detailFactory: () => new StudentWarningDetailViewModel(AttentionKind.MissingHomework, _evidence.Build(w.StudentId)));
// ── Verspätungs-Warnung (Nutzer-Feedback: analog zur Fehlzeiten-Warnung, klassenübergreifend) ──
//
@@ -590,7 +598,8 @@ public partial class DashboardViewModel : ObservableObject
AttentionKind.Lateness, w.StudentName, trailingText: $"{w.LateCount}× verspätet",
isWarningTrailing: true, isDefused: isDefused,
actions: [SnoozeAction(w.StudentId, VerspaetungenTag, $"Verspätungen – {w.StudentName}")],
navigate: () => OnNavigateToStudentCase?.Invoke(w.StudentId, VerspaetungenTag, "Verspätungen"));
navigate: () => OnNavigateToStudentCase?.Invoke(w.StudentId, VerspaetungenTag, "Verspätungen"),
detailFactory: () => new StudentWarningDetailViewModel(AttentionKind.Lateness, _evidence.Build(w.StudentId)));
// ── Klausurwochen (Nutzer-Feedback) ───────────────────────────────────────
//