1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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>;
},
},
];
|