summaryrefslogtreecommitdiff
path: root/lib/techsales-rfq/table/rfq-table-column.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/techsales-rfq/table/rfq-table-column.tsx')
-rw-r--r--lib/techsales-rfq/table/rfq-table-column.tsx54
1 files changed, 14 insertions, 40 deletions
diff --git a/lib/techsales-rfq/table/rfq-table-column.tsx b/lib/techsales-rfq/table/rfq-table-column.tsx
index e1047fd1..4f7bd499 100644
--- a/lib/techsales-rfq/table/rfq-table-column.tsx
+++ b/lib/techsales-rfq/table/rfq-table-column.tsx
@@ -6,7 +6,7 @@ import { formatDate, formatDateTime } from "@/lib/utils"
import { Checkbox } from "@/components/ui/checkbox"
import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-column-simple-header"
import { DataTableRowAction } from "@/types/table"
-import { Info, Paperclip } from "lucide-react"
+import { Paperclip } from "lucide-react"
import { Button } from "@/components/ui/button"
// 기본적인 RFQ 타입 정의 (rfq-table.tsx 파일과 일치해야 함)
@@ -135,7 +135,7 @@ export function getColumns({
<DataTableColumnHeaderSimple column={column} title="자재명" />
),
cell: ({ row }) => {
- const itemName = row.getValue("itemName");
+ const itemName = row.getValue("itemName") as string | null;
return <div>{itemName || "자재명 없음"}</div>;
},
meta: {
@@ -145,23 +145,22 @@ export function getColumns({
size: 180,
},
{
- accessorKey: "pspid",
- header: ({ column }) => (
- <DataTableColumnHeaderSimple column={column} title="프로젝트 번호" />
- ),
- cell: ({ row }) => <div>{row.getValue("pspid")}</div>,
- meta: {
- excelHeader: "프로젝트 번호"
- },
- enableResizing: true,
- size: 120,
- },
- {
accessorKey: "projNm",
header: ({ column }) => (
<DataTableColumnHeaderSimple column={column} title="프로젝트명" />
),
- cell: ({ row }) => <div>{row.getValue("projNm")}</div>,
+ cell: ({ row }) => {
+ const projNm = row.getValue("projNm") as string;
+ return (
+ <Button
+ variant="link"
+ className="p-0 h-auto font-normal text-left justify-start hover:underline"
+ onClick={() => setRowAction({ row, type: "view" as const })}
+ >
+ {projNm}
+ </Button>
+ );
+ },
meta: {
excelHeader: "프로젝트명"
},
@@ -320,30 +319,5 @@ export function getColumns({
enableResizing: true,
size: 160,
},
- {
- id: "actions",
- header: ({ column }) => (
- <DataTableColumnHeaderSimple column={column} title="액션" />
- ),
- cell: ({ row }) => {
- return (
- <Button
- variant="ghost"
- size="sm"
- onClick={() => setRowAction({ row, type: "view" as const })}
- className="h-8 px-2 gap-1"
- >
- <Info className="h-4 w-4" />
- <span className="hidden sm:inline">프로젝트 상세</span>
- </Button>
- );
- },
- enableSorting: false,
- enableHiding: false,
- enableResizing: false,
- size: 120,
- minSize: 120,
- maxSize: 120,
- },
]
} \ No newline at end of file