diff options
| author | joonhoekim <26rote@gmail.com> | 2025-07-02 04:46:24 +0000 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-07-02 04:46:24 +0000 |
| commit | a42873419d14652d3639d2ae02d2ea54653b4749 (patch) | |
| tree | 3823f94d9c919f88f05fdfa5f262ea093447e24a /lib/bidding-projects/table/projects-table-columns.tsx | |
| parent | 2acf5f8966a40c1c9a97680c8dc263ee3f1ad3d1 (diff) | |
(김준회) 견적프로젝트 해양 TOP - nonsap(견적물량관리시스템) 데이터 가져오기 추가
Diffstat (limited to 'lib/bidding-projects/table/projects-table-columns.tsx')
| -rw-r--r-- | lib/bidding-projects/table/projects-table-columns.tsx | 43 |
1 files changed, 31 insertions, 12 deletions
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> ) }, } |
