From b4e80d7fe2e2873b5af551947a0e323f4bf357e4 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Wed, 1 Oct 2025 06:27:55 +0000 Subject: (최겸) 구메 정기평가 수정, menuconfig tbe 주석처리 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/evaluation-target-list/service.ts | 5 ++++- .../table/evaluation-targets-columns.tsx | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'lib/evaluation-target-list') diff --git a/lib/evaluation-target-list/service.ts b/lib/evaluation-target-list/service.ts index 572a9006..00d0d294 100644 --- a/lib/evaluation-target-list/service.ts +++ b/lib/evaluation-target-list/service.ts @@ -13,6 +13,7 @@ import { isNotNull, lte, or, + ne, sql, type SQL, } from 'drizzle-orm'; @@ -686,8 +687,10 @@ export async function getAvailableReviewers(departmentCode?: string) { // departmentName: "API로 추후", // ✅ 부서명도 반환 }) .from(users) + .where(ne(users.domain, "partners")) .orderBy(users.name) // .limit(100); + //partners가 아닌 domain에 따라서 필터링 return reviewers; } catch (error) { @@ -1857,7 +1860,7 @@ export async function importEvalTargetExcel(file: File): Promise<{ const { userList } = await db.transaction(async (tx) => { const selectRes = await selectUsers(tx, { - where: and(eq(users.email, managerEmail), eq(users.isActive, true), isNotNull(users.userCode)), + where: and(eq(users.email, managerEmail), eq(users.isActive, true), ne(users.domain, "partners")), orderBy: [asc(users.name)], }); 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("adminComment") || row.getValue("consolidatedComment"); +const renderAdminComment = (maxWidth: string) => ({ row }: any) => { + const comment = row.getValue("adminComment") ; + return comment ? ( +
+ {comment} +
+ ) : ( + - + ); +}; +const renderConsolidatedComment = (maxWidth: string) => ({ row }: any) => { + const comment = row.getValue("consolidatedComment"); return 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: "종합 의견", -- cgit v1.2.3