This commit is contained in:
Stefan Lazic committed 2026-08-03 21:15:24 +01:00
1 parent ec5583f972
commit 546613e677
189 files changed
+9873 -655

No files matched your search

+10 -1
View File
@@ -3,7 +3,9 @@ import { auth } from "@/auth";
import { StaffShell } from "@/components/navigation/staff-shell";
import { hasPermission } from "@/lib/auth/permissions";
import { Permission } from "@/generated/prisma/enums";
import { prisma } from "@/lib/db/prisma";
import { OWNER_NAV_ITEMS } from "@/lib/navigation/staff-nav-items";
import { getUnreadNotificationCount } from "@/services/notifications/notification.service";
/**
* Owner is a permission on a staff account, not a separate account type
@@ -21,8 +23,15 @@ export default async function OwnerLayout({ children }: { children: React.ReactN
redirect("/staff");
}
const unreadNotificationCount = await getUnreadNotificationCount(prisma, session.user.id);
return (
<StaffShell items={OWNER_NAV_ITEMS} footerLink={{ href: "/staff", label: "Barber Tools" }}>
<StaffShell
items={OWNER_NAV_ITEMS}
footerLink={{ href: "/staff", label: "Barber Tools" }}
notificationsHref="/owner/notifications"
unreadNotificationCount={unreadNotificationCount}
>
{children}
</StaffShell>
);