diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-27 01:16:20 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-27 01:16:20 +0000 |
| commit | e9897d416b3e7327bbd4d4aef887eee37751ae82 (patch) | |
| tree | bd20ce6eadf9b21755bd7425492d2d31c7700a0e /lib/evaluation-criteria/table/reg-eval-criteria-columns.tsx | |
| parent | 3bf1952c1dad9d479bb8b22031b06a7434d37c37 (diff) | |
(대표님) 20250627 오전 10시 작업사항
Diffstat (limited to 'lib/evaluation-criteria/table/reg-eval-criteria-columns.tsx')
| -rw-r--r-- | lib/evaluation-criteria/table/reg-eval-criteria-columns.tsx | 69 |
1 files changed, 64 insertions, 5 deletions
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, ]; |
