From 2b59582194fc5c23140f52c42c793c324856a35e Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Tue, 25 Nov 2025 22:04:56 +0900
Subject: (김준회) 벤더풀&AVL 구매 추가요청사항 반영
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../table/vendor-pool-table-columns.tsx            | 871 ++-------------------
 1 file changed, 61 insertions(+), 810 deletions(-)

(limited to 'lib/vendor-pool/table/vendor-pool-table-columns.tsx')

diff --git a/lib/vendor-pool/table/vendor-pool-table-columns.tsx b/lib/vendor-pool/table/vendor-pool-table-columns.tsx
index 5676250b..9d6c506f 100644
--- a/lib/vendor-pool/table/vendor-pool-table-columns.tsx
+++ b/lib/vendor-pool/table/vendor-pool-table-columns.tsx
@@ -23,7 +23,7 @@ interface VendorPoolTableMeta {
 
 // Vendor Pool 데이터 타입 - 스키마 기반 + 테이블용 추가 필드
 import type { VendorPool } from "@/db/schema/avl/vendor-pool"
-import { DisciplineCode, EngineeringDisciplineSelector } from "@/components/common/discipline"
+import { DisciplineHardcodedSelector } from "@/components/common/discipline-hardcoded"
 import { MaterialGroupSelectorDialogSingle } from "@/components/common/material/material-group-selector-dialog-single"
 import type { MaterialSearchItem } from "@/lib/material/material-group-service"
 import { VendorTierSelector } from "@/components/common/selectors/vendor-tier/vendor-tier-selector"
@@ -64,10 +64,12 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
     ),
     enableSorting: false,
     enableHiding: false,
+    enableColumnFilter: false,
     size: 40,
   },
   {
     accessorKey: "id",
+    accessorFn: (row) => String(row.id),
     header: ({ column }) => (
       <DataTableColumnHeaderSimple column={column} title="ID" />
     ),
@@ -82,7 +84,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
       // 실제 ID 표시
       return <div className="text-sm font-mono">{id}</div>
     },
-    size: 60,
+    size: 120,
   },
   {
     accessorKey: "constructionSector",
@@ -120,7 +122,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         />
       )
     },
-    size: 100,
+    size: 160,
   },
   {
     accessorKey: "htDivision",
@@ -156,46 +158,37 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         />
       )
     },
-    size: 80,
+    size: 120,
   },
   {
-    accessorKey: "designCategory",
+    accessorKey: "discipline",
     header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title={<span className="text-red-600 font-medium">설계기능(공종) *</span>} />
+      <DataTableColumnHeaderSimple column={column} title={<span className="text-red-600 font-medium">설계공종 *</span>} />
     ),
     cell: ({ row, table }) => {
-      const designCategoryCode = row.original.designCategoryCode as string
-      const designCategory = row.original.designCategory as string
-
-      // 현재 선택된 discipline 구성
-      const selectedDiscipline: DisciplineCode | undefined = designCategoryCode && designCategory ? {
-        CD: designCategoryCode,
-        USR_DF_CHAR_18: designCategory
-      } : undefined
+      const discipline = row.original.discipline as string
 
-      const onDisciplineSelect = async (discipline: DisciplineCode) => {
-        console.log('선택된 설계공종:', discipline)
+      const onDisciplineSelect = async (newDiscipline: string) => {
+        console.log('선택된 설계공종:', newDiscipline)
         console.log('행 ID:', row.original.id)
 
-        // 설계기능코드와 설계기능(공종) 필드 모두 업데이트
         if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "designCategoryCode", discipline.CD)
-          await table.options.meta.onCellUpdate(row.original.id, "designCategory", discipline.USR_DF_CHAR_18)
+          await table.options.meta.onCellUpdate(row.original.id, "discipline", newDiscipline)
         } else {
           console.error('onCellUpdate가 정의되지 않음')
         }
       }
 
       return (
-        <EngineeringDisciplineSelector
-          selectedDiscipline={selectedDiscipline}
+        <DisciplineHardcodedSelector
+          selectedDiscipline={discipline}
           onDisciplineSelect={onDisciplineSelect}
           disabled={false}
           placeholder="설계공종을 선택하세요"
         />
       )
     },
