diff options
Diffstat (limited to 'lib/vendors')
| -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; |
