From a42873419d14652d3639d2ae02d2ea54653b4749 Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Wed, 2 Jul 2025 04:46:24 +0000
Subject: (김준회) 견적프로젝트 해양 TOP - nonsap(견적물량관리시스템) 데이터
 가져오기 추가
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../table/projects-table-columns.tsx               | 43 ++++++++++++++++------
 1 file changed, 31 insertions(+), 12 deletions(-)

(limited to 'lib/bidding-projects/table/projects-table-columns.tsx')

diff --git a/lib/bidding-projects/table/projects-table-columns.tsx b/lib/bidding-projects/table/projects-table-columns.tsx
index 08530ff0..b8f3b91b 100644
--- a/lib/bidding-projects/table/projects-table-columns.tsx
+++ b/lib/bidding-projects/table/projects-table-columns.tsx
@@ -7,7 +7,7 @@ import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-
 import { BiddingProjects } from "@/db/schema"
 import { bidProjectsColumnsConfig } from "@/config/bidProjectsColumnsConfig"
 import { Button } from "@/components/ui/button"
-import { ListFilter } from "lucide-react" // Import an icon for the button
+import { ListFilter, Edit } from "lucide-react" // Import an icon for the button
 
 interface GetColumnsProps {
   setRowAction: React.Dispatch<React.SetStateAction<DataTableRowAction<BiddingProjects> | null>>
@@ -76,18 +76,37 @@ export function getColumns({ setRowAction }: GetColumnsProps): ColumnDef<Bidding
     id: "actions",
     header: "Actions",
     cell: ({ row }) => {
+      const project = row.original
+      const isTopType = project.pjtType === "TOP"
+      
       return (
-        <Button
-          variant="ghost"
-          size="sm"
-          className="flex items-center gap-1"
-          onClick={() => {
-            setRowAction({ row,type: "view-series" })
-          }}
-        >
-          <ListFilter className="h-4 w-4" />
-          시리즈 보기
-        </Button>
+        <div className="flex items-center gap-1">
+          <Button
+            variant="ghost"
+            size="sm"
+            className="flex items-center gap-1"
+            onClick={() => {
+              setRowAction({ row, type: "view-series" })
+            }}
+          >
+            <ListFilter className="h-4 w-4" />
+            시리즈 보기
+          </Button>
+          
+          {isTopType && (
+            <Button
+              variant="ghost"
+              size="sm"
+              className="flex items-center gap-1"
+              onClick={() => {
+                setRowAction({ row, type: "update" })
+              }}
+            >
+              <Edit className="h-4 w-4" />
+              수정
+            </Button>
+          )}
+        </div>
       )
     },
   }
-- 
cgit v1.2.3

