From 49d236df3bd2bd976ebc424644f34f5affa1074f Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Thu, 14 Aug 2025 13:15:21 +0000 Subject: (김준회) 결재 테스트 모듈 수정, 환경병수 eVCP 운영 대응, SGIPS JWT TOKEN 수정, SHI-API 기반 유저 관리 추가, 유저목록 테이블 변경 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/users/table/users-table-columns.tsx | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'lib/users/table/users-table-columns.tsx') diff --git a/lib/users/table/users-table-columns.tsx b/lib/users/table/users-table-columns.tsx index 217fefcf..d4c5c78a 100644 --- a/lib/users/table/users-table-columns.tsx +++ b/lib/users/table/users-table-columns.tsx @@ -6,7 +6,6 @@ import { type ColumnDef } from "@tanstack/react-table" import { Ellipsis } from "lucide-react" import { userRoles, type UserView } from "@/db/schema/users" -import { formatDate } from "@/lib/utils" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" import { Checkbox } from "@/components/ui/checkbox" @@ -96,10 +95,28 @@ export function getColumns({ setRowAction }: GetColumnsProps): ColumnDef { + // 날짜 컬럼: YYYY-MM-DD HH:mm + if (cfg.id === "created_at" || cfg.id === "updated_at" || cfg.id === "deactivated_at") { + const v = cell.getValue() as Date | string | null | undefined + if (!v) return "" + const d = new Date(v as any) + const y = d.getFullYear() + const m = String(d.getMonth() + 1).padStart(2, "0") + const day = String(d.getDate()).padStart(2, "0") + const hh = String(d.getHours()).padStart(2, "0") + const mm = String(d.getMinutes()).padStart(2, "0") + return `${y}-${m}-${day} ${hh}:${mm}` + } - if (cfg.id === "created_at") { - const dateVal = cell.getValue() as Date - return formatDate(dateVal, "KR") + // 불리언 컬럼: Y/N + if ( + cfg.id === "is_locked" || + cfg.id === "is_absent" || + cfg.id === "is_deleted_on_non_sap" || + cfg.id === "is_regular_employee" + ) { + const v = row.getValue(cfg.id) as boolean | null | undefined + return v === true ? "Y" : v === false ? "N" : "" } if (cfg.id === "roles") { -- cgit v1.2.3