feat: add superadmin management
All checks were successful
CI / Validate frontend and API (push) Successful in 1m59s
CI / Build and publish Docker images (push) Successful in 22s

This commit is contained in:
Cauê Faleiros
2026-09-01 09:54:45 -03:00
parent 2dfca33758
commit a5055238b9
21 changed files with 366 additions and 74 deletions

View File

@@ -100,7 +100,18 @@ export const Navbar: React.FC<NavbarProps> = ({ onPlay }) => {
</button>
) : (
<div className="flex items-center gap-3">
{user.role === 'professor' && (
{user.role === 'superadmin' ? (
<button
onClick={() => navigate('/admin')}
className={`text-sm font-semibold px-5 py-2.5 rounded-[980px] transition-colors ${
location.pathname === '/admin'
? 'bg-orange-500/20 text-orange-400 border border-orange-500/30'
: 'text-gray-300 hover:text-white bg-white/5 hover:bg-white/10'
}`}
>
Painel Administrativo
</button>
) : user.role === 'professor' && (
<button
onClick={() => navigate('/gerenciar')}
className={`text-sm font-semibold px-5 py-2.5 rounded-[980px] transition-colors ${
@@ -140,4 +151,3 @@ export const Navbar: React.FC<NavbarProps> = ({ onPlay }) => {
);
};