-    size: 260,
+    size: 200,
   },
   {
     accessorKey: "equipBulkDivision",
@@ -225,72 +218,17 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         />
       )
     },
-    size: 120,
-  },
-  {
-    accessorKey: "packageCode",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="패키지 코드" />
-    ),
-    cell: ({ row, table }) => {
-      const value = row.getValue("packageCode")
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "packageCode", newValue)
-        }
-      }
-
-      // 수정 여부 확인
-      const isModified = getIsModified(table, row.original.id, "packageCode")
-
-      return (
-        <EditableCell
-          value={value}
-          type="text"
-          onSave={onSave}
-          placeholder="패키지 코드 입력"
-          maxLength={50}
-          autoSave={false}
-          isModified={isModified}
-        />
-      )
-    },
-    size: 120,
+    size: 180,
   },
   {
-    accessorKey: "packageName",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="패키지 명" />
-    ),
-    cell: ({ row, table }) => {
-      const value = row.getValue("packageName")
-      const isEmptyRow = String(row.original.id).startsWith('temp-')
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "packageName", newValue)
-        }
+    // accessorKey: "materialGroupName",
+    id: "materialGroupName",
+    accessorFn: (row) => {
+      if (row.materialGroupCode && row.materialGroupName) {
+        return `${row.materialGroupCode} - ${row.materialGroupName}`
       }
-
-      // 수정 여부 확인
-      const isModified = getIsModified(table, row.original.id, "packageName")
-
-      return (
-        <EditableCell
-          value={value}
-          type="text"
-          onSave={onSave}
-          placeholder="패키지 명 입력"
-          maxLength={100}
-          autoSave={false}
-          initialEditMode={isEmptyRow}
-          isModified={isModified}
-        />
-      )
+      return row.materialGroupName || row.materialGroupCode || ""
     },
-    size: 200,
-  },
-  {
-    accessorKey: "materialGroupName",
     header: ({ column }) => (
       <DataTableColumnHeaderSimple column={column} title={<span className="text-red-600 font-medium">자재그룹 *</span>} />
     ),
@@ -337,31 +275,6 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
     },
     size: 400,
   },
-  {
-    accessorKey: "smCode",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="SM Code" />
-    ),
-    cell: ({ row, table }) => {
-      const value = row.getValue("smCode")
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "smCode", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="text"
-          onSave={onSave}
-          placeholder="SM Code 입력"
-          maxLength={50}
-        />
-      )
-    },
-    size: 200,
-  },
   {
     accessorKey: "similarMaterialNamePurchase",
     header: ({ column }) => (
@@ -389,32 +302,6 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
     },
     size: 250,
   },
-  {
-    accessorKey: "similarMaterialNameOther",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="유사자재명(구매외)" />
-    ),
-    cell: ({ row, table }) => {
-      const value = row.getValue("similarMaterialNameOther")
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "similarMaterialNameOther", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="text"
-          onSave={onSave}
-          placeholder="유사자재명(구매외) 입력"
-          maxLength={100}
-          autoSave={false}
-        />
-      )
-    },
-    size: 140,
-  },
   {
     accessorKey: "vendorSelector",
     header: ({ column }) => (
@@ -465,7 +352,8 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         />
       )
     },
-    size: 150,
+    enableColumnFilter: false,
+    size: 200,
   },
   {
     accessorKey: "vendorCode",
@@ -495,15 +383,22 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         />
       )
     },
