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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user