diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-12-09 05:31:04 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-12-09 05:31:04 +0000 |
| commit | 3462d754574e2558c791c7958d3e5da013a7a573 (patch) | |
| tree | 6eb26fddda5e4081fdead977c0ec6b152286d164 /lib/vendors/table/vendors-table-columns.tsx | |
| parent | 3f11179b2c50d7ee56b0cea38778191e3259b941 (diff) | |
(최겸) 구매 pq 내 안전 담당자 평가 기능 추가, vendor 안전적격성 평가 컬럼 추가
Diffstat (limited to 'lib/vendors/table/vendors-table-columns.tsx')
| -rw-r--r-- | lib/vendors/table/vendors-table-columns.tsx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/vendors/table/vendors-table-columns.tsx b/lib/vendors/table/vendors-table-columns.tsx index 36809715..b147f1ef 100644 --- a/lib/vendors/table/vendors-table-columns.tsx +++ b/lib/vendors/table/vendors-table-columns.tsx @@ -353,6 +353,27 @@ export function getColumns({ setRowAction, router, userId }: GetColumnsProps): C ); } + // 안전적격성 평가 통과 여부 컬럼 처리 + if (cfg.id === "safetyQualificationPassed") { + const val = row.original.safetyQualificationPassed as boolean | null | undefined; + const getBadge = (value: boolean | null | undefined) => { + if (value === true) { + return { text: "승인", className: "bg-green-100 text-green-800 border-green-300" }; + } + if (value === false) { + return { text: "거절", className: "bg-red-100 text-red-800 border-red-300" }; + } + return { text: "해당없음", className: "bg-gray-100 text-gray-700 border-gray-300" }; + }; + + const badge = getBadge(val); + return ( + <Badge variant="outline" className={badge.className}> + {badge.text} + </Badge> + ); + } + // 업체 유형 컬럼 처리 if (cfg.id === "vendorTypeName") { const typeVal = row.original.vendorTypeName as string | null; |
