added tons of features

This commit is contained in:
2025-02-05 08:01:14 +02:00
parent 4ae0d8c545
commit 8138da6b1d
195 changed files with 12619 additions and 415 deletions

View File

@@ -0,0 +1,26 @@
import {UserRole} from '@prisma/client'
import {notFound} from 'next/navigation'
import {auth} from '@/auth'
import LoginForm from '@/components/auth/forms/login-form'
import {SessionUser} from '@/types/auth'
export default async function AdminPermission() {
const session = await auth()
const user: SessionUser = session?.user as unknown as SessionUser
if (!user) {
return (
<div className='my-8'>
<div className='container flex flex-col sm:flex-row'>
<LoginForm />
</div>
</div>
)
}
//if (![UserRole.CUSTOMER].includes(user.role as 'CUSTOMER')) {
if (user.role !== UserRole.SUPERVISOR) {
notFound()
}
}