From c657ef972feeafff16ab0e07cb4771f7dd141ba0 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
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 <Badge variant="outline">{vendortypeMap[materialType] || materialType}</Badge>;
 };
 
 const getDomesticForeignBadge = (domesticForeign: string) => {
   return (
     <Badge variant={domesticForeign === "DOMESTIC" ? "default" : "secondary"}>
-      {domesticForeign === "DOMESTIC" ? "내자" : "외자"}
+      {domesticForeign === "DOMESTIC" ? "D" : "F"}
     </Badge>
   );
 };
@@ -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) => (
   <span className="font-medium">{row.getValue("evaluationYear")}</span>
@@ -83,7 +93,7 @@ const renderStatus = ({ row }: any) => {
   const status = row.getValue<string>("status");
   return (
     <Badge variant={getStatusBadgeVariant(status)}>
-      {status}
+      {getStatusLabel(status)}
     </Badge>
   );
 };
@@ -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 }) => <DataTableColumnHeaderSimple column={column} title="건수" />,
+          cell: ({ row }) => (
+            <span className="text-sm">{row.original.ldClaimCount}</span>
+          ),
+          size: 80,
+        },
+
+        {
+          accessorKey: "ldClaimAmount",
+          header: ({ column }) => <DataTableColumnHeaderSimple column={column} title="금액" />,
+          cell: ({ row }) => (
+            <span className="font-mono text-sm">{(Number(row.original.ldClaimAmount).toLocaleString())}</span>
+          ),
+          size: 80,
+        },
+        {
+          accessorKey: "ldClaimCurrency",
+          header: ({ column }) => <DataTableColumnHeaderSimple column={column} title="단위" />,
+
+          cell: ({ row }) => (
+            <span className="text-sm">{row.original.ldClaimCurrency}</span>
+          ),
+          size: 80,
+        },
+      ]
+
+    },
+
     // 발주 담당자
     {
       id: "orderReviewer",
-- 
cgit v1.2.3

