import DashboardLayout from "@/components/DashboardLayout" import { auth } from "@/lib/auth" import { prisma } from "@/lib/prisma" export default async function ShiftManagerDashboard() { const session = await auth() const manager = await prisma.shiftManager.findFirst({ where: { email: session?.user?.email || "" } }) if (!manager) return
Manager not found
const shiftsCount = await prisma.shift.count({ where: { shiftManagerId: manager.id } }) const activeShifts = await prisma.shift.count({ where: { shiftManagerId: manager.id, status: "active" } }) return (

Shift Manager Dashboard

🕐

Total Shifts

{shiftsCount}

Active Shifts

{activeShifts}

) }