-    size: 130,
+    size: 200,
   },
   {
-    accessorKey: "vendorName",
+    // accessorKey: "vendorName",
+    id: "vendorName",
+    accessorFn: (row) => {
+      if (row.vendorCode && row.vendorName) {
+        return `${row.vendorCode} - ${row.vendorName}`
+      }
+      return row.vendorName || row.vendorCode || ""
+    },
     header: ({ column }) => (
       <DataTableColumnHeaderSimple column={column} title={<span className="text-red-600 font-medium">협력업체 명 *</span>} />
     ),
     cell: ({ row, table }) => {
-      const value = row.getValue("vendorName")
+      const value = row.original.vendorName // accessorFn을 썼으므로 getValue() 대신 original 참조가 더 안전
       const isEmptyRow = String(row.original.id).startsWith('temp-')
       const onSave = async (newValue: any) => {
         if (table.options.meta?.onCellUpdate) {
@@ -527,7 +422,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         />
       )
     },
-    size: 130,
+    size: 200,
   },
   {
     accessorKey: "faTarget",
@@ -554,53 +449,8 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
       )
     },
     enableSorting: false,
-    size: 80,
-  },
-  {
-    accessorKey: "faStatus",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="FA현황" />
-    ),
-    cell: ({ row }) => {
-      const value = row.original.faStatus as string
-
-      // 'O'인 경우에만 'O'를 표시, 그 외에는 빈 셀
-      const displayValue = value === "O" ? "O" : ""
-
-      return (
-        <div className="px-2 py-1 text-sm text-center">
-          {displayValue}
-        </div>
-      )
-    },
     size: 120,
   },
-  // {
-  //   accessorKey: "faRemark",
-  //   header: ({ column }) => (
-  //     <DataTableColumnHeaderSimple column={column} title="FA상세" />
-  //   ),
-  //   cell: ({ row, table }) => {
-  //     const value = row.getValue("faRemark")
-  //     const onSave = async (newValue: any) => {
-  //       if (table.options.meta?.onCellUpdate) {
-  //         await table.options.meta.onCellUpdate(row.original.id, "faRemark", newValue)
-  //       }
-  //     }
-
-  //     return (
-  //       <EditableCell
-  //         value={value}
-  //         type="textarea"
-  //         onSave={onSave}
-  //         placeholder="FA상세 입력"
-  //         maxLength={500}
-  //         autoSave={false}
-  //       />
-  //     )
-  //   },
-  //   size: 120,
-  // },
   {
     accessorKey: "tier",
     header: ({ column }) => (
@@ -624,143 +474,8 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         />
       )
     },
-    size: 120,
-  },
-  {
-    accessorKey: "isAgent",
-    header: "Agent 여부",
-    cell: ({ row, table }) => {
-      const value = row.getValue("isAgent") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "isAgent", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    enableSorting: false,
-    size: 100,
-  },
-  {
-    accessorKey: "contractSignerCode",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="계약서명주체 코드" />
-    ),
-    cell: ({ row, table }) => {
-      const value = row.getValue("contractSignerCode")
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "contractSignerCode", newValue)
-        }
-      }
-
-      // 수정 여부 확인
-      const isModified = getIsModified(table, row.original.id, "contractSignerCode")
-
-      return (
-        <EditableCell
-          value={value}
-          type="text"
-          onSave={onSave}
-          placeholder="계약서명주체 코드 입력"
-          maxLength={50}
-          autoSave={false}
-          isModified={isModified}
-        />
-      )
-    },
-    size: 120,
-  },
-  {
-    accessorKey: "contractSignerSelector",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="계약서명주체 선택" />
-    ),
-    cell: ({ row, table }) => {
-      const contractSignerCode = row.original.contractSignerCode as string
-      const contractSignerName = row.original.contractSignerName as string
-
-      // 현재 선택된 contract signer 구성
-      const selectedVendor: VendorSearchItem | null = contractSignerCode && contractSignerName ? {
-        id: 0, // 실제로는 vendorId가 있어야 하지만 여기서는 임시로 0 사용
-        vendorName: contractSignerName,
-        vendorCode: contractSignerCode || null,
-        taxId: null, // 사업자번호는 vendor-pool에서 관리하지 않음
-        status: "ACTIVE", // 임시 값
-        displayText: contractSignerName + (contractSignerCode ? ` (${contractSignerCode})` : "")
-      } : null
-
-      const onVendorSelect = async (vendor: VendorSearchItem | null) => {
-        console.log('선택된 계약서명주체:', vendor)
-
-        if (vendor) {
-          // 계약서명주체코드와 계약서명주체명 필드 업데이트
-          if (table.options.meta?.onCellUpdate) {
-            await table.options.meta.onCellUpdate(row.original.id, "contractSignerCode", vendor.vendorCode || "")
-            await table.options.meta.onCellUpdate(row.original.id, "contractSignerName", vendor.vendorName)
-          }
-        } else {
-          // 선택 해제 시 빈 값으로 설정
-          if (table.options.meta?.onCellUpdate) {
-            await table.options.meta.onCellUpdate(row.original.id, "contractSignerCode", "")
-            await table.options.meta.onCellUpdate(row.original.id, "contractSignerName", "")
-          }
-        }
-      }
-
-      return (
-        <VendorSelectorDialogSingle
-          selectedVendor={selectedVendor}
-          onVendorSelect={onVendorSelect}
-          disabled={false}
-          triggerLabel="계약서명주체 선택"
-          placeholder="계약서명주체를 검색하세요..."
-          title="계약서명주체 선택"
-          description="계약서명주체를 검색하고 선택해주세요."
-          statusFilter="ACTIVE"
-        />
-      )
-    },
     size: 150,
   },
