feat: Market Events — catégories, cleanup sidebar, rename

- Supprime Timeline & ImpactMonitor du routing (redirects /impact + /timeline → /market-events)
- Renomme 'Instrument Snap.' → 'Instrument Analysis' dans la sidebar
- Onglet 'Catégories & Defaults' dans Market Events: CRUD complet (créer/éditer/supprimer)
  chaque catégorie a une table d'impacts par défaut (instrument, sensibilité, direction, notes)
- impact_service: meilleur matching catégorie (sub_type fuzzy + type fallback)
- DB: delete_event_category() + DELETE /api/impact/categories/{name}

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
OpenSquared
2026-06-25 21:11:24 +02:00
parent bd28b6a73a
commit 0b1fcff49c
6 changed files with 401 additions and 26 deletions

View File

@@ -42,6 +42,15 @@ def list_categories() -> List[Dict[str, Any]]:
return cats
@router.delete("/categories/{name}")
def delete_category(name: str) -> Dict[str, Any]:
from services.database import delete_event_category
ok = delete_event_category(name)
if not ok:
raise HTTPException(404, f"Category '{name}' not found")
return {"status": "deleted", "name": name}
@router.put("/categories/{name}")
def update_category(name: str, body: CategoryUpdate) -> Dict[str, Any]:
from services.database import upsert_event_category