Defuse handled dashboard warnings and add a snooze action
CI / build-and-test (push) Canceled after 0s
CI / build-and-test (push) Canceled after 0s
Cross-class warnings (attendance, homework backlog, lateness) stayed red and at the top even after being acted on. A warning now turns gray and sorts to the bottom of its group once a recently-updated open Vorgang with a matching tag exists, or once explicitly snoozed for 1/2/4 weeks. Both are time-limited: once the grace period lapses without the underlying number actually improving, the warning goes active again on the next dashboard load - no background job needed since it's just recomputed on every RebuildAttention. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3270b48850
commit
54ad7f7419
15 files changed
+421
-18
No files matched your search
@@ -218,6 +218,14 @@ public interface IVorgangRepository
|
||||
/// Markiert den Vorgang als gelöscht, statt ihn hart zu entfernen (gleiches Muster wie Documentation).
|
||||
void Delete(Guid id);
|
||||
}
|
||||
/// Rein lokaler "Zurückstellen"-Zeitstempel für Dashboard-Warnungen je (StudentId, WarningTag) —
|
||||
/// kein Sync, siehe DashboardWarningSnooze.
|
||||
public interface IDashboardWarningSnoozeRepository
|
||||
{
|
||||
DashboardWarningSnooze? Get(Guid studentId, string warningTag);
|
||||
List<DashboardWarningSnooze> GetAll();
|
||||
void Save(DashboardWarningSnooze snooze);
|
||||
}
|
||||
public interface IWorkTaskRepository
|
||||
{
|
||||
List<WorkTask> GetByStatus(WorkTaskStatus status);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace LehrerApp.Core.Models;
|
||||
|
||||
/// <summary>
|
||||
/// "Zurückstellen" einer klassenübergreifenden Dashboard-Warnung (Fehlzeiten/Hausaufgaben/
|
||||
/// Verspätungen, siehe DashboardViewModel) für eine Person — ein rein lokaler Erinnerungs-
|
||||
/// Zeitstempel je (StudentId, WarningTag), bewusst nicht über den Sync repliziert (siehe
|
||||
/// IDashboardWarningSnoozeRepository): eher ein Job-/Fetch-Zustand als echte Fallakten-Daten wie
|
||||
/// Vorgang/Documentation.
|
||||
/// </summary>
|
||||
public class DashboardWarningSnooze
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public Guid StudentId { get; set; }
|
||||
/// Dieselben Strings wie VorgangTagDisplay.Suggestions ("Absentismus"/"Hausaufgaben"/"Verspätungen").
|
||||
public string WarningTag { get; set; } = "";
|
||||
public DateOnly SnoozedUntil { get; set; }
|
||||
}
|
||||
Reference in new issue
Block a user