Upgrade system admin dashboard to v2
This commit is contained in:
@@ -10,7 +10,9 @@ from app.core.security.session_auth import get_current_user
|
||||
from app.core.templating import templates
|
||||
from app.modules.core.rbac.deps import get_user_permissions, get_user_roles
|
||||
from app.modules.system_admin_dashboard.service import (
|
||||
get_billing_readiness,
|
||||
get_catalogue_summary,
|
||||
get_firm_setup_health,
|
||||
get_overview,
|
||||
get_recent_audit_logs,
|
||||
get_report_cards,
|
||||
@@ -26,9 +28,11 @@ router = APIRouter(prefix="/system-admin", tags=["system-admin-dashboard-ui"])
|
||||
_ALLOWED_TABS = {
|
||||
"overview",
|
||||
"firms",
|
||||
"firm-setup-health",
|
||||
"catalogue",
|
||||
"smtp",
|
||||
"storage",
|
||||
"billing",
|
||||
"reports",
|
||||
"wizards",
|
||||
"audit-logs",
|
||||
@@ -99,16 +103,20 @@ def dashboard_tab(request: Request, tab_name: str):
|
||||
extra["overview"] = get_overview(db)
|
||||
elif tab_name == "firms":
|
||||
extra["firms"] = list_firms(db)
|
||||
elif tab_name == "firm-setup-health":
|
||||
extra["health"] = get_firm_setup_health(db)
|
||||
elif tab_name == "catalogue":
|
||||
extra["catalogue"] = get_catalogue_summary(db)
|
||||
elif tab_name == "smtp":
|
||||
extra["smtp"] = get_smtp_summary(db)
|
||||
elif tab_name == "storage":
|
||||
extra["storage"] = get_storage_status(db)
|
||||
elif tab_name == "billing":
|
||||
extra["billing"] = get_billing_readiness(db)
|
||||
elif tab_name == "reports":
|
||||
extra["report_cards"] = get_report_cards(db)
|
||||
extra["report_groups"] = get_report_cards(db)
|
||||
elif tab_name == "wizards":
|
||||
extra["wizard_cards"] = get_wizard_cards()
|
||||
extra["wizard_groups"] = get_wizard_cards()
|
||||
elif tab_name == "audit-logs":
|
||||
extra["audit_logs"] = get_recent_audit_logs(db)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user