"""Маппинг роли HR → роль модуля тестов (порт `backend/src/utils/hrRoleMap.js`).""" from __future__ import annotations def map_hr_role_to_app(hr_role: str | None) -> str: r = (hr_role or '').strip().lower() if not r: return 'employee' if r == 'admin' or 'hr' in r or 'дире' in r: return 'hr' if 'manager' in r or 'рук' in r or 'завед' in r: return 'manager' return 'employee'