fix: dashboard stats exclude closed entries + auto-tracked deadlines

- aggregateDeadlines() now skips entries with status "inchis"
- Auto-tracked/background deadlines excluded from active/urgent/overdue counts
- Only user-created deadlines affect badge numbers
- Milestone dots vertically centered on progress bar (top-[5px], h-2.5)
- Milestone tooltips now show full date ("Data maximă: 15 februarie 2026")
- Countdown text shows date on hover too

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-12 19:13:49 +02:00
parent c892e8d820
commit 0f928b08e9
2 changed files with 32 additions and 7 deletions
@@ -225,6 +225,9 @@ export function aggregateDeadlines(entries: RegistryEntry[]): {
now.setHours(0, 0, 0, 0);
for (const entry of entries) {
// Skip closed entries — their deadlines are no longer actionable
if (entry.status === "inchis") continue;
// Check missing recipient registration for outgoing entries
if (
entry.direction === "iesit" &&
@@ -249,14 +252,21 @@ export function aggregateDeadlines(entries: RegistryEntry[]): {
}
for (const dl of entry.trackedDeadlines ?? []) {
// Skip auto-tracked/background sub-deadlines from top-level stats
const dlDef = getDeadlineType(dl.typeId);
if (dlDef?.backgroundOnly) continue;
const status = getDeadlineDisplayStatus(dl);
all.push({ deadline: dl, entry, status });
if (dl.resolution === "pending") {
active++;
if (status.variant === "yellow") urgent++;
if (status.variant === "red") overdue++;
if (status.variant === "blue") tacit++;
// Only count user-created (non-auto-track) deadlines in main stats
if (!dlDef?.autoTrack) {
active++;
if (status.variant === "yellow") urgent++;
if (status.variant === "red") overdue++;
if (status.variant === "blue") tacit++;
}
} else if (dl.resolution === "aprobat-tacit") {
tacit++;
}