Route /dashboard to sales UI

This commit is contained in:
Your Name
2026-05-09 10:40:13 +05:00
parent 5278b9d700
commit fd1707bc58
2 changed files with 13 additions and 1 deletions
+3 -1
View File
@@ -300,7 +300,9 @@ def operator_ui() -> FileResponse:
@app.get("/dashboard")
def dashboard_ui() -> FileResponse:
# Backward-compatible entrypoint used in production bookmarks.
return operator_ui()
# Route dashboard directly to the sales cockpit so users can continue
# their sales funnel workflow from legacy /dashboard links.
return sales_ui()
@app.get("/supervisor")
+10
View File
@@ -476,6 +476,16 @@ def test_admin_ui_route_exists():
assert "admin/assets/app.js" in response.text
def test_dashboard_route_points_to_sales_ui():
client = TestClient(app)
response = client.get("/dashboard")
assert response.status_code == 200
assert "КонтурCC Продажи" not in response.text
assert "KonturCC Продажи" in response.text
assert "sales/assets/app.js" in response.text
assert 'id="salesDashboard"' in response.text
def test_supervisor_ui_uses_realtime_and_kpi_endpoints():
app_js = (Path(__file__).resolve().parents[1] / "ui" / "supervisor" / "app.js").read_text(encoding="utf-8")
index_html = (Path(__file__).resolve().parents[1] / "ui" / "supervisor" / "index.html").read_text(encoding="utf-8")