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
+16
View File
@@ -10,6 +10,7 @@ from typing import Any, Optional
from fastapi import APIRouter, HTTPException, Query
from app.db import execute, execute_returning, fetch_all, fetch_one, json_param
from app.halal_reco_engine import live_halal_recommendations
from app.middleware import log_agent_event
router = APIRouter(prefix="/recommendations", tags=["recommendations"])
@@ -154,6 +155,21 @@ def approve_recommendation(rec_id: int) -> dict[str, Any]:
return _serialize(row)
@router.get("/halal/live")
def halal_recommendations_live(
limit: int = Query(5, ge=1, le=20),
refresh: bool = False,
brand: str = Query("cucina"),
) -> dict[str, Any]:
"""Live halal retail kansen — divers, geen actieve partnerships, composite score."""
return live_halal_recommendations(limit=limit, refresh_scores=refresh, brand=brand)
@router.post("/halal/refresh")
def halal_recommendations_refresh(limit: int = Query(5, ge=1, le=20)) -> dict[str, Any]:
return live_halal_recommendations(limit=limit, refresh_scores=True)
@router.post("/{rec_id}/dismiss")
def dismiss_recommendation(rec_id: int) -> dict[str, Any]:
row = execute_returning(