summaryrefslogtreecommitdiff
path: root/lib/vendor-document-list/ship/enhanced-doc-table-toolbar-actions.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-06-13 07:11:18 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-06-13 07:11:18 +0000
commit0fddf148402fd6b99a1b3800d73679899bcb2ed3 (patch)
treeeb51c02e6fa6037ddcc38a3b57d10d8c739125cf /lib/vendor-document-list/ship/enhanced-doc-table-toolbar-actions.tsx
parentc72d0897f7b37843109c86f61d97eba05ba3ca0d (diff)
(대표님) 20250613 16시 10분 global css, b-rfq, document 등
Diffstat (limited to 'lib/vendor-document-list/ship/enhanced-doc-table-toolbar-actions.tsx')
-rw-r--r--lib/vendor-document-list/ship/enhanced-doc-table-toolbar-actions.tsx73
1 files changed, 8 insertions, 65 deletions
diff --git a/lib/vendor-document-list/ship/enhanced-doc-table-toolbar-actions.tsx b/lib/vendor-document-list/ship/enhanced-doc-table-toolbar-actions.tsx
index 3960bbce..508d8c91 100644
--- a/lib/vendor-document-list/ship/enhanced-doc-table-toolbar-actions.tsx
+++ b/lib/vendor-document-list/ship/enhanced-doc-table-toolbar-actions.tsx
@@ -6,29 +6,18 @@ import { toast } from "sonner"
import { exportTableToExcel } from "@/lib/export"
import { Button } from "@/components/ui/button"
-import { EnhancedDocumentsView } from "@/db/schema/vendorDocu"
-import { AddDocumentListDialog } from "./add-doc-dialog"
-import { DeleteDocumentsDialog } from "./delete-docs-dialog"
-import { BulkUploadDialog } from "./bulk-upload-dialog"
-import type { EnhancedDocument } from "@/types/enhanced-documents"
+import { SimplifiedDocumentsView } from "@/db/schema/vendorDocu"
import { SendToSHIButton } from "./send-to-shi-button"
import { ImportFromDOLCEButton } from "./import-from-dolce-button"
-import { SWPWorkflowPanel } from "./swp-workflow-panel"
interface EnhancedDocTableToolbarActionsProps {
- table: Table<EnhancedDocument>
+ table: Table<SimplifiedDocumentsView>
projectType: "ship" | "plant"
- selectedPackageId: number
- onNewDocument: () => void
- onBulkAction: (action: string, selectedRows: any[]) => Promise<void>
}
export function EnhancedDocTableToolbarActions({
table,
projectType,
- selectedPackageId,
- onNewDocument,
- onBulkAction
}: EnhancedDocTableToolbarActionsProps) {
const [bulkUploadDialogOpen, setBulkUploadDialogOpen] = React.useState(false)
@@ -61,45 +50,15 @@ export function EnhancedDocTableToolbarActions({
return (
<div className="flex items-center gap-2">
- {/* 삭제 버튼 */}
- {table.getFilteredSelectedRowModel().rows.length > 0 ? (
- <DeleteDocumentsDialog
- documents={table
- .getFilteredSelectedRowModel()
- .rows.map((row) => row.original)}
- onSuccess={() => table.toggleAllRowsSelected(false)}
- />
- ) : null}
-
- {/* projectType에 따른 조건부 렌더링 */}
- {projectType === "ship" ? (
+
<>
{/* SHIP: DOLCE에서 목록 가져오기 */}
<ImportFromDOLCEButton
- contractId={selectedPackageId}
+ allDocuments={allDocuments}
onImportComplete={handleImportComplete}
/>
</>
- ) : (
- <>
- {/* PLANT: 수동 문서 추가 */}
- <AddDocumentListDialog
- projectType={projectType}
- contractId={selectedPackageId}
- onSuccess={handleDocumentAdded}
- />
- </>
- )}
-
- {/* 일괄 업로드 버튼 (공통) */}
- <Button
- variant="outline"
- onClick={() => setBulkUploadDialogOpen(true)}
- className="flex items-center gap-2"
- >
- <Files className="w-4 h-4" />
- 일괄 업로드
- </Button>
+
{/* Export 버튼 (공통) */}
<Button
@@ -118,30 +77,14 @@ export function EnhancedDocTableToolbarActions({
</Button>
{/* Send to SHI 버튼 (공통) - 내부 → 외부로 보내기 */}
- <SendToSHIButton
+ {/* <SendToSHIButton
contractId={selectedPackageId}
documents={allDocuments}
onSyncComplete={handleSyncComplete}
projectType={projectType}
- />
-
- {/* SWP 전용 워크플로우 패널 */}
- {projectType === "plant" && (
- <SWPWorkflowPanel
- contractId={selectedPackageId}
- documents={allDocuments}
- onWorkflowUpdate={handleSyncComplete}
- />
- )}
+ /> */}
- {/* 일괄 업로드 다이얼로그 */}
- <BulkUploadDialog
- open={bulkUploadDialogOpen}
- onOpenChange={setBulkUploadDialogOpen}
- documents={allDocuments}
- projectType={projectType}
- contractId={selectedPackageId}
- />
+
</div>
)
} \ No newline at end of file