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
@@ -49,13 +49,22 @@ public sealed class AttentionItem
|
||||
/// bei Attendance/MissingHomework/Lateness gesetzt, weil ein AttentionItem dieser Arten per
|
||||
/// Konstruktion nur entsteht, wenn der jeweilige Schwellenwert bereits überschritten ist.</summary>
|
||||
public bool IsWarningTrailing { get; }
|
||||
/// <summary>Nur bei Attendance/MissingHomework/Lateness gesetzt: ein offener Vorgang mit
|
||||
/// passendem Tag wurde kürzlich bearbeitet, oder die Warnung wurde manuell zurückgestellt (siehe
|
||||
/// DashboardViewModel.SnoozeWarningAsync) — beides zeitlich befristet, damit eine ausbleibende
|
||||
/// Besserung nach Ablauf der Frist wieder auffällt statt dauerhaft entschärft zu bleiben. Steuert
|
||||
/// nur die Optik (grau statt rot) und die Sortierung (ans Ende der Gruppe); der Schwellenwert-
|
||||
/// Vergleich selbst bleibt unverändert, die Warnung verschwindet also ganz, sobald sich die
|
||||
/// zugrunde liegende Zahl tatsächlich bessert.</summary>
|
||||
public bool IsDefused { get; }
|
||||
public IReadOnlyList<AttentionAction> Actions { get; }
|
||||
public Action? Navigate { get; }
|
||||
|
||||
public AttentionItem(AttentionKind kind, string title, string subtitle = "", string trailingText = "",
|
||||
string dateDisplay = "", bool isOverdue = false, AlertSeverity? severity = null,
|
||||
int progressPercent = 0, string progressLabel = "", bool hasProgress = false,
|
||||
bool isWarningTrailing = false, IReadOnlyList<AttentionAction>? actions = null, Action? navigate = null)
|
||||
bool isWarningTrailing = false, bool isDefused = false,
|
||||
IReadOnlyList<AttentionAction>? actions = null, Action? navigate = null)
|
||||
{
|
||||
Kind = kind;
|
||||
Title = title;
|
||||
@@ -68,6 +77,7 @@ public sealed class AttentionItem
|
||||
ProgressLabel = progressLabel;
|
||||
HasProgress = hasProgress;
|
||||
IsWarningTrailing = isWarningTrailing;
|
||||
IsDefused = isDefused;
|
||||
Actions = actions ?? [];
|
||||
Navigate = navigate;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user