From bac0228d21b7195065e9cddcc327ae33659c7bcc Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Sun, 1 Jun 2025 13:52:21 +0000
Subject: (대표님) 20250601까지 작업사항
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../table/enhanced-doc-table-toolbar-actions.tsx   | 25 +++++++++++++++-------
 1 file changed, 17 insertions(+), 8 deletions(-)

(limited to 'lib/vendor-document-list/table/enhanced-doc-table-toolbar-actions.tsx')

diff --git a/lib/vendor-document-list/table/enhanced-doc-table-toolbar-actions.tsx b/lib/vendor-document-list/table/enhanced-doc-table-toolbar-actions.tsx
index 368b1e1c..fa1b957b 100644
--- a/lib/vendor-document-list/table/enhanced-doc-table-toolbar-actions.tsx
+++ b/lib/vendor-document-list/table/enhanced-doc-table-toolbar-actions.tsx
@@ -40,6 +40,16 @@ export function EnhancedDocTableToolbarActions({
     // 필요시 추가 액션 수행
   }
 
+  const handleDocumentAdded = () => {
+    // 테이블 새로고침
+    table.resetRowSelection()
+    
+    // 추가적인 새로고침 시도
+    setTimeout(() => {
+      window.location.reload() // 강제 새로고침
+    }, 500)
+  }
+
   return (
     <div className="flex items-center gap-2">
       {/* 기존 액션들 */}
@@ -52,14 +62,13 @@ export function EnhancedDocTableToolbarActions({
         />
       ) : null}
 
-      {/* 메인 액션 버튼들 */}
-      {projectType === "plant" && (
-        <Button onClick={onNewDocument} className="flex items-center gap-2">
-          <Plus className="w-4 h-4" />
-          새 문서
-        </Button>
-      )}
-            
+      {/* ✅ AddDocumentListDialog에 필요한 props 전달 */}
+      <AddDocumentListDialog 
+        projectType={projectType}
+        contractId={selectedPackageId}
+        onSuccess={handleDocumentAdded} // ✅ 성공 콜백 추가
+      />
+               
       {/* 일괄 업로드 버튼 */}
       <Button
         variant="outline"
-- 
cgit v1.2.3

