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
81
82
83
84
85
86
87
|
"use client";
import { ColumnDef } from "@tanstack/react-table";
import { DwgReceiptItem } from "../actions";
export const drawingListColumns: ColumnDef<DwgReceiptItem>[] = [
{
accessorKey: "DrawingNo",
header: "도면번호",
minSize: 200,
cell: ({ row }) => {
return <div className="font-medium">{row.getValue("DrawingNo")}</div>;
},
},
{
accessorKey: "DrawingName",
header: "도면명",
minSize: 400,
cell: ({ row }) => {
return <div>{row.getValue("DrawingName")}</div>;
},
},
{
accessorKey: "Discipline",
header: "설계공종",
minSize: 80,
},
{
accessorKey: "Manager",
header: "담당자명",
minSize: 200,
cell: ({ row }) => {
const managerENM = row.original.ManagerENM;
const manager = row.getValue("Manager");
return <div>{managerENM || manager}</div>;
},
},
{
accessorKey: "AppDwg_PlanDate",
header: "승인도면 예정일",
minSize: 140,
cell: ({ row }) => {
const date = row.getValue("AppDwg_PlanDate") as string;
if (!date || date.length !== 8) return null;
return `${date.substring(0, 4)}-${date.substring(4, 6)}-${date.substring(6, 8)}`;
},
},
{
accessorKey: "AppDwg_ResultDate",
header: "승인도면 결과일",
minSize: 140,
cell: ({ row }) => {
const date = row.getValue("AppDwg_ResultDate") as string;
if (!date || date.length !== 8) return null;
return `${date.substring(0, 4)}-${date.substring(4, 6)}-${date.substring(6, 8)}`;
},
},
{
accessorKey: "WorDwg_PlanDate",
header: "작업도면 예정일",
minSize: 140,
cell: ({ row }) => {
const date = row.getValue("WorDwg_PlanDate") as string;
if (!date || date.length !== 8) return null;
return `${date.substring(0, 4)}-${date.substring(4, 6)}-${date.substring(6, 8)}`;
},
},
{
accessorKey: "WorDwg_ResultDate",
header: "작업도면 결과일",
minSize: 140,
cell: ({ row }) => {
const date = row.getValue("WorDwg_ResultDate") as string;
if (!date || date.length !== 8) return null;
return `${date.substring(0, 4)}-${date.substring(4, 6)}-${date.substring(6, 8)}`;
},
},
{
accessorKey: "CreateDt",
header: "생성일시",
minSize: 200,
cell: ({ row }) => {
return <div className="text-sm text-muted-foreground">{row.getValue("CreateDt")}</div>;
},
},
];
|