From c8beed57d9fb10c02b8951cd4267017984ca5beb Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Wed, 17 Sep 2025 10:41:29 +0000
Subject: (최겸) 구매 일반계약 프로젝트id추가, 선적지, 하역지 연동, numbering
 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../main/general-contracts-table-columns.tsx       | 45 +++++++++++++++-------
 1 file changed, 31 insertions(+), 14 deletions(-)

(limited to 'lib/general-contracts/main/general-contracts-table-columns.tsx')

diff --git a/lib/general-contracts/main/general-contracts-table-columns.tsx b/lib/general-contracts/main/general-contracts-table-columns.tsx
index d7854ee6..a08d8b81 100644
--- a/lib/general-contracts/main/general-contracts-table-columns.tsx
+++ b/lib/general-contracts/main/general-contracts-table-columns.tsx
@@ -12,7 +12,6 @@ import {
   DropdownMenu,
   DropdownMenuContent,
   DropdownMenuItem,
-  DropdownMenuSeparator,
   DropdownMenuTrigger,
 } from "@/components/ui/dropdown-menu"
 import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-column-simple-header"
@@ -29,7 +28,7 @@ export interface GeneralContractListItem {
   type: string
   executionMethod: string
   name: string
-  selectionMethod?: string
+  contractSourceType?: string
   startDate: string
   endDate: string
   validityEndDate?: string
@@ -49,6 +48,9 @@ export interface GeneralContractListItem {
   vendorId?: number
   vendorName?: string
   vendorCode?: string
+  projectId?: number
+  projectName?: string
+  projectCode?: string
   managerName?: string
   lastUpdatedByName?: string
 }
@@ -110,11 +112,11 @@ const getStatusText = (status: string) => {
 // 계약구분 텍스트 변환
 const getCategoryText = (category: string) => {
   switch (category) {
-    case '단가계약':
+    case 'unit_price':
       return '단가계약'
-    case '일반계약':
+    case 'general':
       return '일반계약'
-    case '매각계약':
+    case 'sale':
       return '매각계약'
     default:
       return category
@@ -172,15 +174,15 @@ const getExecutionMethodText = (method: string) => {
 }
 
 // 업체선정방법 텍스트 변환
-const getSelectionMethodText = (method?: string) => {
+const getcontractSourceTypeText = (method?: string) => {
   if (!method) return '-'
   switch (method) {
-    case '견적':
+    case 'estimate':
       return '견적'
-    case '입찰':
+    case 'bid':
       return '입찰'
-    case '기타':
-      return '기타'
+    case 'manual':
+      return '자체생성'
     default:
       return method
   }
@@ -325,12 +327,12 @@ export function getGeneralContractsColumns({ setRowAction }: GetColumnsProps): C
         },
 
         {
-          accessorKey: "selectionMethod",
+          accessorKey: "contractSourceType",
           header: ({ column }) => <DataTableColumnHeaderSimple column={column} title="업체선정방법" />,
           cell: ({ row }) => (
-            <span className="text-sm">
-              {getSelectionMethodText(row.original.selectionMethod)}
-            </span>
+            <Badge variant="outline">
+              {getcontractSourceTypeText(row.original.contractSourceType)}
+            </Badge>
           ),
           size: 200,
           meta: { excelHeader: "업체선정방법" },
@@ -359,6 +361,21 @@ export function getGeneralContractsColumns({ setRowAction }: GetColumnsProps): C
           meta: { excelHeader: "협력업체명" },
         },
 
+        {
+          accessorKey: "projectName",
+          header: ({ column }) => <DataTableColumnHeaderSimple column={column} title="프로젝트명" />,
+          cell: ({ row }) => (
+            <div className="flex flex-col">
+              <span className="font-medium">{row.original.projectName || '-'}</span>
+              <span className="text-xs text-muted-foreground">
+                {row.original.projectCode ? row.original.projectCode : "-"}
+              </span>
+            </div>
+          ),
+          size: 150,
+          meta: { excelHeader: "프로젝트명" },
+        },
+
       ]
     },
 
-- 
cgit v1.2.3

