From 610d3bccf1cb640e2a21df28d8d2a954c2bf337e Mon Sep 17 00:00:00 2001 From: dujinkim Date: Thu, 5 Jun 2025 01:53:35 +0000 Subject: (대표님) 변경사항 0604 - OCR 관련 및 drizzle generated sqls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../table/enhanced-doc-table-toolbar-actions.tsx | 57 +++++++++++++++++----- 1 file changed, 44 insertions(+), 13 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 fa1b957b..3960bbce 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 @@ -1,8 +1,7 @@ "use client" - import * as React from "react" import { type Table } from "@tanstack/react-table" -import { Download, Upload, Plus, Files } from "lucide-react" +import { Download, Upload, Plus, Files, RefreshCw } from "lucide-react" import { toast } from "sonner" import { exportTableToExcel } from "@/lib/export" @@ -13,6 +12,8 @@ import { DeleteDocumentsDialog } from "./delete-docs-dialog" import { BulkUploadDialog } from "./bulk-upload-dialog" import type { EnhancedDocument } from "@/types/enhanced-documents" import { SendToSHIButton } from "./send-to-shi-button" +import { ImportFromDOLCEButton } from "./import-from-dolce-button" +import { SWPWorkflowPanel } from "./swp-workflow-panel" interface EnhancedDocTableToolbarActionsProps { table: Table @@ -50,9 +51,17 @@ export function EnhancedDocTableToolbarActions({ }, 500) } + const handleImportComplete = () => { + // 가져오기 완료 후 테이블 새로고침 + table.resetRowSelection() + setTimeout(() => { + window.location.reload() + }, 500) + } + return (
- {/* 기존 액션들 */} + {/* 삭제 버튼 */} {table.getFilteredSelectedRowModel().rows.length > 0 ? ( ) : null} - {/* ✅ AddDocumentListDialog에 필요한 props 전달 */} - - - {/* 일괄 업로드 버튼 */} + {/* projectType에 따른 조건부 렌더링 */} + {projectType === "ship" ? ( + <> + {/* SHIP: DOLCE에서 목록 가져오기 */} + + + ) : ( + <> + {/* PLANT: 수동 문서 추가 */} + + + )} + + {/* 일괄 업로드 버튼 (공통) */} - {/* Export 버튼 */} + {/* Export 버튼 (공통) */} - {/* ✅ 새로운 Send to SHI 버튼으로 교체 */} + {/* Send to SHI 버튼 (공통) - 내부 → 외부로 보내기 */} + {/* SWP 전용 워크플로우 패널 */} + {projectType === "plant" && ( + + )} + {/* 일괄 업로드 다이얼로그 */}