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

---
 lib/evaluation-target-list/table/update-evaluation-target.tsx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'lib/evaluation-target-list/table/update-evaluation-target.tsx')

diff --git a/lib/evaluation-target-list/table/update-evaluation-target.tsx b/lib/evaluation-target-list/table/update-evaluation-target.tsx
index 9f9b7af4..8ea63a1a 100644
--- a/lib/evaluation-target-list/table/update-evaluation-target.tsx
+++ b/lib/evaluation-target-list/table/update-evaluation-target.tsx
@@ -58,6 +58,8 @@ import {
     type UpdateEvaluationTargetInput,
 } from "../service"
 import { EvaluationTargetWithDepartments } from "@/db/schema"
+import { getMaterialTypeBadge } from "./evaluation-targets-columns"
+import { getStatusLabel } from "../validation"
 
 // 편집 가능한 필드들에 대한 스키마
 const editEvaluationTargetSchema = z.object({
@@ -123,10 +125,10 @@ export function EditEvaluationTargetSheet({
         }
 
         const userEmail = session.user.email
-        const userRole = session.user.role
+        const userRole = session.user?.roles
 
         // 평가관리자는 모든 권한
-        if (userRole === "평가관리자") {
+        if (userRole?.some(role => role.includes('정기평가'))|| userRole?.some(role => role.toLocaleLowerCase().includes('admin'))) {
             return {
                 level: "admin",
                 editableApprovals: [
@@ -372,10 +374,10 @@ export function EditEvaluationTargetSheet({
                                                 <span className="font-medium">벤더명:</span> {evaluationTarget.vendorName}
                                             </div>
                                             <div>
-                                                <span className="font-medium">자재구분:</span> {evaluationTarget.materialType}
+                                                <span className="font-medium">자재구분:</span> {getMaterialTypeBadge(evaluationTarget.materialType)}
                                             </div>
                                             <div>
-                                                <span className="font-medium">상태:</span> {evaluationTarget.status}
+                                                <span className="font-medium">상태:</span> {getStatusLabel(evaluationTarget.status)}
                                             </div>
                                         </div>
                                     </CardContent>
-- 
cgit v1.2.3

