From 284f9f40d9494168f3e68eedd9af067c38362eea Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Thu, 30 Oct 2025 10:35:26 +0900 Subject: (김준회) refactor: POS: 온디맨드로 다운로드받도록 변경, 매핑로직에선 pos 관련 로직 제거 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pos/components/pos-file-selection-dialog.tsx | 134 +++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 lib/pos/components/pos-file-selection-dialog.tsx (limited to 'lib/pos/components/pos-file-selection-dialog.tsx') diff --git a/lib/pos/components/pos-file-selection-dialog.tsx b/lib/pos/components/pos-file-selection-dialog.tsx new file mode 100644 index 00000000..29936d21 --- /dev/null +++ b/lib/pos/components/pos-file-selection-dialog.tsx @@ -0,0 +1,134 @@ +"use client" + +import * as React from "react" +import { Download, FileText } from "lucide-react" +import { + Dialog, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog" +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "@/components/ui/table" +import { Button } from "@/components/ui/button" +import { ScrollArea } from "@/components/ui/scroll-area" +import { Badge } from "@/components/ui/badge" + +interface PosFileInfo { + fileName: string + dcmtmId: string + projNo: string + posNo: string + posRevNo: string + fileSer: string +} + +interface PosFileSelectionDialogProps { + isOpen: boolean + onClose: () => void + materialCode: string + files: PosFileInfo[] + onDownload: (fileIndex: number, fileName: string) => void + downloadingIndex: number | null +} + +export function PosFileSelectionDialog({ + isOpen, + onClose, + materialCode, + files, + onDownload, + downloadingIndex, +}: PosFileSelectionDialogProps) { + return ( + + + + + + POS 파일 선택 + + + 자재코드 {materialCode}에 대한 + POS 파일 {files.length}개가 있습니다. + 다운로드할 파일을 선택해주세요. + + + + + + + + 번호 + 파일명 + 프로젝트 + POS 번호 + 리비전 + 파일 SEQ + 다운로드 + + + + {files.map((file, index) => ( + + + #{index + 1} + + +
+ + + {file.fileName} + +
+
+ + {file.projNo} + + + {file.posNo} + + + + {file.posRevNo} + + + + {file.fileSer} + + + + +
+ ))} +
+
+
+ + {files.length === 0 && ( +
+ +

사용 가능한 POS 파일이 없습니다.

+
+ )} +
+
+ ) +} + -- cgit v1.2.3