From 85d32a79dcf0f7047406039363baa2e06b859ddd Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Mon, 17 Nov 2025 14:06:08 +0900 Subject: (김준회) swp: 파일개수는 최신 rev에 대해서만 보이도록 수정, upload validation dialog의 content overflow 문제 수정(스타일) - 박진석 프로 요청 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/swp/document-service.ts | 11 +++++++---- lib/swp/table/swp-table-columns.tsx | 2 +- lib/swp/table/swp-upload-validation-dialog.tsx | 10 +++++----- 3 files changed, 13 insertions(+), 10 deletions(-) (limited to 'lib/swp') 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[] = [ }, { 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 ( - - + + 파일 업로드 검증 선택한 파일의 파일명 형식을 검증합니다 -
+
{/* 요약 통계 */}
@@ -282,7 +282,7 @@ export function SwpUploadValidationDialog({ )} {/* 파일 목록 */} -
+
{/* 검증 성공 파일 */} {validFiles.length > 0 && ( @@ -396,7 +396,7 @@ export function SwpUploadValidationDialog({
- +