Files
hats-app/app/admin/administration/user/create/page.tsx
T
Ichsan Kurniawan 279b642a7a Apply RBAC permissions across admin and tasks
Enforce page access and action-level permissions across admin and task views, including exports and record actions. Move user creation to a client component behind server-side permission checks, standardize data fetching, and remove the deprecated user-role route.
2026-11-09 17:32:31 +07:00

29 lines
895 B
TypeScript

import { type Metadata } from 'next';
import { Suspense } from 'react';
import LazyLoading from '@/components/loader/LazyLoading';
import { getAccessPagePermission } from '@/lib/get-access-data';
import UserCreateClient from './UserCreateClient';
export const dynamic = 'force-dynamic';
export const metadata: Metadata = {
title: "Admin | User Form",
description: "Create or update employee user information",
};
type Props = {
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
};
export default async function UserCreatePage({ searchParams }: Props) {
const params = await searchParams;
const isUpdate = params?.is_update === 'true';
await getAccessPagePermission('/administration/user', isUpdate ? 'UPDATE' : 'CREATE');
return (
<Suspense fallback={<LazyLoading />}>
<UserCreateClient />
</Suspense>
);
}