feat: add admin content module pages
Local Build and Deploy / deploy (push) Successful in 47s

This commit is contained in:
Simo committed 2026-07-12 15:27:07 +02:00
1 parent f422bb4a0b
commit 2606092337
24 files changed
+2892

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import { redirect } from 'next/navigation'
import { canAccess, getAdminContext, PERMS } from '@/lib/permissions'
import { prisma } from '@/lib/prisma'
import { EventForm } from '../event-form'
export default async function CreateEventPage() {
const { session, permissions } = await getAdminContext()
if (!canAccess(permissions, PERMS.EVENTS_EDIT, session.user.rank)) {
redirect('/admin/events')
}
const eventTypes = await prisma.websiteEventType.findMany({
where: { isActive: 1 },
orderBy: { name: 'asc' },
})
return (
<div className="space-y-6">
<div>
<h1 className="text-3xl font-bold tracking-tight">Create Event</h1>
<p className="text-muted-foreground">Schedule a new hotel event</p>
</div>
<EventForm eventTypes={eventTypes} />
</div>
)
}