feat(bulk-import): complete implementation
- API upload handler: extract folders/zip, analyze PDFs, return preview - API batch creation: create incidents from reviewed metadata - Form component: upload, editable preview table, import controls - Admin page: bulk import page at /admin/bulk-import - Admin link: button in admin panel All components integrated and ready for testing.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { requireAdmin } from '@/lib/auth/require-admin'
|
||||
import { BulkImportForm } from '@/components/admin/bulk-import-form'
|
||||
import { redirect } from 'next/navigation'
|
||||
|
||||
export const metadata = {
|
||||
title: 'Bulk Import Incidents — IMS'
|
||||
}
|
||||
|
||||
export default async function BulkImportPage() {
|
||||
const user = await requireAdmin()
|
||||
if (!user) redirect('/login')
|
||||
|
||||
return (
|
||||
<div className="max-w-4xl mx-auto p-6">
|
||||
<div className="mb-6">
|
||||
<h1 className="text-3xl font-bold mb-2">Bulk Import Incidents</h1>
|
||||
<p className="text-gray-600">
|
||||
Upload historical case folders. Each folder will become a closed incident
|
||||
with extracted metadata and attached evidence files.
|
||||
</p>
|
||||
</div>
|
||||
<BulkImportForm />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user