From e9897d416b3e7327bbd4d4aef887eee37751ae82 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Fri, 27 Jun 2025 01:16:20 +0000
Subject: (대표님) 20250627 오전 10시 작업사항
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../table/reg-eval-criteria-columns.tsx            | 69 ++++++++++++++++++++--
 1 file changed, 64 insertions(+), 5 deletions(-)

(limited to 'lib/evaluation-criteria/table/reg-eval-criteria-columns.tsx')

diff --git a/lib/evaluation-criteria/table/reg-eval-criteria-columns.tsx b/lib/evaluation-criteria/table/reg-eval-criteria-columns.tsx
index 7367fabb..77e6118d 100644
--- a/lib/evaluation-criteria/table/reg-eval-criteria-columns.tsx
+++ b/lib/evaluation-criteria/table/reg-eval-criteria-columns.tsx
@@ -15,8 +15,8 @@ import {
 import { PenToolIcon, TrashIcon } from 'lucide-react';
 import {
   REG_EVAL_CRITERIA_CATEGORY,
-  REG_EVAL_CRITERIA_ITEM,
   REG_EVAL_CRITERIA_CATEGORY2,
+  REG_EVAL_CRITERIA_ITEM,
   type RegEvalCriteriaView,
 } from '@/db/schema';
 import { type ColumnDef } from '@tanstack/react-table';
@@ -85,12 +85,12 @@ function getColumns({ setRowAction }: GetColumnsProps): ColumnDef<RegEvalCriteri
       },
     },
     {
-      accessorKey: 'scoreCategory',
+      accessorKey: 'category2',
       header: ({ column }) => (
         <DataTableColumnHeaderSimple column={column} title="점수구분" />
       ),
       cell: ({ row }) => {
-        const value = row.getValue<string>('scoreCategory');
+        const value = row.getValue<string>('category2');
         const label = REG_EVAL_CRITERIA_CATEGORY2.find(item => item.value === value)?.label ?? value;
         return (
           <Badge variant="secondary">
@@ -250,7 +250,7 @@ function getColumns({ setRowAction }: GetColumnsProps): ColumnDef<RegEvalCriteri
       enableSorting: true,
       enableHiding: false,
       meta: {
-        excelHeader: 'Bulk-Shipbuiling Score',
+        excelHeader: 'Bulk-Shipbuilding Score',
         group: 'Bulk Score',
         type: 'number',
       },
@@ -300,7 +300,65 @@ function getColumns({ setRowAction }: GetColumnsProps): ColumnDef<RegEvalCriteri
     },
   };
 
-  // [5] ACTIONS COLUMN - DROPDOWN MENU
+  // [5] HIDDEN ID COLUMN
+  const hiddenColumns: ColumnDef<RegEvalCriteriaView>[] = [
+    {
+      accessorKey: 'id',
+      header: ({ column }) => (
+        <DataTableColumnHeaderSimple column={column} title="ID" />
+      ),
+      cell: ({ row }) => (
+        <div className="font-regular">
+          {row.getValue('id')}
+        </div>
+      ),
+      enableSorting: true,
+      enableHiding: true,
+      meta: {
+        excelHeader: 'ID',
+        group: 'Meta Data',
+        type: 'number',
+      },
+    },
+    {
+      accessorKey: 'criteriaId',
+      header: ({ column }) => (
+        <DataTableColumnHeaderSimple column={column} title="기준 ID" />
+      ),
+      cell: ({ row }) => (
+        <div className="font-regular">
+          {row.getValue('criteriaId')}
+        </div>
+      ),
+      enableSorting: true,
+      enableHiding: true,
+      meta: {
+        excelHeader: 'Criteria ID',
+        group: 'Meta Data',
+        type: 'criteriaId',
+      },
+    },
+    {
+      accessorKey: 'orderIndex',
+      header: ({ column }) => (
+        <DataTableColumnHeaderSimple column={column} title="정렬 순서" />
+      ),
+      cell: ({ row }) => (
+        <div className="font-regular">
+          {row.getValue('orderIndex')}
+        </div>
+      ),
+      enableSorting: true,
+      enableHiding: true,
+      meta: {
+        excelHeader: 'Order Index',
+        group: 'Meta Data',
+        type: 'number',
+      },
+    },
+  ];
+
+  // [6] ACTIONS COLUMN - DROPDOWN MENU
   const actionsColumn: ColumnDef<RegEvalCriteriaView> = {
     id: 'actions',
     header: '작업',
@@ -353,6 +411,7 @@ function getColumns({ setRowAction }: GetColumnsProps): ColumnDef<RegEvalCriteri
         },
       ],
     },
+    ...hiddenColumns,
     remarksColumn,
     actionsColumn,
   ];
-- 
cgit v1.2.3

