fix: restore historical order visibility for HartOMat admins

This commit is contained in:
2026-04-06 19:24:09 +02:00
parent f13cb489c1
commit 2a00abe91f
6 changed files with 19 additions and 7 deletions
@@ -10,6 +10,7 @@ from datetime import datetime
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession
from app.domains.auth.models import PM_ROLES
from app.domains.admin.models import DashboardConfig
logger = logging.getLogger(__name__)
@@ -59,7 +60,7 @@ def get_default_widgets_for_role(role: str) -> list[dict]:
admin / project_manager: KPI + analytics defaults.
client: RecentRenders + ProductionStats only.
"""
if role in ("admin", "project_manager"):
if role in PM_ROLES:
return [w.copy() for w in _DEFAULT_ADMIN_WIDGETS]
return [w.copy() for w in _DEFAULT_CLIENT_WIDGETS]