From e0dfb55c5457aec489fc084c4567e791b4c65eb1 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Wed, 26 Mar 2025 00:37:41 +0000 Subject: 3/25 까지의 대표님 작업사항 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/documents/document-container.tsx | 85 +++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 components/documents/document-container.tsx (limited to 'components/documents/document-container.tsx') diff --git a/components/documents/document-container.tsx b/components/documents/document-container.tsx new file mode 100644 index 00000000..0a1a4a56 --- /dev/null +++ b/components/documents/document-container.tsx @@ -0,0 +1,85 @@ +"use client" + +import { useState } from "react" + +// shadcn/ui components +import { + ResizablePanelGroup, + ResizablePanel, + ResizableHandle, +} from "@/components/ui/resizable" + +import { cn } from "@/lib/utils" +import StageList from "./StageList" +import RevisionForm from "./RevisionForm" +import { getVendorDocumentLists } from "@/lib/vendor-document/service" +import { VendorDocumentsView } from "@/db/schema/vendorDocu" +import { DocumentListTable } from "@/lib/vendor-document/table/doc-table" +import StageSHIList from "./StageListfromSHI" + +interface DocumentContainerProps { + promises: Promise<[Awaited>]> + selectedPackageId: number +} + +export default function DocumentContainer({ + promises, + selectedPackageId +}: DocumentContainerProps) { + // 선택된 문서를 이 state로 관리 + const [selectedDocument, setSelectedDocument] = useState(null) + + // 패널 collapse 상태 + const [isTopCollapsed, setIsTopCollapsed] = useState(false) + const [isBottomLeftCollapsed, setIsBottomLeftCollapsed] = useState(false) + const [isBottomRightCollapsed, setIsBottomRightCollapsed] = useState(false) + + // 문서 선택 핸들러 + const handleSelectDocument = (document: VendorDocumentsView | null) => { + setSelectedDocument(document) + } + + return ( + // 명시적 높이 지정 +
+ + + {/* 상단 패널 (문서 리스트 영역) */} + setIsTopCollapsed(true)} + onExpand={() => setIsTopCollapsed(false)} + className={cn("overflow-auto border-b", isTopCollapsed && "transition-all")} + > + + + + {/* 상/하 분할을 위한 핸들 */} + + + + + {selectedDocument ? ( + + ) : ( +
+ 문서를 선택하면 이슈 스테이지가 표시됩니다. +
+ )} + +
+
+
+ ) +} \ No newline at end of file -- cgit v1.2.3