diff options
Diffstat (limited to 'lib/evaluation-target-list/table/evaluation-targets-columns.tsx')
| -rw-r--r-- | lib/evaluation-target-list/table/evaluation-targets-columns.tsx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/evaluation-target-list/table/evaluation-targets-columns.tsx b/lib/evaluation-target-list/table/evaluation-targets-columns.tsx index f00738c7..63b7cb7a 100644 --- a/lib/evaluation-target-list/table/evaluation-targets-columns.tsx +++ b/lib/evaluation-target-list/table/evaluation-targets-columns.tsx @@ -130,8 +130,18 @@ const renderIsApproved = (fieldName: string) => ({ row }: any) => { return getEvaluationTargetBadge(isApproved); }; -const renderComment = (maxWidth: string) => ({ row }: any) => { - const comment = row.getValue<string>("adminComment") || row.getValue<string>("consolidatedComment"); +const renderAdminComment = (maxWidth: string) => ({ row }: any) => { + const comment = row.getValue<string>("adminComment") ; + return comment ? ( + <div className={`truncate ${maxWidth}`} title={comment}> + {comment} + </div> + ) : ( + <span className="text-muted-foreground">-</span> + ); +}; +const renderConsolidatedComment = (maxWidth: string) => ({ row }: any) => { + const comment = row.getValue<string>("consolidatedComment"); return comment ? ( <div className={`truncate ${maxWidth}`} title={comment}> {comment} @@ -453,7 +463,7 @@ function createStaticColumns(setRowAction: GetColumnsProps['setRowAction']): Col { accessorKey: "adminComment", header: createHeaderRenderer("관리자 의견"), - cell: renderComment("max-w-[150px]"), + cell: renderAdminComment("max-w-[150px]"), size: 150, meta: { excelHeader: "관리자 의견", @@ -462,7 +472,7 @@ function createStaticColumns(setRowAction: GetColumnsProps['setRowAction']): Col { accessorKey: "consolidatedComment", header: createHeaderRenderer("종합 의견"), - cell: renderComment("max-w-[150px]"), + cell: renderConsolidatedComment("max-w-[150px]"), size: 150, meta: { excelHeader: "종합 의견", |
