diff options
Diffstat (limited to 'lib/dolce/table/detail-drawing-columns.tsx')
| -rw-r--r-- | lib/dolce/table/detail-drawing-columns.tsx | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/lib/dolce/table/detail-drawing-columns.tsx b/lib/dolce/table/detail-drawing-columns.tsx new file mode 100644 index 00000000..7f519179 --- /dev/null +++ b/lib/dolce/table/detail-drawing-columns.tsx @@ -0,0 +1,80 @@ +"use client"; + +import { ColumnDef } from "@tanstack/react-table"; +import { DetailDwgReceiptItem } from "../actions"; + +export const detailDrawingColumns: ColumnDef<DetailDwgReceiptItem>[] = [ + { + accessorKey: "RegisterSerialNo", + header: "일련번호", + minSize: 80, + cell: ({ row }) => { + return <div className="text-center">{row.getValue("RegisterSerialNo")}</div>; + }, + }, + { + accessorKey: "DrawingRevNo", + header: "Revision", + minSize: 100, + cell: ({ row }) => { + return <div className="font-medium">{row.getValue("DrawingRevNo")}</div>; + }, + }, + { + accessorKey: "Status", + header: "상태", + minSize: 120, + cell: ({ row }) => { + return <div className="text-center">{row.getValue("Status")}</div>; + }, + }, + { + accessorKey: "CategoryENM", + header: "카테고리", + minSize: 120, + cell: ({ row }) => { + const categoryENM = row.getValue("CategoryENM") as string; + const categoryNM = row.original.CategoryNM; + return <div>{categoryENM || categoryNM}</div>; + }, + }, + { + accessorKey: "DrawingUsageENM", + header: "도면용도", + minSize: 100, + cell: ({ row }) => { + const usageENM = row.getValue("DrawingUsageENM") as string | null; + const usageNM = row.original.DrawingUsageNM; + return <div>{usageENM || usageNM}</div>; + }, + }, + { + accessorKey: "RegisterKindENM", + header: "등록종류", + minSize: 180, + cell: ({ row }) => { + const kindENM = row.getValue("RegisterKindENM") as string | null; + const kindNM = row.original.RegisterKindNM; + return <div>{kindENM || kindNM}</div>; + }, + }, + { + accessorKey: "CreateUserNM", + header: "생성자", + minSize: 150, + cell: ({ row }) => { + const userENM = row.original.CreateUserENM; + const userNM = row.getValue("CreateUserNM") as string; + return <div>{userENM || userNM}</div>; + }, + }, + { + accessorKey: "CreateDt", + header: "생성일시", + minSize: 200, + cell: ({ row }) => { + return <div className="text-sm text-muted-foreground">{row.getValue("CreateDt")}</div>; + }, + }, +]; + |