-  {
-    accessorKey: "contractSignerName",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title={<span className="text-red-600 font-medium">계약서명주체 명 *</span>} />
-    ),
-    cell: ({ row, table }) => {
-      const value = row.getValue("contractSignerName")
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "contractSignerName", newValue)
-        }
-      }
-
-      // 수정 여부 확인
-      const isModified = getIsModified(table, row.original.id, "contractSignerName")
-
-      return (
-        <EditableCell
-          value={value}
-          type="text"
-          onSave={onSave}
-          placeholder="계약서명주체 명 입력"
-          maxLength={100}
-          autoSave={false}
-          isModified={isModified}
-        />
-      )
-    },
-    size: 120,
-  },
   {
     accessorKey: "headquarterLocation",
     header: ({ column }) => (
@@ -792,7 +507,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         />
       )
     },
-    size: 180,
+    size: 220,
   },
   {
     accessorKey: "manufacturingLocation",
@@ -850,7 +565,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         />
       )
     },
-    size: 140,
+    size: 220,
   },
   {
     accessorKey: "similarVendorName",
@@ -876,30 +591,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         />
       )
     },
-    size: 130,
-  },
-  {
-    accessorKey: "hasAvl",
-    header: "AVL",
-    cell: ({ row, table }) => {
-      const value = row.getValue("hasAvl") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "hasAvl", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    enableSorting: false,
-    size: 60,
+    size: 280,
   },
   {
     accessorKey: "isBlacklist",
@@ -922,7 +614,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
       )
     },
     enableSorting: false,
-    size: 60,
+    size: 100,
   },
   {
     accessorKey: "isBcc",
@@ -945,7 +637,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
       )
     },
     enableSorting: false,
-    size: 60,
+    size: 100,
   },
   {
     accessorKey: "purchaseOpinion",
@@ -972,462 +664,21 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
     },
     size: 300,
   },
-  {
-    accessorKey: "shipTypeCommon",
-    header: "공통",
-    cell: ({ row, table }) => {
-      const value = row.getValue("shipTypeCommon") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "shipTypeCommon", newValue)
-        }
-      }
 
+  {
+    accessorKey: "recentQuoteDate",
+    header: ({ column }) => (
+      <DataTableColumnHeaderSimple column={column} title="최근견적일" />
+    ),
+    cell: ({ row }) => {
+      const value = row.getValue("recentQuoteDate") as string
       return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
+        <div className="px-2 py-1 text-sm">
+          {value || "-"}
+        </div>
       )
     },
