From dfdfae3018f8499240f48d28ce634f4a5c56e006 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Wed, 2 Apr 2025 09:54:08 +0000
Subject: 벤더 코멘트 처리
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/pq/project-select-wrapper.tsx | 35 ++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 components/pq/project-select-wrapper.tsx

(limited to 'components/pq/project-select-wrapper.tsx')

diff --git a/components/pq/project-select-wrapper.tsx b/components/pq/project-select-wrapper.tsx
new file mode 100644
index 00000000..1405ab02
--- /dev/null
+++ b/components/pq/project-select-wrapper.tsx
@@ -0,0 +1,35 @@
+"use client"
+
+import * as React from "react"
+import { useRouter } from "next/navigation"
+import { type Project } from "@/lib/rfqs/service"
+import { ProjectSelector } from "./project-select"
+
+interface ProjectSelectorWrapperProps {
+  selectedProjectId?: number | null
+}
+
+export function ProjectSelectorWrapper({ selectedProjectId }: ProjectSelectorWrapperProps) {
+  const router = useRouter()
+  
+  const handleProjectSelect = (project: Project | null) => {
+    if (project && project.id) {
+      router.push(`/evcp/pq-criteria/${project.id}`)
+    } else {
+      // 프로젝트가 null인 경우 (선택 해제)
+      router.push(`/evcp/pq-criteria`)
+    }
+  }
+  
+  return (
+    <div className="w-[400px]">
+      <ProjectSelector 
+        selectedProjectId={selectedProjectId}
+        onProjectSelect={handleProjectSelect}
+        placeholder="프로젝트를 선택하세요"
+        showClearOption={true}
+        clearOptionText="일반 PQ 보기"
+      />
+    </div>
+  )
+}
\ No newline at end of file
-- 
cgit v1.2.3

