260322:1648 Correct Coresspondence / Doing RFA / Correct CI
This commit is contained in:
@@ -1,23 +1,16 @@
|
||||
"use client";
|
||||
'use client';
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { migrationService } from "@/lib/services/migration.service";
|
||||
import { MigrationErrorItem } from "@/types/migration";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { format } from "date-fns";
|
||||
import { ArrowLeftIcon } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { getApiErrorMessage } from "@/types/api-error";
|
||||
import { useEffect, useState } from 'react';
|
||||
import { migrationService } from '@/lib/services/migration.service';
|
||||
import { MigrationErrorItem } from '@/types/migration';
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { format } from 'date-fns';
|
||||
import { ArrowLeftIcon } from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { getApiErrorMessage } from '@/types/api-error';
|
||||
|
||||
export default function MigrationErrorsPage() {
|
||||
const [items, setItems] = useState<MigrationErrorItem[]>([]);
|
||||
@@ -36,7 +29,7 @@ export default function MigrationErrorsPage() {
|
||||
setItems(Array.isArray(res.items) ? res.items : []);
|
||||
} catch (error: unknown) {
|
||||
setItems([]);
|
||||
setErrorMessage(getApiErrorMessage(error, "Failed to load errors"));
|
||||
setErrorMessage(getApiErrorMessage(error, 'Failed to load errors'));
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -87,17 +80,17 @@ export default function MigrationErrorsPage() {
|
||||
<TableBody>
|
||||
{items.map((item) => (
|
||||
<TableRow key={item.id}>
|
||||
<TableCell className="font-mono text-sm">{item.batchId || "-"}</TableCell>
|
||||
<TableCell className="font-medium">{item.documentNumber || "-"}</TableCell>
|
||||
<TableCell className="font-mono text-sm">{item.batchId || '-'}</TableCell>
|
||||
<TableCell className="font-medium">{item.documentNumber || '-'}</TableCell>
|
||||
<TableCell>
|
||||
<Badge variant="destructive">{item.errorType || "UNKNOWN"}</Badge>
|
||||
<Badge variant="destructive">{item.errorType || 'UNKNOWN'}</Badge>
|
||||
</TableCell>
|
||||
<TableCell className="max-w-md break-words">
|
||||
<span className="text-sm text-muted-foreground line-clamp-2" title={item.errorMessage}>
|
||||
{item.errorMessage || "-"}
|
||||
{item.errorMessage || '-'}
|
||||
</span>
|
||||
</TableCell>
|
||||
<TableCell>{format(new Date(item.createdAt), "dd MMM yyyy, HH:mm")}</TableCell>
|
||||
<TableCell>{format(new Date(item.createdAt), 'dd MMM yyyy, HH:mm')}</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
|
||||
@@ -1,56 +1,49 @@
|
||||
"use client";
|
||||
'use client';
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { migrationService } from "@/lib/services/migration.service";
|
||||
import { MigrationReviewQueueItem, MigrationReviewStatus } from "@/types/migration";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { toast } from "sonner";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||
import { format } from "date-fns";
|
||||
import { EyeIcon, FileXIcon, CheckSquareIcon } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { getApiErrorMessage } from "@/types/api-error";
|
||||
import { useEffect, useState, useCallback } from 'react';
|
||||
import { migrationService } from '@/lib/services/migration.service';
|
||||
import { MigrationReviewQueueItem, MigrationReviewStatus } from '@/types/migration';
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table';
|
||||
import { Checkbox } from '@/components/ui/checkbox';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { toast } from 'sonner';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { format } from 'date-fns';
|
||||
import { EyeIcon, FileXIcon, CheckSquareIcon } from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { getApiErrorMessage } from '@/types/api-error';
|
||||
|
||||
export default function MigrationReviewQueuePage() {
|
||||
const [items, setItems] = useState<MigrationReviewQueueItem[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [submitting, setSubmitting] = useState(false);
|
||||
const [statusFilter, setStatusFilter] = useState<string>("PENDING");
|
||||
const [statusFilter, setStatusFilter] = useState<string>('PENDING');
|
||||
const [selectedIds, setSelectedIds] = useState<number[]>([]);
|
||||
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
fetchData();
|
||||
}, [statusFilter]);
|
||||
|
||||
const fetchData = async () => {
|
||||
const fetchData = useCallback(async () => {
|
||||
try {
|
||||
setLoading(true);
|
||||
setErrorMessage(null);
|
||||
const res = await migrationService.getReviewQueue({
|
||||
status: statusFilter === "ALL" ? undefined : (statusFilter as MigrationReviewStatus),
|
||||
status: statusFilter === 'ALL' ? undefined : (statusFilter as MigrationReviewStatus),
|
||||
limit: 50,
|
||||
});
|
||||
setItems(Array.isArray(res.items) ? res.items : []);
|
||||
setSelectedIds([]); // reset selection on fetch
|
||||
} catch (error: unknown) {
|
||||
setItems([]);
|
||||
setErrorMessage(getApiErrorMessage(error, "Failed to load queue"));
|
||||
setErrorMessage(getApiErrorMessage(error, 'Failed to load queue'));
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
}, [statusFilter]);
|
||||
|
||||
useEffect(() => {
|
||||
fetchData();
|
||||
}, [fetchData]);
|
||||
|
||||
const handleToggleSelectAll = () => {
|
||||
if (selectedIds.length === items.length) {
|
||||
@@ -61,9 +54,7 @@ export default function MigrationReviewQueuePage() {
|
||||
};
|
||||
|
||||
const handleToggleSelect = (id: number) => {
|
||||
setSelectedIds((prev) =>
|
||||
prev.includes(id) ? prev.filter((i) => i !== id) : [...prev, id]
|
||||
);
|
||||
setSelectedIds((prev) => (prev.includes(id) ? prev.filter((i) => i !== id) : [...prev, id]));
|
||||
};
|
||||
|
||||
const handleBatchApprove = async () => {
|
||||
@@ -89,20 +80,17 @@ export default function MigrationReviewQueuePage() {
|
||||
sender_id: item.senderOrganizationId,
|
||||
receiver_id: item.receiverOrganizationId,
|
||||
details: {
|
||||
tags: item.extractedTags
|
||||
}
|
||||
}
|
||||
tags: item.extractedTags,
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
const batchId = `BATCH_UI_${Date.now()}`;
|
||||
await migrationService.commitBatch(
|
||||
{ items: batchItems, batchId },
|
||||
batchId
|
||||
);
|
||||
await migrationService.commitBatch({ items: batchItems, batchId }, batchId);
|
||||
|
||||
fetchData();
|
||||
} catch (error) {
|
||||
toast.error("Batch commit failed.");
|
||||
} catch (_error) {
|
||||
toast.error('Batch commit failed.');
|
||||
} finally {
|
||||
setSubmitting(false);
|
||||
}
|
||||
@@ -113,19 +101,13 @@ export default function MigrationReviewQueuePage() {
|
||||
<div className="flex justify-between flex-wrap gap-4 items-center">
|
||||
<div>
|
||||
<h1 className="text-3xl font-bold tracking-tight">Migration Review Queue</h1>
|
||||
<p className="text-muted-foreground mt-1">
|
||||
Review and correct documents that AI flagged as low confidence.
|
||||
</p>
|
||||
<p className="text-muted-foreground mt-1">Review and correct documents that AI flagged as low confidence.</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-4">
|
||||
{selectedIds.length > 0 && (
|
||||
<Button
|
||||
variant="default"
|
||||
onClick={handleBatchApprove}
|
||||
disabled={submitting}
|
||||
>
|
||||
<Button variant="default" onClick={handleBatchApprove} disabled={submitting}>
|
||||
<CheckSquareIcon className="mr-2 h-4 w-4" />
|
||||
{submitting ? "Processing..." : `Batch Approve (${selectedIds.length})`}
|
||||
{submitting ? 'Processing...' : `Batch Approve (${selectedIds.length})`}
|
||||
</Button>
|
||||
)}
|
||||
<Link href="/admin/migration/errors">
|
||||
@@ -192,28 +174,36 @@ export default function MigrationReviewQueuePage() {
|
||||
/>
|
||||
</TableCell>
|
||||
<TableCell className="font-medium">{item.documentNumber}</TableCell>
|
||||
<TableCell>{item.aiSuggestedCategory || "Unknown"}</TableCell>
|
||||
<TableCell>{item.aiSuggestedCategory || 'Unknown'}</TableCell>
|
||||
<TableCell>
|
||||
<Badge
|
||||
variant={
|
||||
!item.aiConfidence
|
||||
? "destructive"
|
||||
? 'destructive'
|
||||
: item.aiConfidence > 0.8
|
||||
? "default"
|
||||
? 'default'
|
||||
: item.aiConfidence > 0.5
|
||||
? "secondary"
|
||||
: "destructive"
|
||||
? 'secondary'
|
||||
: 'destructive'
|
||||
}
|
||||
>
|
||||
{item.aiConfidence ? (item.aiConfidence * 100).toFixed(1) + "%" : "N/A"}
|
||||
{item.aiConfidence ? (item.aiConfidence * 100).toFixed(1) + '%' : 'N/A'}
|
||||
</Badge>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<Badge variant={item.status === 'PENDING' ? 'outline' : item.status === 'APPROVED' ? 'default' : 'destructive'}>
|
||||
<Badge
|
||||
variant={
|
||||
item.status === 'PENDING'
|
||||
? 'outline'
|
||||
: item.status === 'APPROVED'
|
||||
? 'default'
|
||||
: 'destructive'
|
||||
}
|
||||
>
|
||||
{item.status}
|
||||
</Badge>
|
||||
</TableCell>
|
||||
<TableCell>{format(new Date(item.createdAt), "dd MMM yyyy, HH:mm")}</TableCell>
|
||||
<TableCell>{format(new Date(item.createdAt), 'dd MMM yyyy, HH:mm')}</TableCell>
|
||||
<TableCell className="text-right">
|
||||
<Link href={`/admin/migration/review/${item.id}`}>
|
||||
<Button size="sm" variant="ghost">
|
||||
|
||||
@@ -1,34 +1,37 @@
|
||||
"use client";
|
||||
'use client';
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { useParams, useRouter } from "next/navigation";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import * as z from "zod";
|
||||
import { migrationService } from "@/lib/services/migration.service";
|
||||
import { MigrationReviewQueueItem } from "@/types/migration";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
FormDescription,
|
||||
FormField,
|
||||
FormItem,
|
||||
FormLabel,
|
||||
FormMessage,
|
||||
} from "@/components/ui/form";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||
import { ArrowLeftIcon, CheckCircleIcon, XCircleIcon } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { toast } from "sonner";
|
||||
import { Card, CardContent } from "@/components/ui/card";
|
||||
import { useEffect, useState, useCallback } from 'react';
|
||||
import { useParams, useRouter } from 'next/navigation';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import * as z from 'zod';
|
||||
import { migrationService } from '@/lib/services/migration.service';
|
||||
import { MigrationReviewQueueItem } from '@/types/migration';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Form, FormControl, FormDescription as _FormDescription, FormField, FormItem, FormLabel, FormMessage } from '@/components/ui/form';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { ArrowLeftIcon, CheckCircleIcon, XCircleIcon } from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import { toast } from 'sonner';
|
||||
import { Card, CardContent } from '@/components/ui/card';
|
||||
|
||||
interface MigrationAiIssues {
|
||||
document_date?: string;
|
||||
issued_date?: string;
|
||||
received_date?: string;
|
||||
sender_id?: string | number;
|
||||
discipline_id?: string | number;
|
||||
source_file_path?: string;
|
||||
key_points?: string[];
|
||||
validation_results?: Array<{ message: string; severity: string }>;
|
||||
}
|
||||
|
||||
const reviewFormSchema = z.object({
|
||||
document_number: z.string().min(1, "Document number is required"),
|
||||
subject: z.string().min(1, "Subject is required"),
|
||||
category: z.string().min(1, "Category is required"),
|
||||
document_number: z.string().min(1, 'Document number is required'),
|
||||
subject: z.string().min(1, 'Subject is required'),
|
||||
category: z.string().min(1, 'Category is required'),
|
||||
document_date: z.string().optional(),
|
||||
issued_date: z.string().optional(),
|
||||
received_date: z.string().optional(),
|
||||
@@ -50,48 +53,51 @@ export default function MigrationReviewPage() {
|
||||
const form = useForm<ReviewFormValues>({
|
||||
resolver: zodResolver(reviewFormSchema),
|
||||
defaultValues: {
|
||||
document_number: "",
|
||||
subject: "",
|
||||
category: "",
|
||||
document_date: "",
|
||||
issued_date: "",
|
||||
received_date: "",
|
||||
sender_id: "",
|
||||
discipline_id: "",
|
||||
document_number: '',
|
||||
subject: '',
|
||||
category: '',
|
||||
document_date: '',
|
||||
issued_date: '',
|
||||
received_date: '',
|
||||
sender_id: '',
|
||||
discipline_id: '',
|
||||
},
|
||||
});
|
||||
|
||||
const fetchItem = useCallback(
|
||||
async (itemId: number) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
const res = await migrationService.getQueueItem(itemId);
|
||||
setItem(res);
|
||||
|
||||
if (res) {
|
||||
// Pre-fill form from database item and aiIssues payload
|
||||
const issues = (res.aiIssues || {}) as MigrationAiIssues;
|
||||
form.reset({
|
||||
document_number: res.documentNumber || '',
|
||||
subject: res.title || res.originalTitle || '',
|
||||
category: res.aiSuggestedCategory || '',
|
||||
document_date: issues.document_date || '',
|
||||
issued_date: issues.issued_date || '',
|
||||
received_date: issues.received_date || '',
|
||||
sender_id: issues.sender_id ? String(issues.sender_id) : '',
|
||||
discipline_id: issues.discipline_id ? String(issues.discipline_id) : '',
|
||||
});
|
||||
}
|
||||
} catch (_error) {
|
||||
toast.error('Failed to load queue item');
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
},
|
||||
[form]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (!id) return;
|
||||
fetchItem(id);
|
||||
}, [id]);
|
||||
|
||||
const fetchItem = async (itemId: number) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
const res = await migrationService.getQueueItem(itemId);
|
||||
setItem(res);
|
||||
|
||||
if (res) {
|
||||
// Pre-fill form from database item and aiIssues payload
|
||||
const issues = res.aiIssues || {};
|
||||
form.reset({
|
||||
document_number: res.documentNumber || "",
|
||||
subject: res.title || res.originalTitle || "",
|
||||
category: res.aiSuggestedCategory || "",
|
||||
document_date: issues.document_date || "",
|
||||
issued_date: issues.issued_date || "",
|
||||
received_date: issues.received_date || "",
|
||||
sender_id: issues.sender_id ? String(issues.sender_id) : "",
|
||||
discipline_id: issues.discipline_id ? String(issues.discipline_id) : "",
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
toast.error("Failed to load queue item");
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
}, [id, fetchItem]);
|
||||
|
||||
const onSubmit = async (values: ReviewFormValues) => {
|
||||
if (!item) return;
|
||||
@@ -104,9 +110,9 @@ export default function MigrationReviewPage() {
|
||||
document_number: values.document_number,
|
||||
subject: values.subject,
|
||||
category: values.category,
|
||||
source_file_path: issues.source_file_path || "",
|
||||
migrated_by: "SYSTEM_IMPORT",
|
||||
batch_id: "MANUAL_REVIEW_BATCH",
|
||||
source_file_path: issues.source_file_path || '',
|
||||
migrated_by: 'SYSTEM_IMPORT',
|
||||
batch_id: 'MANUAL_REVIEW_BATCH',
|
||||
project_id: 1, // Assumption or pulled from store
|
||||
document_date: values.document_date,
|
||||
issued_date: values.issued_date,
|
||||
@@ -116,33 +122,33 @@ export default function MigrationReviewPage() {
|
||||
details: {
|
||||
tags: issues.tags || [],
|
||||
ai_confidence: item.aiConfidence,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// Mock idempotency key based on timestamp to ensure uniqueness per approval retry
|
||||
const idempotencyKey = `review-${item.id}-${Date.now()}`;
|
||||
await migrationService.approveQueueItem(item.id, payload, idempotencyKey);
|
||||
|
||||
toast.success("Document approved and imported successfully");
|
||||
router.push("/admin/migration");
|
||||
toast.success('Document approved and imported successfully');
|
||||
router.push('/admin/migration');
|
||||
} catch (error: unknown) {
|
||||
const err = error as { response?: { data?: { message?: string } } };
|
||||
toast.error(err?.response?.data?.message || "Failed to approve and import");
|
||||
toast.error(err?.response?.data?.message || 'Failed to approve and import');
|
||||
} finally {
|
||||
setSubmitting(false);
|
||||
}
|
||||
};
|
||||
|
||||
const onReject = async () => {
|
||||
if (!item || !confirm("Are you sure you want to REJECT this document? It will not be imported.")) return;
|
||||
if (!item || !confirm('Are you sure you want to REJECT this document? It will not be imported.')) return;
|
||||
|
||||
try {
|
||||
setSubmitting(true);
|
||||
await migrationService.rejectQueueItem(item.id);
|
||||
toast.success("Document rejected");
|
||||
router.push("/admin/migration");
|
||||
} catch (error: unknown) {
|
||||
toast.error("Failed to reject document");
|
||||
toast.success('Document rejected');
|
||||
router.push('/admin/migration');
|
||||
} catch (_error: unknown) {
|
||||
toast.error('Failed to reject document');
|
||||
} finally {
|
||||
setSubmitting(false);
|
||||
}
|
||||
@@ -156,8 +162,8 @@ export default function MigrationReviewPage() {
|
||||
return <div className="py-10 text-center text-red-500">Document not found</div>;
|
||||
}
|
||||
|
||||
const pdfUrl = item.aiIssues?.source_file_path
|
||||
? migrationService.getStagingFileUrl(item.aiIssues.source_file_path)
|
||||
const pdfUrl = (item.aiIssues as MigrationAiIssues)?.source_file_path
|
||||
? migrationService.getStagingFileUrl((item.aiIssues as MigrationAiIssues).source_file_path!)
|
||||
: null;
|
||||
|
||||
return (
|
||||
@@ -173,7 +179,10 @@ export default function MigrationReviewPage() {
|
||||
<h1 className="text-2xl font-bold tracking-tight">Review Document: {item.documentNumber}</h1>
|
||||
<p className="text-sm text-muted-foreground flex items-center gap-2">
|
||||
Status: <span className="font-semibold text-primary">{item.status}</span>
|
||||
{' | '} Confidence: <span className={item.aiConfidence && item.aiConfidence < 0.8 ? "text-red-500" : "text-green-500"}>{item.aiConfidence ? (item.aiConfidence * 100).toFixed(1) + "%" : "N/A"}</span>
|
||||
{' | '} Confidence:{' '}
|
||||
<span className={item.aiConfidence && item.aiConfidence < 0.8 ? 'text-red-500' : 'text-green-500'}>
|
||||
{item.aiConfidence ? (item.aiConfidence * 100).toFixed(1) + '%' : 'N/A'}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -200,9 +209,7 @@ export default function MigrationReviewPage() {
|
||||
{/* Right Side: Form */}
|
||||
<Card className="w-full md:w-[450px] lg:w-[500px] flex-shrink-0 flex flex-col overflow-hidden border-2 border-primary/10 shadow-md">
|
||||
<div className="p-4 border-b bg-muted/30">
|
||||
<h2 className="font-semibold text-lg flex items-center gap-2">
|
||||
Extracted Information
|
||||
</h2>
|
||||
<h2 className="font-semibold text-lg flex items-center gap-2">Extracted Information</h2>
|
||||
{item.reviewReason && (
|
||||
<p className="text-sm text-red-500 mt-1 font-medium bg-red-50 p-2 rounded border border-red-100">
|
||||
Reason: {item.reviewReason}
|
||||
@@ -319,11 +326,11 @@ export default function MigrationReviewPage() {
|
||||
)}
|
||||
/>
|
||||
|
||||
{item.aiIssues?.key_points && item.aiIssues.key_points.length > 0 && (
|
||||
{(item.aiIssues as MigrationAiIssues)?.key_points && (item.aiIssues as MigrationAiIssues).key_points!.length > 0 && (
|
||||
<div className="mt-6 border-t pt-4">
|
||||
<h3 className="font-semibold text-sm mb-2 text-muted-foreground">AI Extracted Key Points</h3>
|
||||
<ul className="text-sm space-y-1 list-disc pl-4 text-muted-foreground">
|
||||
{item.aiIssues.key_points.map((point: string, i: number) => (
|
||||
{(item.aiIssues as MigrationAiIssues).key_points!.map((point: string, i: number) => (
|
||||
<li key={i}>{point}</li>
|
||||
))}
|
||||
</ul>
|
||||
@@ -347,7 +354,7 @@ export default function MigrationReviewPage() {
|
||||
disabled={submitting || item.status !== 'PENDING'}
|
||||
>
|
||||
<CheckCircleIcon className="w-4 h-4 mr-2" />
|
||||
{submitting ? "Processing..." : "Approve & Import"}
|
||||
{submitting ? 'Processing...' : 'Approve & Import'}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user