-    enableSorting: false,
-    size: 80,
-  },
-  {
-    accessorKey: "shipTypeAmax",
-    header: "A-max",
-    cell: ({ row, table }) => {
-      const value = row.getValue("shipTypeAmax") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "shipTypeAmax", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    enableSorting: false,
-    size: 60,
-  },
-  {
-    accessorKey: "shipTypeSmax",
-    header: "S-max",
-    cell: ({ row, table }) => {
-      const value = row.getValue("shipTypeSmax") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "shipTypeSmax", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    enableSorting: false,
-    size: 60,
-  },
-  {
-    accessorKey: "shipTypeVlcc",
-    header: "VLCC",
-    cell: ({ row, table }) => {
-      const value = row.getValue("shipTypeVlcc") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "shipTypeVlcc", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    enableSorting: false,
-    size: 60,
-  },
-  {
-    accessorKey: "shipTypeLngc",
-    header: "LNGC",
-    cell: ({ row, table }) => {
-      const value = row.getValue("shipTypeLngc") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "shipTypeLngc", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    size: 60,
-  },
-  {
-    accessorKey: "shipTypeCont",
-    header: "CONT",
-    cell: ({ row, table }) => {
-      const value = row.getValue("shipTypeCont") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "shipTypeCont", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    size: 60,
-  },
-  {
-    accessorKey: "offshoreTypeCommon",
-    header: "공통",
-    cell: ({ row, table }) => {
-      const value = row.getValue("offshoreTypeCommon") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "offshoreTypeCommon", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    size: 60,
-  },
-  {
-    accessorKey: "offshoreTypeFpso",
-    header: "FPSO",
-    cell: ({ row, table }) => {
-      const value = row.getValue("offshoreTypeFpso") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "offshoreTypeFpso", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    size: 60,
-  },
-  {
-    accessorKey: "offshoreTypeFlng",
-    header: "FLNG",
-    cell: ({ row, table }) => {
-      const value = row.getValue("offshoreTypeFlng") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "offshoreTypeFlng", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    size: 60,
-  },
-  {
-    accessorKey: "offshoreTypeFpu",
-    header: "FPU",
-    cell: ({ row, table }) => {
-      const value = row.getValue("offshoreTypeFpu") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "offshoreTypeFpu", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    size: 60,
-  },
-  {
-    accessorKey: "offshoreTypePlatform",
-    header: "Platform",
-    cell: ({ row, table }) => {
-      const value = row.getValue("offshoreTypePlatform") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "offshoreTypePlatform", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    size: 60,
-  },
-  {
-    accessorKey: "offshoreTypeWtiv",
-    header: "WTIV",
-    cell: ({ row, table }) => {
-      const value = row.getValue("offshoreTypeWtiv") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "offshoreTypeWtiv", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    size: 60,
-  },
-  {
-    accessorKey: "offshoreTypeGom",
-    header: "GOM",
-    cell: ({ row, table }) => {
-      const value = row.getValue("offshoreTypeGom") as boolean
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "offshoreTypeGom", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="checkbox"
-          onSave={onSave}
-          autoSave={false}
-        />
-      )
-    },
-    size: 60,
-  },
-  {
-    accessorKey: "picName",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="협력업체담당자" />
-      // 이전에는 컬럼명이 PIC(담당자) 였음.
-    ),
-    cell: ({ row, table }) => {
-      const value = row.getValue("picName")
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "picName", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="text"
-          onSave={onSave}
-          placeholder="입력가능"
-          maxLength={50}
-        />
-      )
-    },
-    size: 120,
-  },
-  {
-    accessorKey: "picEmail",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="협력업체담당자(E-mail)" />
-      // 이전에는 컬럼명이 PIC(E-mail) 였음.
-    ),
-    cell: ({ row, table }) => {
-      const value = row.getValue("picEmail")
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "picEmail", newValue)
-        }
-      }
-      return (
-        <EditableCell
-          value={value}
-          type="text"
-          onSave={onSave}
-          placeholder="입력가능"
-          maxLength={100}
-        />
-      )
-    },
-    size: 140,
-  },
-  {
-    accessorKey: "picPhone",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="협력업체담당자(Phone)" />
-      // 이전에는 컬럼명이 PIC(Phone) 였음.
-    ),
-    cell: ({ row, table }) => {
-      const value = row.getValue("picPhone")
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "picPhone", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="text"
-          onSave={onSave}
-          placeholder="입력가능"
-          maxLength={20}
-        />
-      )
-    },
-    size: 120,
-  },
-  {
-    accessorKey: "agentName",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="Agent(담당자)" />
-    ),
-    cell: ({ row, table }) => {
-      const value = row.getValue("agentName")
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "agentName", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="text"
-          onSave={onSave}
-          placeholder="입력가능"
-          maxLength={50}
-        />
-      )
-    },
-    size: 120,
-  },
-  {
-    accessorKey: "agentEmail",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="Agent(E-mail)" />
-    ),
-    cell: ({ row, table }) => {
-      const value = row.getValue("agentEmail")
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "agentEmail", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="text"
-          onSave={onSave}
-          placeholder="입력가능"
-          maxLength={100}
-        />
-      )
-    },
-    size: 140,
-  },
-  {
-    accessorKey: "agentPhone",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="Agent(Phone)" />
-    ),
-    cell: ({ row, table }) => {
-      const value = row.getValue("agentPhone")
-      const onSave = async (newValue: any) => {
-        if (table.options.meta?.onCellUpdate) {
-          await table.options.meta.onCellUpdate(row.original.id, "agentPhone", newValue)
-        }
-      }
-
-      return (
-        <EditableCell
-          value={value}
-          type="text"
-          onSave={onSave}
-          placeholder="입력가능"
-          maxLength={20}
-        />
-      )
-    },
-    size: 120,
-  },
-  {
-    accessorKey: "recentQuoteDate",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="최근견적일" />
-    ),
-    cell: ({ row }) => {
-      const value = row.getValue("recentQuoteDate") as string
-      return (
-        <div className="px-2 py-1 text-sm">
-          {value || "-"}
-        </div>
-      )
-    },
-    size: 120,
+    size: 200,
   },
   {
     accessorKey: "recentQuoteNumber",
@@ -1442,7 +693,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         </div>
       )
     },
