summaryrefslogtreecommitdiff
path: root/lib/pq
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-11-04 07:48:00 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-11-04 07:48:00 +0000
commit680da9b323db8b8d7cf27c674ab0016ec87bfe81 (patch)
tree52791f8618c0c5767c6420404ddf849ae28082e8 /lib/pq
parent153502b67da990c92973f1f8af416f9a81ec3abb (diff)
(임수민) 구매 점검 테스트 요청사항 수정 (11/02)
Diffstat (limited to 'lib/pq')
-rw-r--r--lib/pq/pq-review-table-new/vendors-table-columns.tsx87
1 files changed, 67 insertions, 20 deletions
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 담당자",
+ },
};