st: feat: 일반검증 관리 기능

This commit is contained in:
2026-03-19 14:15:20 +09:00
parent 3184ea4386
commit 11cf1bf7c9
11 changed files with 1419 additions and 126 deletions
@@ -5,6 +5,7 @@ import type { GeneralverificationList } from "@/entities/statistics/model/genera
import { Button } from "@common/components";
import RegistDialog from "@/components/statistics/verification/generalVerification/RegistDialog";
import CopyDialog from "@/components/statistics/verification/generalVerification/CopyDialog";
export const getGeneralVerificationColumns = (
onUpdateSuccess?: () => void,
@@ -18,10 +19,6 @@ export const getGeneralVerificationColumns = (
return totalRows - (pageIndex * pageSize + row.index);
},
},
// {
// accessorKey: "vrfcSn",
// header: "일련번호",
// },
{
accessorKey: "trgtStatsNm",
header: "통계항목",
@@ -46,6 +43,18 @@ export const getGeneralVerificationColumns = (
return date.format("YYYY-MM-DD");
},
},
{
id: "copy",
header: "복사",
cell: ({ row }) => (
<div onClick={(e) => e.stopPropagation()}>
<GeneralVerificationCopyButton
row={row.original}
onSuccess={onUpdateSuccess}
/>
</div>
),
},
{
id: "actions",
header: "관리",
@@ -64,7 +73,7 @@ const GeneralVerificationManageButton = ({
vrfcSn,
onSuccess,
}: {
vrfcSn: string;
vrfcSn: number;
onSuccess?: () => void;
}) => {
const [dialogOpen, setDialogOpen] = useState(false);
@@ -79,3 +88,23 @@ const GeneralVerificationManageButton = ({
</RegistDialog>
);
};
const GeneralVerificationCopyButton = ({
row,
onSuccess,
}: {
row: GeneralverificationList;
onSuccess?: () => void;
}) => {
const [dialogOpen, setDialogOpen] = useState(false);
return (
<CopyDialog
open={dialogOpen}
onOpenChange={setDialogOpen}
row={row}
onSuccess={onSuccess}
>
<Button size="sm" color="white">복사</Button>
</CopyDialog>
);
};