Add live CEO briefing, Wereldexport CRM, halal engine, and realtime cockpit.

Ship export intel with contact filters and CRM push, Herman live digest with Telegram briefing, halal recommendation engine, revenue cockpit, and dashboard polling/WebSocket fixes.
This commit is contained in:
Aissa
2026-07-19 18:25:01 +00:00
parent 544d9e611d
commit 4dd1b8265f
25 changed files with 2757 additions and 108 deletions
+9 -3
View File
@@ -5,7 +5,7 @@ from pathlib import Path
import json
from app.db import fetch_all, fetch_one
from app.services.briefing import collect_briefing_data, serialize_stats
from app.services.briefing import build_live_digest, collect_briefing_data, serialize_stats
router = APIRouter(tags=["dashboard"])
@@ -32,8 +32,14 @@ def _safe_sum(table: str, column: str, where: str = "") -> float:
def _briefing_payload(briefing: dict | None) -> dict:
"""Always use live DB stats; briefing text may be cached."""
payload: dict = {"content": None, "stats": serialize_stats(collect_briefing_data()), "created_at": None}
"""Live stats + live digest; opgeslagen briefing-tekst alleen als AI-rapport."""
live_stats = serialize_stats(collect_briefing_data())
payload: dict = {
"content": None,
"stats": live_stats,
"live_digest": build_live_digest(live_stats),
"created_at": None,
}
if not briefing:
return payload