레포트 테이블 수정 방식 수정

This commit is contained in:
dohyeons 2025-12-17 17:59:01 +09:00
parent 6c7807e1d1
commit 0abe87ae1a
1 changed files with 15 additions and 20 deletions

View File

@ -14,7 +14,7 @@ import {
AlertDialogHeader,
AlertDialogTitle,
} from "@/components/ui/alert-dialog";
import { Pencil, Copy, Trash2, Loader2 } from "lucide-react";
import { Copy, Trash2, Loader2 } from "lucide-react";
import { reportApi } from "@/lib/api/reportApi";
import { useToast } from "@/hooks/use-toast";
import { useRouter } from "next/navigation";
@ -149,7 +149,11 @@ export function ReportListTable({
{reports.map((report, index) => {
const rowNumber = (page - 1) * limit + index + 1;
return (
<TableRow key={report.report_id}>
<TableRow
key={report.report_id}
onClick={() => handleEdit(report.report_id)}
className="cursor-pointer hover:bg-muted/50"
>
<TableCell className="font-medium">{rowNumber}</TableCell>
<TableCell>
<div>
@ -162,34 +166,25 @@ export function ReportListTable({
<TableCell>{report.created_by || "-"}</TableCell>
<TableCell>{formatDate(report.updated_at || report.created_at)}</TableCell>
<TableCell>
<div className="flex gap-2">
<div className="flex gap-2" onClick={(e) => e.stopPropagation()}>
<Button
size="sm"
variant="outline"
onClick={() => handleEdit(report.report_id)}
className="gap-1"
>
<Pencil className="h-3 w-3" />
</Button>
<Button
size="sm"
size="icon"
variant="outline"
onClick={() => handleCopy(report.report_id)}
disabled={isCopying}
className="gap-1"
className="h-8 w-8"
title="복사"
>
<Copy className="h-3 w-3" />
<Copy className="h-4 w-4" />
</Button>
<Button
size="sm"
size="icon"
variant="destructive"
onClick={() => handleDeleteClick(report.report_id)}
className="gap-1"
className="h-8 w-8"
title="삭제"
>
<Trash2 className="h-3 w-3" />
<Trash2 className="h-4 w-4" />
</Button>
</div>
</TableCell>