From c657ef972feeafff16ab0e07cb4771f7dd141ba0 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Thu, 10 Jul 2025 09:55:45 +0000 Subject: (대표님) 20250710 작업사항 - 평가 첨부, 로그인, SEDP 변경 요구사항 반영 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../table/evaluation-targets-columns.tsx | 66 ++++++++++++++++++---- 1 file changed, 56 insertions(+), 10 deletions(-) (limited to 'lib/evaluation-target-list/table/evaluation-targets-columns.tsx') diff --git a/lib/evaluation-target-list/table/evaluation-targets-columns.tsx b/lib/evaluation-target-list/table/evaluation-targets-columns.tsx index 60f1af39..c3aa9d71 100644 --- a/lib/evaluation-target-list/table/evaluation-targets-columns.tsx +++ b/lib/evaluation-target-list/table/evaluation-targets-columns.tsx @@ -16,7 +16,7 @@ interface GetColumnsProps { } // ✅ 모든 헬퍼 함수들을 컴포넌트 외부로 이동 -const getStatusBadgeVariant = (status: string) => { +export const getStatusBadgeVariant = (status: string) => { switch (status) { case "PENDING": return "secondary"; case "CONFIRMED": return "default"; @@ -43,14 +43,14 @@ const getDivisionBadge = (division: string) => { ); }; -const getMaterialTypeBadge = (materialType: string) => { +export const getMaterialTypeBadge = (materialType: string) => { return {vendortypeMap[materialType] || materialType}; }; const getDomesticForeignBadge = (domesticForeign: string) => { return ( - {domesticForeign === "DOMESTIC" ? "내자" : "외자"} + {domesticForeign === "DOMESTIC" ? "D" : "F"} ); }; @@ -72,6 +72,16 @@ const getEvaluationTargetBadge = (isTarget: boolean | null) => { ); }; +const getStatusLabel = (status: string) => { + const statusMap = { + PENDING: "미확정", + EXCLUDED: "제외", + CONFIRMED: "확정" + }; + return statusMap[status] || status; +}; + + // ✅ 모든 cell 렌더러 함수들을 미리 정의 (매번 새로 생성 방지) const renderEvaluationYear = ({ row }: any) => ( {row.getValue("evaluationYear")} @@ -83,7 +93,7 @@ const renderStatus = ({ row }: any) => { const status = row.getValue("status"); return ( - {status} + {getStatusLabel(status)} ); }; @@ -213,12 +223,7 @@ function createStaticColumns(setRowAction: GetColumnsProps['setRowAction']): Col cell: renderStatus, size: 100, }, - { - accessorKey: "consensusStatus", - header: createHeaderRenderer("의견 일치"), - cell: renderConsensusStatus, - size: 100, - }, + // 벤더 정보 { @@ -252,6 +257,47 @@ function createStaticColumns(setRowAction: GetColumnsProps['setRowAction']): Col ] }, + { + accessorKey: "consensusStatus", + header: createHeaderRenderer("의견 일치"), + cell: renderConsensusStatus, + size: 100, + }, + + { + id: "claim", + header: "L/D, Claim", + columns:[ + { + accessorKey: "ldClaimCount", + header: ({ column }) => , + cell: ({ row }) => ( + {row.original.ldClaimCount} + ), + size: 80, + }, + + { + accessorKey: "ldClaimAmount", + header: ({ column }) => , + cell: ({ row }) => ( + {(Number(row.original.ldClaimAmount).toLocaleString())} + ), + size: 80, + }, + { + accessorKey: "ldClaimCurrency", + header: ({ column }) => , + + cell: ({ row }) => ( + {row.original.ldClaimCurrency} + ), + size: 80, + }, + ] + + }, + // 발주 담당자 { id: "orderReviewer", -- cgit v1.2.3