feat(tradein/admin): audit + activity dashboards (Feature 2/3 UI) #2521

Merged
lekss361 merged 1 commit from feat/tradein-admin-dashboards into main 2026-07-13 20:45:35 +00:00

1 commit

Author SHA1 Message Date
bot-backend
d0e29ce914 feat(tradein/admin): audit + activity dashboards (Feature 2/3 UI)
All checks were successful
CI Trade-In / changes (pull_request) Successful in 7s
CI / changes (pull_request) Successful in 8s
CI Trade-In / backend-tests (pull_request) Has been skipped
CI / backend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI Trade-In / frontend-checks (pull_request) Successful in 1m1s
Admin-only read dashboards over the merged user_events audit API (#2520):
- /admin/audit — accounts table (IP/device/login/search counts) with a
  click-to-expand drilldown per account (IPs, devices, recent searches,
  recent raw activity).
- /admin/analytics — "Активность" (user-behavior analytics, distinct from
  the market-analytics overlay label): summary KPI cards, a 7/30/90-day
  events/users line chart (recharts), top-searches/top-paths/by-account
  tables.

Both pages are admin-only via the existing Topbar NAV_ITEMS admin-scopePath
convention (mirrors /scrapers) so non-admin roles never see the nav entries;
a direct-URL 403 from the API is caught and rendered as NoAccessScreen
instead of crashing, matching the RouteGuard "user" variant.
2026-07-13 23:42:06 +03:00