From 75a028a43e2a6e67ef1a458cf99f1f5d3a875a40 Mon Sep 17 00:00:00 2001 From: Ronny Date: Sun, 12 Apr 2026 18:42:26 +0200 Subject: [PATCH] fix: show pending tips in profile, count all tips not just evaluated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Profile tip history now shows all tips (not just evaluated) - Pending tips display ⏳ badge in blue instead of hiding - Fun Facts "Tipps abgegeben" counts all tips (from tips API) - Added .badgePending CSS style Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/pages/ProfilePage.module.css | 5 +++++ frontend/src/pages/ProfilePage.tsx | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/ProfilePage.module.css b/frontend/src/pages/ProfilePage.module.css index a010046..0cf57cb 100644 --- a/frontend/src/pages/ProfilePage.module.css +++ b/frontend/src/pages/ProfilePage.module.css @@ -201,6 +201,11 @@ color: var(--text-muted); border: 1px solid var(--border-subtle); } +.badgePending { + background: rgba(75, 183, 248, 0.1); + color: var(--primary); + border: 1px solid rgba(75, 183, 248, 0.2); +} /* ── Fun stats ── */ .funStats { display: flex; flex-direction: column; gap: 12px; } diff --git a/frontend/src/pages/ProfilePage.tsx b/frontend/src/pages/ProfilePage.tsx index 5348eb2..c5999a3 100644 --- a/frontend/src/pages/ProfilePage.tsx +++ b/frontend/src/pages/ProfilePage.tsx @@ -73,21 +73,20 @@ export default function ProfilePage() { if (loading) return
; if (!stats) return
Profil nicht verfügbar.
; - const evaluatedTips = tips.filter(t => t.points !== null); - const recentTips = evaluatedTips.slice(0, 10); + const recentTips = tips.slice(0, 10); const favTip = mostCommonTip(tips); const homePct = homeWinPct(tips); function pointBadgeClass(points: number | null) { - if (points === null) return ''; + if (points === null) return styles.badgePending; if (points >= 3) return styles.badgeExact; if (points >= 1) return styles.badgeTendency; return styles.badgeWrong; } function pointLabel(points: number | null) { - if (points === null) return ''; + if (points === null) return '⏳'; if (points >= 3) return `${points} Pkt ✓✓`; if (points >= 1) return `${points} Pkt ✓`; return `${points} Pkt ✗`; @@ -203,7 +202,7 @@ export default function ProfilePage() {
📊 Tipps abgegeben - {stats.tipsCount} + {tips.length}