From 680da9b323db8b8d7cf27c674ab0016ec87bfe81 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Tue, 4 Nov 2025 07:48:00 +0000
Subject: (임수민) 구매 점검 테스트 요청사항 수정 (11/02)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../pq-review-table-new/vendors-table-columns.tsx  | 87 +++++++++++++++++-----
 1 file changed, 67 insertions(+), 20 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 ae4d5dc1..fa2726b8 100644
--- a/lib/pq/pq-review-table-new/vendors-table-columns.tsx
+++ b/lib/pq/pq-review-table-new/vendors-table-columns.tsx
@@ -21,7 +21,7 @@ import {
   DropdownMenuTrigger,
 } from "@/components/ui/dropdown-menu"
 import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-column-simple-header";
-import { useRouter } from "next/navigation"
+import { useRouter, useParams } from "next/navigation"
 import { PQDeleteDialog } from "@/components/pq-input/pq-delete-dialog"
 
 // PQ 제출 타입 정의
@@ -178,7 +178,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
         <span className="font-medium">{row.getValue("pqNumber")}</span>
       </div>
     ),
-    excelHeader: "PQ No.",
+    meta: {
+      excelHeader: "PQ No.",
+    },
   }
 
   // 협력업체 컬럼
@@ -195,7 +197,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
     ),
     enableSorting: true,
     enableHiding: true,
-    excelHeader: "협력업체",
+    meta: {
+      excelHeader: "협력업체",
+    },
   }
 
   // PQ 유형 컬럼
@@ -223,7 +227,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
     },
     enableSorting: true,
     enableHiding: true,
-    excelHeader: "PQ 유형",
+    meta: {
+      excelHeader: "PQ 유형",
+    },
   }
 
   // 프로젝트 컬럼
@@ -251,7 +257,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
     },
     enableSorting: true,
     enableHiding: true,
-    excelHeader: "프로젝트",
+    meta: {
+      excelHeader: "프로젝트",
+    },
   }
 
   // 상태 컬럼
@@ -270,7 +278,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
     },
     enableSorting: false,
     enableHiding: true,
-    excelHeader: "진행현황",
+    meta: {
+      excelHeader: "진행현황",
+    },
   };
 
   // PQ 상태와 실사 상태를 결합하는 헬퍼 함수
@@ -416,7 +426,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
     },
     enableSorting: true,
     enableHiding: true,
-    excelHeader: "평가 결과",
+    meta: {
+      excelHeader: "평가 결과",
+    },
   };
 
   // 답변 수 컬럼
@@ -432,7 +444,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
         </div>
       )
     },
-    excelHeader: "답변 수",
+    meta: {
+      excelHeader: "답변 수",
+    },
   }
 
   const investigationAddressColumn: ExtendedColumnDef<PQSubmission> = {
@@ -453,7 +467,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
         </div>
       )
     },
-    excelHeader: "실사 주소",
+    meta: {
+      excelHeader: "실사 주소",
+    },
   }
   const investigationRequestedAtColumn: ExtendedColumnDef<PQSubmission> = {
     accessorKey: "investigationRequestedAt",
@@ -474,7 +490,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
         </div>
       )
     },
-    excelHeader: "실사 의뢰일",
+    meta: {
+      excelHeader: "실사 의뢰일",
+    },
   }
 
   const investigationNotesColumn: ExtendedColumnDef<PQSubmission> = {
@@ -495,7 +513,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
         </div>
       )
     },
-    excelHeader: "QM 의견",
+    meta: {
+      excelHeader: "QM 의견",
+    },
   }
   const investigationMethodColumn: ExtendedColumnDef<PQSubmission> = {
     accessorKey: "investigationMethod",
@@ -521,7 +541,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
           return <span>{investigation.investigationMethod}</span>;
       }
     },
-    excelHeader: "실사품목",
+    meta: {
+      excelHeader: "QM실사방법",
+    },
   }
 
   // 실사품목 컬럼
@@ -551,6 +573,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
           );
         }
     },
+    meta: {
+      excelHeader: "실사품목",
+    },
   }
 
 
@@ -576,7 +601,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
         </div>
       )
     },
-    excelHeader: "실사 수행 예정일",
+    meta: {
+      excelHeader: "실사 수행 예정일",
+    },
   }
 
   const investigationConfirmedAtColumn: ExtendedColumnDef<PQSubmission> = {
@@ -598,7 +625,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
         </div>
       )
     },
-    excelHeader: "실사 계획 확정일",
+    meta: {
+      excelHeader: "실사 계획 확정일",
+    },
   }
 
   const investigationCompletedAtColumn: ExtendedColumnDef<PQSubmission> = {
@@ -620,7 +649,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
         </div>
       )
     },
-    excelHeader: "실제 실사일",
+    meta: {
+      excelHeader: "실제 실사일",
+    },
   }
 
   // 제출일 컬럼
@@ -633,7 +664,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
       const dateVal = row.original.createdAt as Date
       return formatDate(dateVal, 'KR')
     },
-    excelHeader: "PQ 전송일",
+    meta: {
+      excelHeader: "PQ 전송일",
+    },
   }
 
   // 제출일 컬럼
@@ -646,7 +679,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
       const dateVal = row.original.submittedAt as Date
       return dateVal ? formatDate(dateVal, 'KR') : "-"
     },
-    excelHeader: "PQ 회신일",
+    meta: {
+      excelHeader: "PQ 회신일",
+    },
   }
 
   // 승인/거부일 컬럼
@@ -664,7 +699,9 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
       }
       return "-"
     },
-    excelHeader: "PQ 승인/거부일",
+    meta: {
+      excelHeader: "PQ 승인/거부일",
+    },
   }
 
   // ----------------------------------------------------------------
@@ -672,7 +709,13 @@ export function getColumns({ setRowAction, router }: GetColumnsProps): ExtendedC
   // ----------------------------------------------------------------
   const actionsColumn: ExtendedColumnDef<PQSubmission> = {
     id: "actions",
+    header: ({ column }) => (
+      <DataTableColumnHeaderSimple column={column} title="보기" />
+    ),
     enableHiding: false,
+    meta: {
+      excelHeader: "보기",
+    },
     cell: function Cell({ row }) {
       const pq = row.original
       const isSubmitted = pq.status === "SUBMITTED"
@@ -806,7 +849,9 @@ const requesterColumn: ExtendedColumnDef<PQSubmission> = {
       ? <span>{pqRequesterName}</span> 
       : <span className="text-muted-foreground">-</span>;
   },
-  excelHeader: "PQ/실사 요청자",
+  meta: {
+    excelHeader: "PQ/실사 요청자",
+  },
 };
 const qmManagerColumn: ExtendedColumnDef<PQSubmission> = {
   accessorKey: "qmManager",
@@ -829,7 +874,9 @@ const qmManagerColumn: ExtendedColumnDef<PQSubmission> = {
       </div>
     );
   },
-  excelHeader: "QM 담당자",
+  meta: {
+    excelHeader: "QM 담당자",
+  },
 };
 
 
-- 
cgit v1.2.3

