fix: restore historical order visibility for HartOMat admins
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user