diff options
Diffstat (limited to 'lib/pq/pq-review-table-new/vendors-table-columns.tsx')
| -rw-r--r-- | lib/pq/pq-review-table-new/vendors-table-columns.tsx | 69 |
1 files changed, 34 insertions, 35 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 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,
|
