From c54a2445b6285d06c0ce3afa1cd3aa6aecf6de94 Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Mon, 24 Nov 2025 20:13:50 +0900
Subject: (김준회) dolce rebuild: i18n 지원
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/dolce/table/drawing-list-columns.tsx | 146 +++++++++++++++----------------
 1 file changed, 73 insertions(+), 73 deletions(-)

(limited to 'lib/dolce/table/drawing-list-columns.tsx')

diff --git a/lib/dolce/table/drawing-list-columns.tsx b/lib/dolce/table/drawing-list-columns.tsx
index 0e18266d..58631084 100644
--- a/lib/dolce/table/drawing-list-columns.tsx
+++ b/lib/dolce/table/drawing-list-columns.tsx
@@ -2,86 +2,86 @@
 
 import { ColumnDef } from "@tanstack/react-table";
 import { DwgReceiptItem } from "../actions";
+import { formatDolceDateYYYYMMDD, formatDolceDateTime } from "../utils/date-formatter";
 
-export const drawingListColumns: ColumnDef<DwgReceiptItem>[] = [
-  {
-    accessorKey: "DrawingNo",
-    header: "도면번호",
-    minSize: 200,
-    cell: ({ row }) => {
-      return <div className="font-medium">{row.getValue("DrawingNo")}</div>;
+export function drawingListColumns(lng: string, t: any): ColumnDef<DwgReceiptItem>[] {
+  return [
+    {
+      accessorKey: "DrawingNo",
+      header: t("drawingList.columns.drawingNo"),
+      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: "DrawingName",
+      header: t("drawingList.columns.drawingName"),
+      minSize: 600,
+      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: "Discipline",
+      header: t("drawingList.columns.discipline"),
+      minSize: 80,
     },
-  },
-  {
-    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: "Manager",
+      header: t("drawingList.columns.manager"),
+      minSize: 200,
+      cell: ({ row }) => {
+        const managerENM = row.original.ManagerENM;
+        const manager = row.getValue("Manager");
+        return <div>{managerENM || manager}</div>;
+      },
     },
-  },
-  {
-    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: "AppDwg_PlanDate",
+      header: t("drawingList.columns.appDwgPlanDate"),
+      minSize: 140,
+      cell: ({ row }) => {
+        const date = row.getValue("AppDwg_PlanDate") as string;
+        return formatDolceDateYYYYMMDD(date);
+      },
     },
-  },
-  {
-    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: "AppDwg_ResultDate",
+      header: t("drawingList.columns.appDwgResultDate"),
+      minSize: 140,
+      cell: ({ row }) => {
+        const date = row.getValue("AppDwg_ResultDate") as string;
+        return formatDolceDateYYYYMMDD(date);
+      },
     },
-  },
-  {
-    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: "WorDwg_PlanDate",
+      header: t("drawingList.columns.worDwgPlanDate"),
+      minSize: 140,
+      cell: ({ row }) => {
+        const date = row.getValue("WorDwg_PlanDate") as string;
+        return formatDolceDateYYYYMMDD(date);
+      },
     },
-  },
-  {
-    accessorKey: "CreateDt",
-    header: "생성일시",
-    minSize: 200,
-    cell: ({ row }) => {
-      return <div className="text-sm text-muted-foreground">{row.getValue("CreateDt")}</div>;
+    {
+      accessorKey: "WorDwg_ResultDate",
+      header: t("drawingList.columns.worDwgResultDate"),
+      minSize: 140,
+      cell: ({ row }) => {
+        const date = row.getValue("WorDwg_ResultDate") as string;
+        return formatDolceDateYYYYMMDD(date);
+      },
     },
-  },
-];
+    {
+      accessorKey: "CreateDt",
+      header: t("drawingList.columns.createDt"),
+      minSize: 260,
+      cell: ({ row }) => {
+        const date = row.getValue("CreateDt") as string;
+        return <div className="text-sm text-muted-foreground">{formatDolceDateTime(date)}</div>;
+      },
+    },
+  ];
+}
 
-- 
cgit v1.2.3

