From 45f4c426c98d86a251644a4858740bec989edf83 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Tue, 20 May 2025 09:01:22 +0000
Subject: (최겸) 기술영업 아이템리스트 수정 및 개발 0520
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../table/hull/offshore-hull-table-columns.tsx     | 116 +++------------------
 1 file changed, 14 insertions(+), 102 deletions(-)

(limited to 'lib/items-tech/table/hull/offshore-hull-table-columns.tsx')

diff --git a/lib/items-tech/table/hull/offshore-hull-table-columns.tsx b/lib/items-tech/table/hull/offshore-hull-table-columns.tsx
index f5db40d8..7bc02173 100644
--- a/lib/items-tech/table/hull/offshore-hull-table-columns.tsx
+++ b/lib/items-tech/table/hull/offshore-hull-table-columns.tsx
@@ -23,10 +23,8 @@ interface OffshoreHullTableItem {
   id: number;
   itemId: number;
   workType: "HA" | "HE" | "HH" | "HM" | "NC";
-  itemList1: string | null;
-  itemList2: string | null;
-  itemList3: string | null;
-  itemList4: string | null;
+  itemList: string | null;
+  subItemList: string | null;
   itemCode: string;
   itemName: string;
   description: string | null;
@@ -107,11 +105,10 @@ export function getOffshoreHullColumns({ setRowAction }: GetColumnsProps): Colum
   }
 
   // ----------------------------------------------------------------
-  // 3) 데이터 컬럼들을 그룹별로 구성
+  // 3) 데이터 컬럼들 정의
   // ----------------------------------------------------------------
   
-  // 3-1) 기본 정보 그룹 컬럼
-  const basicInfoColumns: ColumnDef<OffshoreHullTableItem>[] = [
+  const dataColumns: ColumnDef<OffshoreHullTableItem>[] = [
     {
       accessorKey: "itemCode",
       header: ({ column }) => (
@@ -122,20 +119,6 @@ export function getOffshoreHullColumns({ setRowAction }: GetColumnsProps): Colum
       enableHiding: true,
       meta: {
         excelHeader: "Material Group",
-        group: "기본 정보",
-      },
-    },
-    {
-      accessorKey: "itemName",
-      header: ({ column }) => (
-        <DataTableColumnHeaderSimple column={column} title="Description" />
-      ),
-      cell: ({ row }) => <div>{row.original.itemName}</div>,
-      enableSorting: true,
-      enableHiding: true,
-      meta: {
-        excelHeader: "Description",
-        group: "기본 정보",
       },
     },
     {
@@ -148,82 +131,32 @@ export function getOffshoreHullColumns({ setRowAction }: GetColumnsProps): Colum
       enableHiding: true,
       meta: {
         excelHeader: "기능(공종)",
-        group: "기본 정보",
-      },
-    },
-    {
-      accessorKey: "description",
-      header: ({ column }) => (
-        <DataTableColumnHeaderSimple column={column} title="Size/Dimension" />
-      ),
-      cell: ({ row }) => <div>{row.original.description || "-"}</div>,
-      enableSorting: true,
-      enableHiding: true,
-      meta: {
-        excelHeader: "Size/Dimension",
-        group: "기본 정보",
-      },
-    },
-  ]
-  
-  // 3-2) 아이템 리스트 그룹 컬럼
-  const itemListColumns: ColumnDef<OffshoreHullTableItem>[] = [
-    {
-      accessorKey: "itemList1",
-      header: ({ column }) => (
-        <DataTableColumnHeaderSimple column={column} title="아이템 리스트 1" />
-      ),
-      cell: ({ row }) => <div>{row.original.itemList1 || "-"}</div>,
-      enableSorting: true,
-      enableHiding: true,
-      meta: {
-        excelHeader: "아이템 리스트 1",
-        group: "아이템 리스트",
-      },
-    },
-    {
-      accessorKey: "itemList2",
-      header: ({ column }) => (
-        <DataTableColumnHeaderSimple column={column} title="아이템 리스트 2" />
-      ),
-      cell: ({ row }) => <div>{row.original.itemList2 || "-"}</div>,
-      enableSorting: true,
-      enableHiding: true,
-      meta: {
-        excelHeader: "아이템 리스트 2",
-        group: "아이템 리스트",
       },
     },
     {
-      accessorKey: "itemList3",
+      accessorKey: "itemList",
       header: ({ column }) => (
-        <DataTableColumnHeaderSimple column={column} title="아이템 리스트 3" />
+        <DataTableColumnHeaderSimple column={column} title="아이템 리스트" />
       ),
-      cell: ({ row }) => <div>{row.original.itemList3 || "-"}</div>,
+      cell: ({ row }) => <div>{row.original.itemList || "-"}</div>,
       enableSorting: true,
       enableHiding: true,
       meta: {
-        excelHeader: "아이템 리스트 3",
-        group: "아이템 리스트",
+        excelHeader: "아이템 리스트",
       },
     },
     {
-      accessorKey: "itemList4",
+      accessorKey: "subItemList",
       header: ({ column }) => (
-        <DataTableColumnHeaderSimple column={column} title="아이템 리스트 4" />
+        <DataTableColumnHeaderSimple column={column} title="서브 아이템 리스트" />
       ),
-      cell: ({ row }) => <div>{row.original.itemList4 || "-"}</div>,
+      cell: ({ row }) => <div>{row.original.subItemList || "-"}</div>,
       enableSorting: true,
       enableHiding: true,
       meta: {
-        excelHeader: "아이템 리스트 4",
-        group: "아이템 리스트",
+        excelHeader: "서브 아이템 리스트",
       },
     },
-  ]
-  
-  // 3-3) 메타데이터 그룹 컬럼
-  const metadataColumns: ColumnDef<OffshoreHullTableItem>[] = [
     {
       accessorKey: "createdAt",
       header: ({ column }) => (
@@ -234,7 +167,6 @@ export function getOffshoreHullColumns({ setRowAction }: GetColumnsProps): Colum
       enableHiding: true,
       meta: {
         excelHeader: "생성일",
-        group: "Metadata",
       },
     },
     {
@@ -247,36 +179,16 @@ export function getOffshoreHullColumns({ setRowAction }: GetColumnsProps): Colum
       enableHiding: true,
       meta: {
         excelHeader: "수정일",
-        group: "Metadata",
       },
     }
   ]
-  
-  // 3-4) 그룹별 컬럼 구성
-  const groupedColumns: ColumnDef<OffshoreHullTableItem>[] = [
-    {
-      id: "기본 정보",
-      header: "기본 정보",
-      columns: basicInfoColumns,
-    },
-    {
-      id: "아이템 리스트",
-      header: "아이템 리스트",
-      columns: itemListColumns,
-    },
-    {
-      id: "Metadata",
-      header: "Metadata",
-      columns: metadataColumns,
-    }
-  ]
 
   // ----------------------------------------------------------------
-  // 4) 최종 컬럼 배열: select, groupedColumns, actions
+  // 4) 최종 컬럼 배열: select, dataColumns, actions
   // ----------------------------------------------------------------
   return [
     selectColumn,
-    ...groupedColumns,
+    ...dataColumns,
     actionsColumn,
   ]
 } 
\ No newline at end of file
-- 
cgit v1.2.3

