summaryrefslogtreecommitdiff
path: root/lib/evaluation-target-list
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-10-01 06:27:55 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-10-01 06:27:55 +0000
commitb4e80d7fe2e2873b5af551947a0e323f4bf357e4 (patch)
tree6990af37f16cb21e6fcb2f22e9d02f140059efca /lib/evaluation-target-list
parentd689608ca2a54cab2cd12a12f0b6007a1be39ab2 (diff)
(최겸) 구메 정기평가 수정, menuconfig tbe 주석처리
Diffstat (limited to 'lib/evaluation-target-list')
-rw-r--r--lib/evaluation-target-list/service.ts5
-rw-r--r--lib/evaluation-target-list/table/evaluation-targets-columns.tsx18
2 files changed, 18 insertions, 5 deletions
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<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: "종합 의견",