Files
hats-app/app/admin/project-assignment/project-management/page.tsx
T
Ichsan Kurniawan 3eabe762bf Add project-assignment admin pages and UI updates
Add new admin Project Assignment area with Client, End User, and Project Management pages and components (tables, Export buttons, lazy-loaded pages). Introduce FormProject for creating/editing projects and export utilities to download Excel for each module. Update task types: IEndUser now includes code and a status object. Clean up FormClient by removing unused imports and inline end-user modal usage. Make BadgeStatus robust to missing status values. Add "Project Assignment" entry to the sidebar and import FolderGit2.
2026-05-06 18:34:38 +07:00

38 lines
1.5 KiB
TypeScript

import { type Metadata } from 'next';
import { Suspense, lazy } from 'react';
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import LazyLoading from '@/components/loader/LazyLoading';
import fetchData from '@/lib/fetchData';
const ComponentPage = lazy(() => import('./component'));
const ExportComponent = lazy(() => import('./component/Export'));
export const metadata: Metadata = {
title: "Project - Project Assignment | Admin",
}
export default async function ProjectManagementPage() {
const data = await fetchData('/project')
return (
<>
<div className="flex flex-col">
<Card>
<CardHeader className='flex flex-col md:flex-row items-center justify-between space-y-5 sm:space-y-0'>
<div>
<CardTitle>Project Management</CardTitle>
<CardDescription className='mt-1'>Here&apos;s a list of projects that have been registered for project assignment!</CardDescription>
</div>
<Suspense fallback={<LazyLoading />}>
<ExportComponent data={data} />
</Suspense>
</CardHeader>
<CardContent>
<Suspense fallback={<LazyLoading />}>
<ComponentPage data={data} />
</Suspense>
</CardContent>
</Card>
</div>
</>
);
}