summaryrefslogtreecommitdiff
path: root/lib/dolce/table/drawing-list-columns.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dolce/table/drawing-list-columns.tsx')
-rw-r--r--lib/dolce/table/drawing-list-columns.tsx146
1 files changed, 73 insertions, 73 deletions
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>;
+ },
+ },
+ ];
+}