summaryrefslogtreecommitdiff
path: root/lib/dolce/table/drawing-list-columns.tsx
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-11-23 16:40:37 +0900
committerjoonhoekim <26rote@gmail.com>2025-11-23 16:40:37 +0900
commitfd4909bba7be8abc1eeab9ae1b4621c66a61604a (patch)
treed375995611de80b55b344b1c536c5a760f06ccb6 /lib/dolce/table/drawing-list-columns.tsx
parenta2e0785c8749c4d3766ecf3b70edfb7c2fe4df20 (diff)
(김준회) 돌체 재개발 - 1차 (다운로드 오류 수정 필요)
Diffstat (limited to 'lib/dolce/table/drawing-list-columns.tsx')
-rw-r--r--lib/dolce/table/drawing-list-columns.tsx87
1 files changed, 87 insertions, 0 deletions
diff --git a/lib/dolce/table/drawing-list-columns.tsx b/lib/dolce/table/drawing-list-columns.tsx
new file mode 100644
index 00000000..0e18266d
--- /dev/null
+++ b/lib/dolce/table/drawing-list-columns.tsx
@@ -0,0 +1,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>;
+ },
+ },
+];
+