summaryrefslogtreecommitdiff
path: root/lib/po/vendor-table/shi-vendor-po-columns.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/po/vendor-table/shi-vendor-po-columns.tsx')
-rw-r--r--lib/po/vendor-table/shi-vendor-po-columns.tsx59
1 files changed, 30 insertions, 29 deletions
diff --git a/lib/po/vendor-table/shi-vendor-po-columns.tsx b/lib/po/vendor-table/shi-vendor-po-columns.tsx
index 041e0c05..356b3dab 100644
--- a/lib/po/vendor-table/shi-vendor-po-columns.tsx
+++ b/lib/po/vendor-table/shi-vendor-po-columns.tsx
@@ -6,7 +6,9 @@ import {
SendIcon,
FileTextIcon,
MoreHorizontalIcon,
+ EyeIcon,
} from "lucide-react"
+import { useRouter, useParams } from "next/navigation"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
@@ -404,8 +406,34 @@ export function getShiVendorColumns({
enableHiding: false,
header: () => <div className="text-center">Actions</div>,
cell: ({ row }) => {
+ // eslint-disable-next-line react-hooks/rules-of-hooks
+ const router = useRouter()
+ // eslint-disable-next-line react-hooks/rules-of-hooks
+ const params = useParams()
+ const lng = params.lng as string
+
return (
<div className="flex items-center justify-center gap-2">
+ {/* 계약 상세보기 버튼 */}
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ variant="outline"
+ size="sm"
+ className="h-8 px-2"
+ onClick={() => router.push(`/${lng}/evcp/po/${row.original.id}`)}
+ >
+ <EyeIcon className="h-3.5 w-3.5 mr-1" aria-hidden="true" />
+ 상세
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>
+ 계약 상세 정보 보기
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+
{/* 서명 요청 버튼 */}
<TooltipProvider>
<Tooltip>
@@ -425,38 +453,11 @@ export function getShiVendorColumns({
</TooltipContent>
</Tooltip>
</TooltipProvider>
-
- {/* 드롭다운 메뉴 (추가 액션)
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <Button variant="ghost" className="h-8 w-8 p-0">
- <span className="sr-only">Open menu</span>
- <MoreHorizontalIcon className="h-4 w-4" />
- </Button>
- </DropdownMenuTrigger>
- <DropdownMenuContent align="end">
- <DropdownMenuLabel>액션</DropdownMenuLabel>
- <DropdownMenuItem
- onClick={() => setRowAction({ row, type: "view-items" })}
- >
- <FileTextIcon className="mr-2 h-4 w-4" />
- 상세품목 보기
- </DropdownMenuItem>
- <DropdownMenuSeparator />
- <DropdownMenuItem
- onClick={() => setRowAction({ row, type: "signature-request" })}
- className="text-blue-600"
- >
- <SendIcon className="mr-2 h-4 w-4" />
- 서명 요청
- </DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu> */}
</div>
)
},
- size: 160,
- minSize: 160,
+ size: 200,
+ minSize: 200,
},
]
} \ No newline at end of file