Phase 15: add Matches, Pack Store, SBC, Statistics tabs to dashboard

Matches — difficulty selector, generate opponent (shows AI squad rating
and formation), quick-score buttons (3-0 / 1-1 / 0-2), submit custom
score via POST /matches/result, inline reward display (coins, XP,
objective triggers, season points), live match history list.

Pack Store — lists all purchasable definitions from GET /packs/store
(name, description, cost, card count) with one-click Buy that calls
POST /packs/buy; coin balance refreshes after purchase.

SBC — renders all challenges with requirements as pills (min OVR,
required nations/leagues/clubs, same-club counts), card picker
(select from owned collection, click pill to remove), Submit fires
POST /sbc/submit and shows reward or validation failures; cards
re-loaded from Core after a successful submission.

Statistics — career stat grid (matches, W/D/L, win rate, goals, coin
totals, streaks, packs, SBCs), goals-by-position bar chart, paginated
match log with outcome badges and date, sourced from
GET /statistics and GET /statistics/history.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-06-25 17:27:45 -07:00
parent aabbe775b3
commit 67b84abe7c
2 changed files with 427 additions and 1 deletions
+4
View File
@@ -244,6 +244,10 @@ async fn test_dashboard_contains_key_sections() {
assert!(html.contains("tab-draft"), "draft tab missing");
assert!(html.contains("tab-market"), "market tab missing");
assert!(html.contains("tab-events"), "events tab missing");
assert!(html.contains("tab-matches"), "matches tab missing");
assert!(html.contains("tab-store"), "pack store tab missing");
assert!(html.contains("tab-sbc"), "sbc tab missing");
assert!(html.contains("tab-statistics"), "statistics tab missing");
assert!(html.contains("tab-notifications"), "notifications tab missing");
}