From a8674e6b91fb4d356c311fad0251878de154da53 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 24 Nov 2025 11:16:32 +0000
Subject: (최겸) 구매 입찰 수정(폐찰, 낙찰 결재 기능 추가 등)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/bidding/ProjectSelectorBid.tsx | 27 ++++-----------------------
 1 file changed, 4 insertions(+), 23 deletions(-)

(limited to 'components/bidding/ProjectSelectorBid.tsx')

diff --git a/components/bidding/ProjectSelectorBid.tsx b/components/bidding/ProjectSelectorBid.tsx
index de9e435e..0fc567b3 100644
--- a/components/bidding/ProjectSelectorBid.tsx
+++ b/components/bidding/ProjectSelectorBid.tsx
@@ -1,7 +1,7 @@
 "use client"
 
 import * as React from "react"
-import { Check, ChevronsUpDown, X } from "lucide-react"
+import { Check, ChevronsUpDown } from "lucide-react"
 import { Button } from "@/components/ui/button"
 import { Popover, PopoverTrigger, PopoverContent } from "@/components/ui/popover"
 import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from "@/components/ui/command"
@@ -10,7 +10,7 @@ import { getProjects, type Project } from "@/lib/rfqs/service"
 
 interface ProjectSelectorProps {
   selectedProjectId?: number | null;
-  onProjectSelect: (project: Project) => void;
+  onProjectSelect: (project: Project | null) => void;
   placeholder?: string;
   filterType?: string; // 옵션으로 필터 타입 지정 가능
 }
@@ -76,7 +76,7 @@ export function ProjectSelector({
     // 이미 선택된 프로젝트를 다시 선택하면 선택 해제
     if (selectedProject?.id === project.id) {
       setSelectedProject(null);
-      onProjectSelect(null as any); // 선택 해제를 위해 null 전달
+      onProjectSelect(null); // 선택 해제를 위해 null 전달
       setOpen(false);
       return;
     }
@@ -86,12 +86,6 @@ export function ProjectSelector({
     setOpen(false);
   };
 
-  // 프로젝트 선택 해제
-  const handleClearSelection = (e: React.MouseEvent) => {
-    e.stopPropagation(); // Popover가 열리지 않도록 방지
-    setSelectedProject(null);
-    onProjectSelect(null as any); // 선택 해제를 위해 null 전달
-  };
 
   return (
     <Popover open={open} onOpenChange={setOpen}>
@@ -106,20 +100,7 @@ export function ProjectSelector({
           {isLoading ? (
             "프로젝트 로딩 중..."
           ) : selectedProject ? (
-            <div className="flex items-center justify-between w-full">
-              <span>{selectedProject.projectCode}</span>
-              <div className="flex items-center gap-1">
-                <Button
-                  variant="ghost"
-                  size="sm"
-                  className="h-4 w-4 p-0 hover:bg-destructive hover:text-destructive-foreground"
-                  onClick={handleClearSelection}
-                >
-                  <X className="h-3 w-3" />
-                </Button>
-                <ChevronsUpDown className="h-4 w-4 shrink-0 opacity-50" />
-              </div>
-            </div>
+            <span>{selectedProject.projectCode}</span>
           ) : (
             <div className="flex items-center justify-between w-full">
               <span>{placeholder}</span>
-- 
cgit v1.2.3

