diff options
Diffstat (limited to 'lib/users')
| -rw-r--r-- | lib/users/auth/verifyCredentails.ts | 2 | ||||
| -rw-r--r-- | lib/users/table/users-table-columns.tsx | 25 |
2 files changed, 22 insertions, 5 deletions
diff --git a/lib/users/auth/verifyCredentails.ts b/lib/users/auth/verifyCredentails.ts index a5dbab41..5cb9c24f 100644 --- a/lib/users/auth/verifyCredentails.ts +++ b/lib/users/auth/verifyCredentails.ts @@ -510,7 +510,7 @@ export async function verifySGipsCredentials( method: 'GET', headers: { 'Content-Type': 'application/json', - 'Authorization': `Bearer ${process.env.S_GIPS_TOKEN}`, + 'Authorization': `Bearer ${process.env.SHI_API_JWT_TOKEN}`, }, }); 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<UserVie type: cfg.type, }, cell: ({ row, cell }) => { + // 날짜 컬럼: 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") { |
