From 44b74ff4170090673b6eeacd8c528e0abf47b7aa Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Mon, 1 Dec 2025 19:52:06 +0900 Subject: (김준회) deprecated code 정리 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/b-rfq/attachment/revision-dialog.tsx | 196 ------------------------------- 1 file changed, 196 deletions(-) delete mode 100644 lib/b-rfq/attachment/revision-dialog.tsx (limited to 'lib/b-rfq/attachment/revision-dialog.tsx') diff --git a/lib/b-rfq/attachment/revision-dialog.tsx b/lib/b-rfq/attachment/revision-dialog.tsx deleted file mode 100644 index d26abedb..00000000 --- a/lib/b-rfq/attachment/revision-dialog.tsx +++ /dev/null @@ -1,196 +0,0 @@ -"use client" - -import * as React from "react" -import { Badge } from "@/components/ui/badge" -import { Button } from "@/components/ui/button" -import { - Dialog, - DialogContent, - DialogDescription, - DialogHeader, - DialogTitle, - DialogTrigger, -} from "@/components/ui/dialog" -import { - Table, - TableBody, - TableCell, - TableHead, - TableHeader, - TableRow, -} from "@/components/ui/table" -import { History, Download, Upload } from "lucide-react" -import { formatDate, formatBytes } from "@/lib/utils" -import { getAttachmentRevisions } from "../service" -import { AddRevisionDialog } from "./add-revision-dialog" - -interface RevisionDialogProps { - attachmentId: number - currentRevision: string - originalFileName: string -} - -export function RevisionDialog({ - attachmentId, - currentRevision, - originalFileName -}: RevisionDialogProps) { - const [open, setOpen] = React.useState(false) - const [revisions, setRevisions] = React.useState([]) - const [isLoading, setIsLoading] = React.useState(false) - const [isAddRevisionOpen, setIsAddRevisionOpen] = React.useState(false) - - // 리비전 목록 로드 - const loadRevisions = async () => { - setIsLoading(true) - try { - const result = await getAttachmentRevisions(attachmentId) - - if (result.success) { - setRevisions(result.revisions) - } else { - console.error("Failed to load revisions:", result.message) - } - } catch (error) { - console.error("Failed to load revisions:", error) - } finally { - setIsLoading(false) - } - } - - React.useEffect(() => { - if (open) { - loadRevisions() - } - }, [open, attachmentId]) - - return ( - <> - - - - - - - - - - 리비전 히스토리: {originalFileName} - - - 이 문서의 모든 버전을 확인하고 관리할 수 있습니다. - - - -
- {/* 새 리비전 추가 버튼 */} -
- -
- - {/* 리비전 목록 */} - {isLoading ? ( -
리비전을 불러오는 중...
- ) : ( -
- - - - 리비전 - 파일명 - 크기 - 업로드 일시 - 업로드자 - 코멘트 - 액션 - - - - {revisions.map((revision) => ( - - -
- - {revision.revisionNo} - - {revision.isLatest && ( - - 최신 - - )} -
-
- - -
-
{revision.originalFileName}
-
-
- - - {formatBytes(revision.fileSize)} - - - - {formatDate(revision.createdAt, "KR")} - - - - {revision.createdByName || "-"} - - - -
- {revision.revisionComment || "-"} -
-
- - - - -
- ))} -
-
-
- )} -
-
-
- - {/* 새 리비전 추가 다이얼로그 */} - { - loadRevisions() // 리비전 목록 새로고침 - }} - /> - - ) - } \ No newline at end of file -- cgit v1.2.3