diff options
| -rw-r--r-- | app/[lng]/pdftron-viewer/page.tsx | 32 | ||||
| -rw-r--r-- | db/schema/index.ts | 6 | ||||
| -rw-r--r-- | lib/rfq-last/service.ts | 19 |
3 files changed, 44 insertions, 13 deletions
diff --git a/app/[lng]/pdftron-viewer/page.tsx b/app/[lng]/pdftron-viewer/page.tsx index bde60a41..42654663 100644 --- a/app/[lng]/pdftron-viewer/page.tsx +++ b/app/[lng]/pdftron-viewer/page.tsx @@ -4,6 +4,7 @@ import * as React from "react" import { useSearchParams } from "next/navigation" +import { Suspense } from "react" import { Button } from "@/components/ui/button" import { ArrowLeft, MessageSquare, Download, Upload } from "lucide-react" import { Badge } from "@/components/ui/badge" @@ -35,7 +36,8 @@ interface PDFTronComment { updatedAt: Date } -export default function PDFTronViewerPage() { +// PDFTronViewer 컴포넌트 (내부에서 useSearchParams 사용) +function PDFTronViewer() { const { data: session, status } = useSession() const searchParams = useSearchParams() const viewerRef = React.useRef<HTMLDivElement>(null) @@ -504,4 +506,32 @@ export default function PDFTronViewerPage() { </div> </div> ) +} + +// 메인 페이지 컴포넌트 (Suspense로 PDFTronViewer 감싸기) +export default function PDFTronViewerPage() { + return ( + <Suspense fallback={ + <div className="flex flex-col h-screen overflow-hidden"> + <div className="flex items-center justify-between p-4 border-b bg-background flex-shrink-0"> + <div className="flex items-center gap-4"> + <div> + <h1 className="text-lg font-semibold">Document Viewer</h1> + <div className="flex items-center gap-2 text-sm text-muted-foreground"> + <span>Loading...</span> + </div> + </div> + </div> + </div> + <div className="flex-1 flex items-center justify-center"> + <div className="text-center"> + <div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto mb-2"></div> + <p className="text-sm text-muted-foreground">Loading PDF viewer...</p> + </div> + </div> + </div> + }> + <PDFTronViewer /> + </Suspense> + ) }
\ No newline at end of file diff --git a/db/schema/index.ts b/db/schema/index.ts index a3a6d792..12c7cdaf 100644 --- a/db/schema/index.ts +++ b/db/schema/index.ts @@ -16,7 +16,8 @@ export * from './procurementRFQ'; export * from './setting'; export * from './techSales'; export * from './ocr'; -export * from './bRfq'; +// 명시적 import/export로 vendorResponseSummaryView 이름 충돌 방지 +export { vendorResponseSummaryView as bRfqVendorResponseSummaryView } from './bRfq'; export * from './techVendors'; export * from './evaluation'; export * from './evaluationTarget'; @@ -37,7 +38,8 @@ export * from './bidding'; export * from './vendorRegistrations'; export * from './compliance'; export * from './rfqLast'; -export * from './rfqVendor'; +// 명시적 import/export로 vendorResponseSummaryView 이름 충돌 방지 +export { vendorResponseSummaryView as rfqVendorResponseSummaryView } from './rfqVendor'; export * from './generalContract'; export * from './rfqLastTBE'; export * from './pcr'; diff --git a/lib/rfq-last/service.ts b/lib/rfq-last/service.ts index 02429b6a..433f4376 100644 --- a/lib/rfq-last/service.ts +++ b/lib/rfq-last/service.ts @@ -2987,16 +2987,15 @@ async function prepareEmailAttachments(rfqId: number, attachmentIds: number[]) { const isProduction = process.env.NODE_ENV === "production"; const fullPath = isProduction - - path.join( - process.cwd(), - `public`, - revision.filePath - ) - : path.join( - `${process.env.NAS_PATH}`, - revision.filePath - ); + ? path.join( + process.cwd(), + `public`, + revision.filePath + ) + : path.join( + `${process.env.NAS_PATH}`, + revision.filePath + ); const fileBuffer = await fs.readFile(fullPath); emailAttachments.push({ |
