CC6 Worker bd5bbe71f2 M12.7 SB: enrichment SAVE button + toast + bulk + worker dashboard
Backend (already in master via parallel commits):
- enrich_router enrich_apply now returns
  {status, applied_count, applied_fields, applied, after} so the toast
  doesn't have to count manually.
- POST /api/v2/enrich/bulk runs preview+apply on N random under-enriched
  rows of one kind, returns aggregate {processed, fields_total, items}.
- Worker dashboard: GET /api/v2/enrich/worker/status (heartbeat,
  paused, last_cycle, confidence_threshold, fields_24h, recent),
  POST /worker/pause, /worker/run-now, /worker/confidence.
- enrichment_worker honours Redis flags: cc:pgz-enricher:pause,
  :run_now, :confidence (live override). Heartbeat + last_cycle JSON +
  rolling fields_24h counter all written to Redis.
- pgz_sport_api JWT middleware now whitelists /api/v2/enrich/* under
  _PUBLIC_MUTATING_PREFIXES so the demo UI works without a bearer.

Frontend (this commit):
- Reusable toast(msg, type, duration) helper with success/error/info/warn,
  slide-up animation, auto-dismiss.
- Diff modal now has explicit  Odustani + 💾 SPREMI IZMJENE buttons;
  enrichApply consumes applied_count + applied_fields and surfaces them
  in a multi-line success toast.
- ' Obogati sve (50)' button in klubovi + sportasi list toolbars; calls
  enrichBulk() which posts to /v2/enrich/bulk with confirm dialog and
  reload-on-success.
- Audit page renders a live Enrichment Worker card: heartbeat badge,
  last-cycle stats, fields-24h, recent enrich-write rows, Pauziraj/
  Nastavi/Pokreni-odmah buttons, confidence slider 0..1. Auto-refreshes
  every 10s while the audit page is open.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 01:46:28 +02:00
S
Description
PGZ Sport Intelligence Platform
3 GiB
Languages
HTML 89.3%
Python 9.5%
Stata 0.8%
Ruby 0.2%