diff options
Diffstat (limited to 'lib/swp/table/swp-document-detail-dialog.tsx')
| -rw-r--r-- | lib/swp/table/swp-document-detail-dialog.tsx | 100 |
1 files changed, 38 insertions, 62 deletions
diff --git a/lib/swp/table/swp-document-detail-dialog.tsx b/lib/swp/table/swp-document-detail-dialog.tsx index d69e2986..a87cd0e2 100644 --- a/lib/swp/table/swp-document-detail-dialog.tsx +++ b/lib/swp/table/swp-document-detail-dialog.tsx @@ -15,8 +15,6 @@ import { Download, FileIcon, AlertCircle, - ArrowDownToLine, - ArrowUpFromLine, } from "lucide-react"; import { Table, @@ -300,21 +298,10 @@ export function SwpDocumentDetailDialog({ {/* Stage 컬럼 (첫 행만 표시, rowspan) */} {idx === 0 && ( <TableCell - className="align-top border-r" + className="align-top border-r text-sm" rowSpan={groupActivities.length} > - <Badge - variant="outline" - className={ - stage === "IFC" - ? "bg-green-100 text-green-800" - : stage === "IFA" - ? "bg-blue-100 text-blue-800" - : "bg-gray-100 text-gray-800" - } - > - {stage} - </Badge> + {stage} </TableCell> )} <TableCell> @@ -326,17 +313,7 @@ export function SwpDocumentDetailDialog({ : "bg-green-100 text-green-800" } > - {activity.inOut === "IN" ? ( - <> - <ArrowDownToLine className="h-3 w-3 mr-1" /> - IN - </> - ) : ( - <> - <ArrowUpFromLine className="h-3 w-3 mr-1" /> - OUT - </> - )} + {activity.inOut} </Badge> </TableCell> <TableCell> @@ -396,42 +373,41 @@ export function SwpDocumentDetailDialog({ <span className="ml-2 text-sm">파일 로딩 중...</span> </div> ) : activityFiles.length > 0 ? ( - <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"> - {activityFiles.map((file) => ( - <div - key={file.FILE_SEQ} - className="flex flex-col gap-2 p-3 border rounded bg-background hover:bg-muted/30" - > - <div className="flex items-start gap-2"> - <FileIcon className="h-4 w-4 text-blue-500 mt-0.5 flex-shrink-0" /> - <div className="flex-1 min-w-0"> - <div className="text-sm font-medium break-all line-clamp-2"> - {file.FILE_NM} - </div> - {file.FILE_SZ && ( - <div className="text-xs text-muted-foreground"> - {formatFileSize(file.FILE_SZ)} - </div> - )} - {file.STAT && ( - <Badge variant="outline" className="text-xs mt-1"> - {file.STAT} - </Badge> - )} - </div> - </div> - <Button - variant="outline" - size="sm" - className="w-full" - onClick={() => handleDownloadFile(file.FILE_NM, document.OWN_DOC_NO || document.DOC_NO)} - > - <Download className="h-3 w-3 mr-1" /> - 다운로드 - </Button> - </div> - ))} - </div> + <Table> + <TableHeader> + <TableRow> + <TableHead className="min-w-[200px]">파일명</TableHead> + <TableHead className="w-[100px]">크기</TableHead> + <TableHead className="w-[120px]">날짜</TableHead> + <TableHead className="w-[100px]">다운로드</TableHead> + </TableRow> + </TableHeader> + <TableBody> + {activityFiles.map((file) => ( + <TableRow key={file.FILE_SEQ}> + <TableCell className="font-medium"> + {file.FILE_NM} + </TableCell> + <TableCell className="text-sm text-muted-foreground"> + {file.FILE_SZ ? formatFileSize(file.FILE_SZ) : "-"} + </TableCell> + <TableCell className="text-sm text-muted-foreground"> + {file.CRTE_DTM ? formatSwpDateShort(file.CRTE_DTM) : "-"} + </TableCell> + <TableCell> + <Button + variant="outline" + size="sm" + onClick={() => handleDownloadFile(file.FILE_NM, document.OWN_DOC_NO || document.DOC_NO)} + > + <Download className="h-3 w-3 mr-1" /> + 다운로드 + </Button> + </TableCell> + </TableRow> + ))} + </TableBody> + </Table> ) : ( <div className="flex items-center justify-center h-full text-sm text-muted-foreground"> <div className="text-center"> |
