diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/swp/document-service.ts | 11 | ||||
| -rw-r--r-- | lib/swp/table/swp-table-columns.tsx | 2 | ||||
| -rw-r--r-- | lib/swp/table/swp-upload-validation-dialog.tsx | 10 |
3 files changed, 13 insertions, 10 deletions
diff --git a/lib/swp/document-service.ts b/lib/swp/document-service.ts index f83488d9..32126676 100644 --- a/lib/swp/document-service.ts +++ b/lib/swp/document-service.ts @@ -200,14 +200,17 @@ export async function getDocumentList( // 문서에 파일 통계 추가 const result = documents.map((doc) => { - const files = filesByDoc.get(doc.DOC_NO) || []; - const standbyFiles = files.filter((f) => f.STAT === "SCW01"); + const allFiles = filesByDoc.get(doc.DOC_NO) || []; + + // 최신 REV의 파일만 필터링 + const latestRevFiles = allFiles.filter((f) => f.REV_NO === doc.LTST_REV_NO); + const standbyFiles = latestRevFiles.filter((f) => f.STAT === "SCW01"); return { ...doc, - fileCount: files.length, + fileCount: latestRevFiles.length, standbyFileCount: standbyFiles.length, - latestFiles: files + latestFiles: latestRevFiles .sort((a, b) => b.CRTE_DTM.localeCompare(a.CRTE_DTM)) .slice(0, 5), // 최신 5개만 }; diff --git a/lib/swp/table/swp-table-columns.tsx b/lib/swp/table/swp-table-columns.tsx index c5f1f826..14a8e002 100644 --- a/lib/swp/table/swp-table-columns.tsx +++ b/lib/swp/table/swp-table-columns.tsx @@ -96,7 +96,7 @@ export const swpDocumentColumns: ColumnDef<DocumentListItem>[] = [ }, { accessorKey: "STAGE", - header: "스테이지", + header: "최신 스테이지", cell: ({ row }) => { const stage = row.original.STAGE; if (!stage) return "-"; diff --git a/lib/swp/table/swp-upload-validation-dialog.tsx b/lib/swp/table/swp-upload-validation-dialog.tsx index a7cdb7c5..803b1564 100644 --- a/lib/swp/table/swp-upload-validation-dialog.tsx +++ b/lib/swp/table/swp-upload-validation-dialog.tsx @@ -232,15 +232,15 @@ export function SwpUploadValidationDialog({ return ( <Dialog open={open} onOpenChange={onOpenChange}> - <DialogContent className="max-w-3xl max-h-[80vh]"> - <DialogHeader> + <DialogContent className="max-w-3xl max-h-[80vh] flex flex-col"> + <DialogHeader className="flex-shrink-0"> <DialogTitle>파일 업로드 검증</DialogTitle> <DialogDescription> 선택한 파일의 파일명 형식을 검증합니다 </DialogDescription> </DialogHeader> - <div className="space-y-4"> + <div className="space-y-4 overflow-auto flex-1 pr-2"> {/* 요약 통계 */} <div className="grid grid-cols-3 gap-4"> <div className="rounded-lg border p-3"> @@ -282,7 +282,7 @@ export function SwpUploadValidationDialog({ )} {/* 파일 목록 */} - <div className="max-h-[400px] overflow-auto rounded-md border p-4"> + <div className="max-h-[50vh] overflow-auto rounded-md border p-4"> <div className="space-y-3"> {/* 검증 성공 파일 */} {validFiles.length > 0 && ( @@ -396,7 +396,7 @@ export function SwpUploadValidationDialog({ </div> </div> - <DialogFooter> + <DialogFooter className="flex-shrink-0"> <Button variant="outline" onClick={handleCancel} |