-    size: 130,
+    size: 200,
   },
   {
     accessorKey: "recentOrderDate",
@@ -1457,7 +708,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         </div>
       )
     },
-    size: 120,
+    size: 150,
   },
   {
     accessorKey: "recentOrderNumber",
@@ -1472,14 +723,14 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
         </div>
       )
     },
-    size: 130,
+    size: 200,
   },
   {
     accessorKey: "registrationDate",
     header: ({ column }) => (
       <DataTableColumnHeaderSimple column={column} title="등록일" />
     ),
-    size: 120,
+    size: 150,
   },
   {
     accessorKey: "registrant",
@@ -1490,14 +741,14 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
       const value = row.getValue("registrant") as string
       return <div className="text-sm">{value || ""}</div>
     },
-    size: 100,
+    size: 150,
   },
   {
     accessorKey: "lastModifiedDate",
     header: ({ column }) => (
       <DataTableColumnHeaderSimple column={column} title="최종변경일" />
     ),
-    size: 120,
+    size: 150,
   },
   {
     accessorKey: "lastModifier",
@@ -1508,7 +759,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
       const value = row.getValue("lastModifier") as string
       return <div className="text-sm">{value || ""}</div>
     },
-    size: 120,
+    size: 150,
   },
   // 액션 그룹
   {
@@ -1530,7 +781,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
                 onSaveEmptyRow?.(data.id)
               }}
               title="저장"
-              className="bg-green-600 hover:bg-green-700"
+              className="bg-green-600 hover:bg-green-700 whitespace-normal h-auto"
             >
               <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                 <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
@@ -1544,7 +795,7 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
                 onCancelEmptyRow?.(data.id)
               }}
               title="취소"
-              className="border-red-300 text-red-600 hover:bg-red-50"
+              className="border-red-300 text-red-600 hover:bg-red-50 whitespace-normal h-auto"
             >
               <svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                 <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
@@ -1574,6 +825,6 @@ export const columns: ColumnDef<VendorPoolItem>[] = [
     size: 120,
     enableSorting: false,
     enableHiding: false,
+    enableColumnFilter: false,
   },
 ]
-
-- 
cgit v1.2.3

