From eb654f88214095f71be142b989e620fd28db3f69 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 11 Aug 2025 09:00:38 +0000
Subject: (최겸) 기술영업 변경사항 반영, PQ/실사 변경사항 반영
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../pq-review-table-new/vendors-table-columns.tsx  | 69 +++++++++++-----------
 1 file changed, 34 insertions(+), 35 deletions(-)

(limited to 'lib/pq/pq-review-table-new/vendors-table-columns.tsx')

diff --git a/lib/pq/pq-review-table-new/vendors-table-columns.tsx b/lib/pq/pq-review-table-new/vendors-table-columns.tsx
index d99f201e..d3fada0d 100644
--- a/lib/pq/pq-review-table-new/vendors-table-columns.tsx
+++ b/lib/pq/pq-review-table-new/vendors-table-columns.tsx
@@ -65,7 +65,6 @@ export interface PQSubmission {
     id: number
     investigationStatus: string
     requesterName: string | null  // 실사 요청자 이름
-    evaluationType: "PURCHASE_SELF_EVAL" | "DOCUMENT_EVAL" | "PRODUCT_INSPECTION" | "SITE_VISIT_EVAL" | null
     qmManagerId: number | null
     qmManagerName: string | null // QM 담당자 이름
     qmManagerEmail: string | null // QM 담당자 이메일
@@ -301,37 +300,38 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ColumnDef
     }
   }
 
-  const evaluationTypeColumn: ColumnDef<PQSubmission> = {
-    accessorKey: "evaluationType",
-    header: ({ column }) => (
-      <DataTableColumnHeaderSimple column={column} title="평가 유형" />
-    ),
-    cell: ({ row }) => {
-      const investigation = row.original.investigation;
-
-      if (!investigation || !investigation.evaluationType) {
-        return <span className="text-muted-foreground">-</span>;
-      }
-
-      switch (investigation.evaluationType) {
-        case "PURCHASE_SELF_EVAL":
-          return <Badge variant="outline">구매자체평가</Badge>;
-        case "DOCUMENT_EVAL":
-          return <Badge variant="secondary">서류평가</Badge>;
-        case "PRODUCT_INSPECTION":
-          return <Badge variant="default">제품검사평가</Badge>;
-        case "SITE_VISIT_EVAL":
-          return <Badge variant="destructive">방문실사평가</Badge>;
-        default:
-          return <span>{investigation.evaluationType}</span>;
-      }
-    },
-    filterFn: (row, id, value) => {
-      const investigation = row.original.investigation;
-      if (!investigation || !investigation.evaluationType) return value.includes("null");
-      return value.includes(investigation.evaluationType);
-    },
-  };
+  // 평가유형 컬럼 (QM실사방법으로 교체됨)
+  // const evaluationTypeColumn: ColumnDef<PQSubmission> = {
+  //   accessorKey: "evaluationType",
+  //   header: ({ column }) => (
+  //     <DataTableColumnHeaderSimple column={column} title="평가 유형" />
+  //   ),
+  //   cell: ({ row }) => {
+  //     const investigation = row.original.investigation;
+
+  //     if (!investigation || !investigation.evaluationType) {
+  //       return <span className="text-muted-foreground">-</span>;
+  //     }
+
+  //     switch (investigation.evaluationType) {
+  //       case "PURCHASE_SELF_EVAL":
+  //         return <Badge variant="outline">구매자체평가</Badge>;
+  //       case "DOCUMENT_EVAL":
+  //         return <Badge variant="secondary">서류평가</Badge>;
+  //       case "PRODUCT_INSPECTION":
+  //         return <Badge variant="default">제품검사평가</Badge>;
+  //       case "SITE_VISIT_EVAL":
+  //         return <Badge variant="destructive">방문실사평가</Badge>;
+  //       default:
+  //         return <span>{investigation.evaluationType}</span>;
+  //     }
+  //   },
+  //   filterFn: (row, id, value) => {
+  //     const investigation = row.original.investigation;
+  //     if (!investigation || !investigation.evaluationType) return value.includes("null");
+  //     return value.includes(investigation.evaluationType);
+  //   },
+  // };
 
 
   const evaluationResultColumn: ColumnDef<PQSubmission> = {
@@ -387,7 +387,7 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ColumnDef
     cell: ({ row }) => {
       const investigation = row.original.investigation;
 
-      if (!investigation || !investigation.evaluationType) {
+      if (!investigation || !investigation.investigationAddress) {
         return <span className="text-muted-foreground">-</span>;
       }
 
@@ -675,7 +675,7 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ColumnDef
                   e.preventDefault();
                   // 실사 정보 수정 다이얼로그 열기 로직
                   setRowAction({
-                    type: "edit-investigation",
+                    type: "update",
                     row: row.original
                   });
                 }}
@@ -772,7 +772,6 @@ const qmManagerColumn: ColumnDef<PQSubmission> = {
     submittedAtColumn,
     approvalDateColumn,
     answerCountColumn,
-    evaluationTypeColumn,  // 평가 유형 컬럼
     investigationMethodColumn,
     investigationForecastedAtColumn,
     investigationRequestedAtColumn,
-- 
cgit v1.2.3

