Supervisor feature
Deploy / deploy (push) Successful in 3m5s

This commit is contained in:
twotalesanimation
2026-07-11 15:06:12 +02:00
parent 6fc818a3db
commit e24fd8eda0
19 changed files with 3175 additions and 2 deletions
+4 -2
View File
@@ -19,6 +19,7 @@ import {
BarChart2,
ListVideo,
CloudUpload,
Clapperboard,
} from 'lucide-react';
import { useState } from 'react';
import { useSession } from 'next-auth/react';
@@ -30,6 +31,7 @@ const navItems = [
{ href: '/shot-status', label: 'Shot Status', icon: BarChart2, hideForClient: true },
{ href: '/playlist', label: 'Playlist', icon: ListVideo, hideForClient: true },
{ href: '/tasks', label: 'My Tasks', icon: ListTodo, hideForClient: true },
{ href: '/shoot-log', label: 'Shot Log', icon: Clapperboard, supervisorOnly: true },
{ href: '/schedule', label: 'Schedule', icon: CalendarRange, adminOnly: true },
{ href: '/batch-upload', label: 'Batch Upload', icon: CloudUpload, adminOnly: true },
{ href: '/clients', label: 'Clients', icon: Users, adminOnly: true },
@@ -88,8 +90,8 @@ export function Sidebar() {
{navItems.map((item) => {
if (item.adminOnly && !isAdmin) return null;
if ((item as any).adminStrictOnly && session?.user?.role !== 'ADMIN') return null;
if ((item as any).hideForClient && session?.user?.role === 'CLIENT')
return null;
if ((item as any).hideForClient && session?.user?.role === 'CLIENT') return null;
if ((item as any).supervisorOnly && !['ADMIN', 'PRODUCER', 'SUPERVISOR'].includes(session?.user?.role ?? '')) return null;
const Icon = item.icon;
const isActive =
pathname === item.href || pathname.startsWith(item.href + '/');