1
0
forked from baron/baron-sso

프론트엔드 UI/UX를 전면 개편

This commit is contained in:
2026-02-20 17:56:53 +09:00
parent 2ec2653bfb
commit 919bcd27e8
18 changed files with 1092 additions and 736 deletions

View File

@@ -14,7 +14,6 @@ import TenantDetailPage from "../features/tenants/routes/TenantDetailPage";
import TenantListPage from "../features/tenants/routes/TenantListPage";
import { TenantProfilePage } from "../features/tenants/routes/TenantProfilePage";
import { TenantSchemaPage } from "../features/tenants/routes/TenantSchemaPage";
import GlobalUserGroupListPage from "../features/user-groups/routes/GlobalUserGroupListPage";
import { TenantUserGroupsTab } from "../features/user-groups/routes/TenantUserGroupsTab";
import { UserGroupDetailPage } from "../features/user-groups/routes/UserGroupDetailPage";
import UserCreatePage from "../features/users/UserCreatePage";
@@ -42,7 +41,6 @@ export const router = createBrowserRouter(
{ path: "users", element: <UserListPage /> },
{ path: "users/new", element: <UserCreatePage /> },
{ path: "users/:id", element: <UserDetailPage /> },
{ path: "user-groups", element: <GlobalUserGroupListPage /> },
{ path: "tenants", element: <TenantListPage /> },
{ path: "tenants/new", element: <TenantCreatePage /> },
{
@@ -51,12 +49,12 @@ export const router = createBrowserRouter(
children: [
{ index: true, element: <TenantProfilePage /> },
{ path: "admins", element: <TenantAdminsTab /> },
{ path: "user-groups", element: <TenantUserGroupsTab /> },
{ path: "organization", element: <TenantUserGroupsTab /> },
{ path: "schema", element: <TenantSchemaPage /> },
],
},
{
path: "tenants/:tenantId/user-groups/:id",
path: "tenants/:tenantId/organization/:id",
element: <UserGroupDetailPage />,
},
{ path: "api-keys", element: <ApiKeyListPage /> },

View File

@@ -30,11 +30,6 @@ const navItems = [
to: "/tenants",
icon: Building2,
},
{
label: "ui.admin.nav.user_groups",
to: "/user-groups",
icon: Users,
},
{ label: "ui.admin.nav.users", to: "/users", icon: Users },
{ label: "ui.admin.nav.api_keys", to: "/api-keys", icon: Key },
{ label: "ui.admin.nav.audit_logs", to: "/audit-logs", icon: NotebookTabs },

View File

@@ -1,9 +1,13 @@
import { ChevronDown, ChevronUp, Wrench } from "lucide-react";
import type { FC } from "react";
import { useEffect, useState } from "react";
import { t } from "../../lib/i18n";
const RoleSwitcher: FC = () => {
const [currentRole, setCurrentRole] = useState<string>("super_admin");
const [isCollapsed, setIsCollapsed] = useState<boolean>(() => {
return window.localStorage.getItem("RoleSwitcher-Collapsed") === "true";
});
useEffect(() => {
// localStorage에서 역할 읽기
@@ -16,6 +20,12 @@ const RoleSwitcher: FC = () => {
}
}, []);
const toggleCollapse = () => {
const nextState = !isCollapsed;
setIsCollapsed(nextState);
window.localStorage.setItem("RoleSwitcher-Collapsed", String(nextState));
};
const switchRole = (role: string) => {
// localStorage 설정
window.localStorage.setItem("X-Mock-Role", role);
@@ -42,47 +52,80 @@ const RoleSwitcher: FC = () => {
zIndex: 9999,
background: "#1A1F2C",
color: "white",
padding: "10px",
padding: "8px 12px",
borderRadius: "8px",
boxShadow: "0 4px 12px rgba(0,0,0,0.3)",
display: "flex",
flexDirection: "column",
gap: "8px",
gap: isCollapsed ? "0" : "8px",
fontSize: "12px",
transition: "all 0.3s ease",
border: "1px solid #333",
}}
>
<div
style={{
display: "flex",
alignItems: "center",
justifyContent: "space-between",
gap: "12px",
cursor: "pointer",
fontWeight: "bold",
borderBottom: "1px solid #444",
paddingBottom: "4px",
marginBottom: "4px",
paddingBottom: isCollapsed ? "0" : "4px",
borderBottom: isCollapsed ? "none" : "1px solid #444",
}}
onClick={toggleCollapse}
>
{t("ui.admin.dev_role_switcher", "🛠 DEV Role Switcher")}
<div style={{ display: "flex", alignItems: "center", gap: "6px" }}>
<Wrench size={14} className="text-blue-400" />
{!isCollapsed && (
<span>{t("ui.admin.dev_role_switcher", "DEV Role Switcher")}</span>
)}
{isCollapsed && (
<span style={{ fontSize: "10px", color: "#888" }}>
{currentRole.toUpperCase()}
</span>
)}
</div>
{isCollapsed ? <ChevronUp size={14} /> : <ChevronDown size={14} />}
</div>
{(
["super_admin", "tenant_admin", "rp_admin", "tenant_member"] as const
).map((role) => (
<button
key={role}
type="button"
onClick={() => switchRole(role)}
{!isCollapsed && (
<div
style={{
background: currentRole === role ? "#3b82f6" : "#333",
color: "white",
border: "none",
padding: "4px 8px",
borderRadius: "4px",
cursor: "pointer",
textAlign: "left",
transition: "background 0.2s",
display: "flex",
flexDirection: "column",
gap: "6px",
marginTop: "4px",
}}
>
{roleLabels[role] ?? role.toUpperCase().replace("_", " ")}{" "}
{currentRole === role ? "✅" : ""}
</button>
))}
{(
["super_admin", "tenant_admin", "rp_admin", "tenant_member"] as const
).map((role) => (
<button
key={role}
type="button"
onClick={() => switchRole(role)}
style={{
background: currentRole === role ? "#3b82f6" : "#333",
color: "white",
border: "none",
padding: "4px 8px",
borderRadius: "4px",
cursor: "pointer",
textAlign: "left",
transition: "background 0.2s",
display: "flex",
justifyContent: "space-between",
alignItems: "center",
}}
>
<span>{roleLabels[role] ?? role.toUpperCase().replace("_", " ")}</span>
{currentRole === role && <span style={{ marginLeft: "8px" }}></span>}
</button>
))}
</div>
)}
</div>
);
};

View File

@@ -1,7 +1,10 @@
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { Plus, Search, ShieldCheck, Trash2, UserPlus } from "lucide-react";
import type { AxiosError } from "axios";
import { Plus, Search, ShieldCheck, Trash2, UserPlus, Users } from "lucide-react";
import { useState } from "react";
import { useParams } from "react-router-dom";
import { toast } from "sonner";
import { Badge } from "../../../components/ui/badge";
import { Button } from "../../../components/ui/button";
import {
Card,
@@ -10,6 +13,14 @@ import {
CardHeader,
CardTitle,
} from "../../../components/ui/card";
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "../../../components/ui/dialog";
import { Input } from "../../../components/ui/input";
import {
Table,
@@ -25,40 +36,50 @@ import {
fetchUsers,
removeTenantAdmin,
} from "../../../lib/adminApi";
import { t } from "../../../lib/i18n";
function TenantAdminsTab() {
export function TenantAdminsTab() {
const { tenantId } = useParams<{ tenantId: string }>();
const queryClient = useQueryClient();
const [searchTerm, setSearchTerm] = useState("");
const [isDialogOpen, setIsAddDialogOpen] = useState(false);
if (!tenantId) return null;
// 현재 관리자 목록
// 현재 관리자 목록 조회
const adminsQuery = useQuery({
queryKey: ["tenant-admins", tenantId],
queryFn: () => fetchTenantAdmins(tenantId),
enabled: !!tenantId,
});
// 전체 사용자 목록 (관리자 추가용)
// 사용자 검색 조회 (2자 이상 입력 시)
const usersQuery = useQuery({
queryKey: ["users", { limit: 100, search: searchTerm }],
queryFn: () => fetchUsers(100, 0, searchTerm),
enabled: searchTerm.length > 1,
queryKey: ["admin-users-search", searchTerm],
queryFn: () => fetchUsers(20, 0, searchTerm),
enabled: isDialogOpen && searchTerm.length >= 2,
});
const addMutation = useMutation({
mutationFn: (userId: string) => addTenantAdmin(tenantId, userId),
onSuccess: () => {
adminsQuery.refetch();
queryClient.invalidateQueries({ queryKey: ["tenant-admins", tenantId] });
toast.success(t("msg.admin.tenants.admins.add_success", "관리자가 추가되었습니다."));
setSearchTerm("");
},
onError: (err: AxiosError<{ error?: string }>) => {
toast.error(err.response?.data?.error || t("msg.common.error", "오류가 발생했습니다."));
},
});
const removeMutation = useMutation({
mutationFn: (userId: string) => removeTenantAdmin(tenantId, userId),
onSuccess: () => {
adminsQuery.refetch();
queryClient.invalidateQueries({ queryKey: ["tenant-admins", tenantId] });
toast.success(t("msg.admin.tenants.admins.remove_success", "권한이 회수되었습니다."));
},
onError: (err: AxiosError<{ error?: string }>) => {
toast.error(err.response?.data?.error || t("msg.common.error", "오류가 발생했습니다."));
},
});
@@ -67,144 +88,176 @@ function TenantAdminsTab() {
};
const handleRemoveAdmin = (userId: string, userName: string) => {
if (window.confirm(`${userName} 사용자의 관리자 권한을 회수할까요?`)) {
if (window.confirm(t("msg.admin.tenants.admins.remove_confirm", { name: userName }))) {
removeMutation.mutate(userId);
}
};
const currentAdmins = adminsQuery.data || [];
const searchResults = usersQuery.data?.items || [];
return (
<div className="grid gap-6 lg:grid-cols-2 mt-6">
{/* 현재 테넌트 관리자 */}
<Card className="bg-[var(--color-panel)]">
<CardHeader>
<CardTitle className="flex items-center gap-2">
<ShieldCheck size={18} className="text-primary" />
</CardTitle>
<CardDescription>
.
</CardDescription>
</CardHeader>
<CardContent>
<Table>
<TableHeader>
<TableRow>
<TableHead></TableHead>
<TableHead></TableHead>
<TableHead className="text-right"></TableHead>
</TableRow>
</TableHeader>
<TableBody>
{adminsQuery.data?.length === 0 && (
<TableRow>
<TableCell
colSpan={3}
className="text-center py-8 text-muted-foreground"
>
.
</TableCell>
</TableRow>
)}
{adminsQuery.data?.map((admin) => (
<TableRow key={admin.id}>
<TableCell className="font-medium">
{admin.name || "Unknown"}
</TableCell>
<TableCell className="text-xs">{admin.email}</TableCell>
<TableCell className="text-right">
<Button
variant="ghost"
size="sm"
onClick={() => handleRemoveAdmin(admin.id, admin.name)}
disabled={removeMutation.isPending}
>
<Trash2 size={14} className="text-destructive" />
</Button>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</CardContent>
</Card>
{/* 사용자 검색 및 추가 */}
<Card className="bg-[var(--color-panel)]">
<CardHeader>
<div className="flex items-center justify-between">
<CardTitle className="flex items-center gap-2">
<UserPlus size={18} className="text-primary" />
<div className="space-y-6 mt-6">
<Card className="border-none shadow-sm bg-[var(--color-panel)]">
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-7">
<div className="space-y-1">
<CardTitle className="text-2xl font-bold flex items-center gap-2">
<ShieldCheck className="h-6 w-6 text-primary" />
{t("ui.admin.tenants.admins.title", "테넌트 관리자")}
</CardTitle>
</div>
<CardDescription>
( ).
</CardDescription>
</CardHeader>
<CardContent className="space-y-4">
<div className="relative">
<Search className="absolute left-3 top-3 h-4 w-4 text-muted-foreground" />
<Input
placeholder="사용자 검색 (최소 2자)..."
className="pl-10"
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
/>
<CardDescription className="text-muted-foreground">
{t("msg.admin.tenants.admins.subtitle", "이 테넌트의 자원을 관리할 수 있는 사용자 목록입니다.")}
</CardDescription>
</div>
<Table>
<TableHeader>
<TableRow>
<TableHead></TableHead>
<TableHead className="text-right"></TableHead>
</TableRow>
</TableHeader>
<TableBody>
{searchTerm.length < 2 && (
<Dialog open={isDialogOpen} onOpenChange={(open) => {
setIsAddDialogOpen(open);
if (!open) setSearchTerm("");
}}>
<DialogTrigger asChild>
<Button className="bg-primary text-primary-foreground hover:bg-primary/90">
<UserPlus className="mr-2 h-4 w-4" />
{t("ui.admin.tenants.admins.add_button", "관리자 추가")}
</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-[500px]">
<DialogHeader>
<DialogTitle className="text-xl font-bold">
{t("ui.admin.tenants.admins.dialog_title", "새 관리자 추가")}
</DialogTitle>
<DialogDescription>
{t("ui.admin.tenants.admins.dialog_description", "이름 또는 이메일로 사용자를 검색하세요.")}
</DialogDescription>
</DialogHeader>
<div className="py-4 space-y-4">
<div className="relative">
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" />
<Input
placeholder={t("ui.admin.tenants.admins.dialog_search_placeholder", "사용자 검색 (최소 2자)...")}
className="pl-10 h-11"
autoFocus
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
/>
</div>
<div className="max-h-[300px] overflow-y-auto rounded-lg border border-border">
{searchTerm.length < 2 ? (
<div className="p-10 text-center text-muted-foreground flex flex-col items-center gap-2">
<Search className="h-8 w-8 opacity-20" />
<p className="text-sm">{t("ui.admin.tenants.admins.dialog_search_hint", "검색어를 입력해 주세요.")}</p>
</div>
) : usersQuery.isLoading ? (
<div className="p-10 text-center">
<div className="animate-spin rounded-full h-6 w-6 border-b-2 border-primary mx-auto"></div>
</div>
) : searchResults.length === 0 ? (
<div className="p-10 text-center text-muted-foreground">
{t("ui.admin.tenants.admins.dialog_no_results", "검색 결과가 없습니다.")}
</div>
) : (
<div className="divide-y divide-border">
{searchResults.map((user) => {
const isAlreadyAdmin = currentAdmins.some((a) => a.id === user.id);
return (
<div key={user.id} className="flex items-center justify-between p-3 hover:bg-muted/50 transition-colors">
<div className="flex items-center gap-3">
<div className="h-9 w-9 rounded-full bg-primary/10 flex items-center justify-center text-primary font-bold text-xs">
{user.name.charAt(0)}
</div>
<div className="flex flex-col">
<span className="text-sm font-medium">{user.name}</span>
<span className="text-xs text-muted-foreground">{user.email}</span>
</div>
</div>
<Button
size="sm"
variant={isAlreadyAdmin ? "ghost" : "outline"}
disabled={isAlreadyAdmin || addMutation.isPending}
onClick={() => handleAddAdmin(user.id)}
>
{isAlreadyAdmin ? (
<Badge variant="secondary" className="font-normal">{t("ui.admin.tenants.admins.already_admin", "이미 관리자")}</Badge>
) : (
<><Plus className="h-3 w-3 mr-1" /> {t("ui.common.add", "추가")}</>
)}
</Button>
</div>
);
})}
</div>
)}
</div>
</div>
</DialogContent>
</Dialog>
</CardHeader>
<CardContent>
<div className="rounded-xl border border-border overflow-hidden">
<Table>
<TableHeader className="bg-muted/30">
<TableRow>
<TableCell
colSpan={2}
className="text-center py-8 text-muted-foreground"
>
.
</TableCell>
<TableHead className="w-[250px] font-bold">
{t("ui.admin.tenants.admins.table_name", "이름")}
</TableHead>
<TableHead className="font-bold">
{t("ui.admin.tenants.admins.table_email", "이메일")}
</TableHead>
<TableHead className="text-right font-bold w-[100px]">
{t("ui.admin.tenants.admins.table_actions", "액션")}
</TableHead>
</TableRow>
)}
{searchTerm.length >= 2 &&
usersQuery.data?.items.length === 0 && (
</TableHeader>
<TableBody>
{adminsQuery.isLoading ? (
<TableRow>
<TableCell
colSpan={2}
className="text-center py-8 text-muted-foreground"
>
.
<TableCell colSpan={3} className="h-32 text-center">
<div className="animate-spin rounded-full h-6 w-6 border-b-2 border-primary mx-auto"></div>
</TableCell>
</TableRow>
)}
{usersQuery.data?.items
.filter((u) => !adminsQuery.data?.some((a) => a.id === u.id))
.map((user) => (
<TableRow key={user.id}>
<TableCell>
<div className="font-medium">{user.name}</div>
<div className="text-[10px] text-muted-foreground">
{user.email}
) : currentAdmins.length === 0 ? (
<TableRow>
<TableCell colSpan={3} className="h-32 text-center text-muted-foreground">
<div className="flex flex-col items-center gap-2">
<Users className="h-8 w-8 opacity-20" />
<p>{t("msg.admin.tenants.admins.empty", "등록된 관리자가 없습니다.")}</p>
</div>
</TableCell>
<TableCell className="text-right">
<Button
variant="outline"
size="sm"
onClick={() => handleAddAdmin(user.id)}
disabled={addMutation.isPending}
>
<Plus size={14} />
</Button>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
) : (
currentAdmins.map((admin) => (
<TableRow key={admin.id} className="hover:bg-muted/30 transition-colors group">
<TableCell className="font-medium">
<div className="flex items-center gap-3">
<div className="h-8 w-8 rounded-lg bg-secondary flex items-center justify-center text-secondary-foreground font-bold text-xs">
{admin.name.charAt(0)}
</div>
<span>{admin.name}</span>
</div>
</TableCell>
<TableCell className="text-muted-foreground italic">
{admin.email}
</TableCell>
<TableCell className="text-right">
<Button
variant="ghost"
size="icon"
className="opacity-0 group-hover:opacity-100 text-destructive hover:text-destructive hover:bg-destructive/10 transition-all"
onClick={() => handleRemoveAdmin(admin.id, admin.name)}
disabled={removeMutation.isPending}
title={t("ui.admin.tenants.admins.remove_title", "관리자 권한 회수")}
>
<Trash2 className="h-4 w-4" />
</Button>
</TableCell>
</TableRow>
))
)}
</TableBody>
</Table>
</div>
</CardContent>
</Card>
</div>

View File

@@ -21,6 +21,7 @@ import { t } from "../../../lib/i18n";
function TenantCreatePage() {
const navigate = useNavigate();
const [name, setName] = useState("");
const [type, setType] = useState("COMPANY");
const [slug, setSlug] = useState("");
const [description, setDescription] = useState("");
const [status, setStatus] = useState("active");
@@ -30,6 +31,7 @@ function TenantCreatePage() {
mutationFn: () =>
createTenant({
name,
type,
slug: slug || undefined,
description: description || undefined,
status,
@@ -92,14 +94,30 @@ function TenantCreatePage() {
<CardContent className="space-y-4">
<div className="space-y-2">
<Label className="text-sm font-semibold">
{t("ui.admin.tenants.create.form.name", "Tenant name")}{" "}
{t("ui.admin.tenants.create.form.name", "테넌트 이름")}{" "}
<span className="text-destructive">*</span>
</Label>
<Input value={name} onChange={(e) => setName(e.target.value)} />
</div>
<div className="space-y-2">
<Label className="text-sm font-semibold">
{t("ui.admin.tenants.create.form.slug", "Slug")}
{t("ui.admin.tenants.create.form.type", "테넌트 유형")}
</Label>
<select
id="type"
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
value={type}
onChange={(e) => setType(e.target.value)}
>
<option value="COMPANY">{t("domain.tenant_type.company", "COMPANY (일반 기업)")}</option>
<option value="COMPANY_GROUP">{t("domain.tenant_type.company_group", "COMPANY_GROUP (그룹사/지주사)")}</option>
<option value="USER_GROUP">{t("domain.tenant_type.user_group", "USER_GROUP (내부 부서/팀)")}</option>
<option value="PERSONAL">{t("domain.tenant_type.personal", "PERSONAL (개인 워크스페이스)")}</option>
</select>
</div>
<div className="space-y-2">
<Label className="text-sm font-semibold">
{t("ui.admin.tenants.create.form.slug", "슬러그 (Slug)")}
</Label>
<Input
value={slug}
@@ -112,7 +130,7 @@ function TenantCreatePage() {
</div>
<div className="space-y-2">
<Label className="text-sm font-semibold">
{t("ui.admin.tenants.create.form.description", "Description")}
{t("ui.admin.tenants.create.form.description", "설명")}
</Label>
<Textarea
rows={3}
@@ -124,7 +142,7 @@ function TenantCreatePage() {
<Label className="text-sm font-semibold">
{t(
"ui.admin.tenants.create.form.domains_label",
"Allowed Domains (Comma separated)",
"허용된 도메인 (콤마로 구분)",
)}
</Label>
<Input
@@ -138,13 +156,13 @@ function TenantCreatePage() {
<p className="text-xs text-muted-foreground">
{t(
"msg.admin.tenants.create.form.domains_help",
"Users with these email domains will be automatically assigned to this tenant.",
"이 도메인을 가진 이메일로 가입한 사용자는 자동으로 이 테넌트에 배정됩니다.",
)}
</p>
</div>
<div className="space-y-2">
<Label className="text-sm font-semibold">
{t("ui.admin.tenants.create.form.status", "Status")}
{t("ui.admin.tenants.create.form.status", "상태")}
</Label>
<div className="flex gap-3">
<Button
@@ -152,14 +170,14 @@ function TenantCreatePage() {
variant={status === "active" ? "default" : "outline"}
onClick={() => setStatus("active")}
>
{t("ui.common.status.active", "Active")}
{t("ui.common.status.active", "활성")}
</Button>
<Button
type="button"
variant={status === "inactive" ? "default" : "outline"}
onClick={() => setStatus("inactive")}
>
{t("ui.common.status.inactive", "Inactive")}
{t("ui.common.status.inactive", "비활성")}
</Button>
</div>
</div>

View File

@@ -3,6 +3,7 @@ import { ArrowLeft } from "lucide-react";
import { Link, Outlet, useLocation, useParams } from "react-router-dom";
import { Badge } from "../../../components/ui/badge";
import { fetchTenant } from "../../../lib/adminApi";
import { t } from "../../../lib/i18n";
function TenantDetailPage() {
const params = useParams<{ tenantId: string }>();
@@ -17,88 +18,91 @@ function TenantDetailPage() {
const isFederationTab = location.pathname.includes("/federation");
const isAdminTab = location.pathname.includes("/admins");
const isUserGroupsTab = location.pathname.includes("/user-groups");
const isOrganizationTab = location.pathname.includes("/organization");
return (
<div className="space-y-8">
<header className="flex flex-wrap items-start justify-between gap-4">
<div className="space-y-2">
<div className="flex items-center gap-2 text-sm text-[var(--color-muted)]">
<Link to="/tenants" className="inline-flex items-center gap-2">
<Link to="/tenants" className="inline-flex items-center gap-2 hover:text-foreground transition-colors">
<ArrowLeft size={14} />
Tenants
{t("ui.admin.tenants.detail.breadcrumb_list", "테넌트 목록")}
</Link>
<span>/</span>
<span className="text-foreground">Detail</span>
<span className="text-foreground">{t("ui.admin.tenants.detail.title", "상세")}</span>
</div>
<h2 className="text-3xl font-semibold">
{tenantQuery.data?.name ?? "Loading Tenant..."}
{tenantQuery.data?.name ?? t("ui.admin.tenants.detail.loading", "불러오는 중...")}
</h2>
<p className="text-sm text-[var(--color-muted)]">
Edit tenant information or manage federation settings.
{t("ui.admin.tenants.detail.header_subtitle", "테넌트 정보를 수정하거나 연동 설정을 관리합니다.")}
</p>
</div>
<Badge variant="muted">Admin only</Badge>
<Badge variant="muted">{t("ui.common.admin_only", "관리자 전용")}</Badge>
</header>
{/* Tabs */}
<div className="flex border-b">
<div className="flex border-b border-border">
<Link
to={`/tenants/${tenantId}`}
className={`px-4 py-2 text-sm font-medium ${
className={`px-6 py-3 text-sm font-medium transition-colors relative ${
!isFederationTab &&
!isAdminTab &&
!location.pathname.includes("/schema")
? "border-b-2 border-blue-500 text-blue-600"
: "text-gray-500 hover:text-gray-700"
!location.pathname.includes("/schema") &&
!isOrganizationTab
? "text-primary border-b-2 border-primary"
: "text-muted-foreground hover:text-foreground"
}`}
>
Profile
{t("ui.admin.tenants.detail.tab_profile", "프로필")}
</Link>
<Link
to={`/tenants/${tenantId}/federation`}
className={`px-4 py-2 text-sm font-medium ${
className={`px-6 py-3 text-sm font-medium transition-colors relative ${
isFederationTab
? "border-b-2 border-blue-500 text-blue-600"
: "text-gray-500 hover:text-gray-700"
? "text-primary border-b-2 border-primary"
: "text-muted-foreground hover:text-foreground"
}`}
>
Federation
{t("ui.admin.tenants.detail.tab_federation", "외부 연동")}
</Link>
<Link
to={`/tenants/${tenantId}/admins`}
className={`px-4 py-2 text-sm font-medium ${
className={`px-6 py-3 text-sm font-medium transition-colors relative ${
isAdminTab
? "border-b-2 border-blue-500 text-blue-600"
: "text-gray-500 hover:text-gray-700"
? "text-primary border-b-2 border-primary"
: "text-muted-foreground hover:text-foreground"
}`}
>
Admins
{t("ui.admin.tenants.detail.tab_admins", "관리자 설정")}
</Link>
<Link
to={`/tenants/${tenantId}/user-groups`}
className={`px-4 py-2 text-sm font-medium ${
isUserGroupsTab
? "border-b-2 border-blue-500 text-blue-600"
: "text-gray-500 hover:text-gray-700"
to={`/tenants/${tenantId}/organization`}
className={`px-6 py-3 text-sm font-medium transition-colors relative ${
isOrganizationTab
? "text-primary border-b-2 border-primary"
: "text-muted-foreground hover:text-foreground"
}`}
>
User Groups
{t("ui.admin.tenants.detail.tab_organization", "조직 관리")}
</Link>
<Link
to={`/tenants/${tenantId}/schema`}
className={`px-4 py-2 text-sm font-medium ${
className={`px-6 py-3 text-sm font-medium transition-colors relative ${
location.pathname.includes("/schema")
? "border-b-2 border-blue-500 text-blue-600"
: "text-gray-500 hover:text-gray-700"
? "text-primary border-b-2 border-primary"
: "text-muted-foreground hover:text-foreground"
}`}
>
Schema
{t("ui.admin.tenants.detail.tab_schema", "사용자 스키마")}
</Link>
</div>
{/* Outlet for nested routes */}
<Outlet />
<div className="animate-in fade-in duration-500">
<Outlet />
</div>
</div>
);
}

View File

@@ -128,6 +128,9 @@ function TenantListPage() {
<TableHead>
{t("ui.admin.tenants.table.name", "NAME")}
</TableHead>
<TableHead>
{t("ui.admin.tenants.table.type", "TYPE")}
</TableHead>
<TableHead>
{t("ui.admin.tenants.table.slug", "SLUG")}
</TableHead>
@@ -163,6 +166,11 @@ function TenantListPage() {
{items.map((tenant) => (
<TableRow key={tenant.id}>
<TableCell className="font-semibold">{tenant.name}</TableCell>
<TableCell>
<Badge variant="outline" className="text-[10px] font-mono">
{tenant.type || "PERSONAL"}
</Badge>
</TableCell>
<TableCell>{tenant.slug}</TableCell>
<TableCell>
<Badge

View File

@@ -3,6 +3,7 @@ import type { AxiosError } from "axios";
import { Save, Trash2 } from "lucide-react";
import { useEffect, useState } from "react";
import { useNavigate, useParams } from "react-router-dom";
import { toast } from "sonner";
import { Button } from "../../../components/ui/button";
import {
Card,
@@ -20,6 +21,7 @@ import {
fetchTenant,
updateTenant,
} from "../../../lib/adminApi";
import { t } from "../../../lib/i18n";
export function TenantProfilePage() {
const { tenantId } = useParams<{ tenantId: string }>();
@@ -27,7 +29,7 @@ export function TenantProfilePage() {
const queryClient = useQueryClient();
if (!tenantId) {
return <div>Tenant ID is missing</div>;
return <div>{t("msg.admin.tenants.missing_id", "테넌트 ID가 없습니다.")}</div>;
}
const tenantQuery = useQuery({
@@ -36,6 +38,7 @@ export function TenantProfilePage() {
});
const [name, setName] = useState("");
const [type, setType] = useState("COMPANY");
const [slug, setSlug] = useState("");
const [description, setDescription] = useState("");
const [status, setStatus] = useState("active");
@@ -44,6 +47,7 @@ export function TenantProfilePage() {
useEffect(() => {
if (tenantQuery.data) {
setName(tenantQuery.data.name);
setType(tenantQuery.data.type || "COMPANY");
setSlug(tenantQuery.data.slug);
setDescription(tenantQuery.data.description ?? "");
setStatus(tenantQuery.data.status);
@@ -55,6 +59,7 @@ export function TenantProfilePage() {
mutationFn: () =>
updateTenant(tenantId, {
name,
type,
slug,
description: description || undefined,
status,
@@ -66,8 +71,11 @@ export function TenantProfilePage() {
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["tenants"] });
queryClient.invalidateQueries({ queryKey: ["tenant", tenantId] });
alert("Tenant updated successfully");
toast.success(t("msg.info.saved_success", "저장되었습니다."));
},
onError: (err: AxiosError<{ error?: string }>) => {
toast.error(err.response?.data?.error || t("err.common.unknown", "오류가 발생했습니다."));
}
});
const approveMutation = useMutation({
@@ -75,14 +83,18 @@ export function TenantProfilePage() {
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["tenants"] });
queryClient.invalidateQueries({ queryKey: ["tenant", tenantId] });
alert("Tenant approved successfully");
toast.success(t("msg.admin.tenants.approve_success", "테넌트가 승인되었습니다."));
},
onError: (err: AxiosError<{ error?: string }>) => {
toast.error(err.response?.data?.error || t("err.common.unknown", "오류가 발생했습니다."));
}
});
const deleteMutation = useMutation({
mutationFn: () => deleteTenant(tenantId),
onSuccess: () => {
navigate("/tenants");
toast.success(t("msg.admin.tenants.delete_success", "테넌트가 삭제되었습니다."));
},
});
@@ -92,13 +104,13 @@ export function TenantProfilePage() {
?.response?.data?.error;
const handleDelete = () => {
if (window.confirm("Are you sure you want to delete this tenant?")) {
if (window.confirm(t("msg.admin.tenants.delete_confirm", { name: tenantQuery.data?.name }))) {
deleteMutation.mutate();
}
};
const handleApprove = () => {
if (window.confirm("Approve this tenant?")) {
if (window.confirm(t("msg.admin.tenants.approve_confirm", "이 테넌트를 승인하시겠습니까?"))) {
approveMutation.mutate();
}
};
@@ -107,9 +119,9 @@ export function TenantProfilePage() {
<>
<Card className="bg-[var(--color-panel)] mt-6">
<CardHeader>
<CardTitle>Tenant profile</CardTitle>
<CardTitle>{t("ui.admin.tenants.profile.title", "테넌트 프로필")}</CardTitle>
<CardDescription>
Changes to slug and status are applied immediately.
{t("ui.admin.tenants.profile.subtitle", "슬러그 및 상태 변경은 즉시 적용됩니다.")}
</CardDescription>
</CardHeader>
<CardContent className="space-y-4">
@@ -120,16 +132,30 @@ export function TenantProfilePage() {
)}
<div className="space-y-2">
<Label className="text-sm font-semibold">
Tenant name <span className="text-destructive">*</span>
{t("ui.admin.tenants.profile.name", "테넌트 이름")} <span className="text-destructive">*</span>
</Label>
<Input value={name} onChange={(e) => setName(e.target.value)} />
</div>
<div className="space-y-2">
<Label className="text-sm font-semibold">Slug</Label>
<Label className="text-sm font-semibold">{t("ui.admin.tenants.profile.type", "테넌트 유형")}</Label>
<select
id="type"
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
value={type}
onChange={(e) => setType(e.target.value)}
>
<option value="COMPANY">{t("domain.tenant_type.company", "COMPANY (일반 기업)")}</option>
<option value="COMPANY_GROUP">{t("domain.tenant_type.company_group", "COMPANY_GROUP (그룹사/지주사)")}</option>
<option value="USER_GROUP">{t("domain.tenant_type.user_group", "USER_GROUP (내부 부서/팀)")}</option>
<option value="PERSONAL">{t("domain.tenant_type.personal", "PERSONAL (개인 워크스페이스)")}</option>
</select>
</div>
<div className="space-y-2">
<Label className="text-sm font-semibold">{t("ui.admin.tenants.profile.slug", "슬러그 (Slug)")}</Label>
<Input value={slug} onChange={(e) => setSlug(e.target.value)} />
</div>
<div className="space-y-2">
<Label className="text-sm font-semibold">Description</Label>
<Label className="text-sm font-semibold">{t("ui.admin.tenants.profile.description", "설명")}</Label>
<Textarea
rows={3}
value={description}
@@ -138,7 +164,7 @@ export function TenantProfilePage() {
</div>
<div className="space-y-2">
<Label className="text-sm font-semibold">
Allowed Domains (Comma separated)
{t("ui.admin.tenants.profile.allowed_domains", "허용된 도메인 (콤마로 구분)")}
</Label>
<Input
value={domains}
@@ -146,26 +172,25 @@ export function TenantProfilePage() {
placeholder="example.com, example.kr"
/>
<p className="text-xs text-muted-foreground">
Users with these email domains will be automatically assigned to
this tenant.
{t("ui.admin.tenants.profile.allowed_domains_help", "이 도메인을 가진 이메일로 가입한 사용자는 자동으로 이 테넌트에 배정됩니다.")}
</p>
</div>
<div className="space-y-2">
<Label className="text-sm font-semibold">Status</Label>
<Label className="text-sm font-semibold">{t("ui.admin.tenants.profile.status", "상태")}</Label>
<div className="flex gap-3">
<Button
type="button"
variant={status === "active" ? "default" : "outline"}
onClick={() => setStatus("active")}
>
Active
{t("ui.common.status.active", "활성")}
</Button>
<Button
type="button"
variant={status === "inactive" ? "default" : "outline"}
onClick={() => setStatus("inactive")}
>
Inactive
{t("ui.common.status.inactive", "비활성")}
</Button>
</div>
</div>
@@ -184,7 +209,7 @@ export function TenantProfilePage() {
disabled={deleteMutation.isPending}
>
<Trash2 size={16} />
Delete
{t("ui.common.delete", "삭제")}
</Button>
<div className="flex items-center gap-2">
{status === "pending" && (
@@ -194,11 +219,11 @@ export function TenantProfilePage() {
onClick={handleApprove}
disabled={approveMutation.isPending}
>
Approve Tenant
{t("ui.admin.tenants.profile.approve_button", "테넌트 승인")}
</Button>
)}
<Button variant="outline" onClick={() => navigate("/tenants")}>
Cancel
{t("ui.common.cancel", "취소")}
</Button>
<Button
onClick={() => updateMutation.mutate()}
@@ -209,7 +234,7 @@ export function TenantProfilePage() {
}
>
<Save size={16} />
Save
{t("ui.common.save", "저장")}
</Button>
</div>
</div>

View File

@@ -3,6 +3,7 @@ import type { AxiosError } from "axios";
import { Plus, Save, Trash2 } from "lucide-react";
import { useEffect, useState } from "react";
import { useParams } from "react-router-dom";
import { toast } from "sonner";
import { Button } from "../../../components/ui/button";
import {
Card,
@@ -39,7 +40,9 @@ export function TenantSchemaPage() {
if (!tenantId) {
return (
<div>{t("msg.admin.tenants.schema.missing_id", "Tenant ID missing")}</div>
<div className="p-8 text-center text-muted-foreground">
{t("msg.admin.tenants.schema.missing_id", "테넌트 ID가 없습니다.")}
</div>
);
}
@@ -78,18 +81,10 @@ export function TenantSchemaPage() {
}),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["tenant", tenantId] });
alert(
t(
"msg.admin.tenants.schema.update_success",
"Schema updated successfully",
),
);
toast.success(t("msg.admin.tenants.schema.update_success", "스키마가 저장되었습니다."));
},
onError: (err: AxiosError<{ error?: string }>) => {
alert(
err.response?.data?.error ||
t("msg.admin.tenants.schema.update_error", "Failed to update schema"),
);
toast.error(err.response?.data?.error || t("msg.admin.tenants.schema.update_error", "저장에 실패했습니다."));
},
});
@@ -118,56 +113,57 @@ export function TenantSchemaPage() {
return (
<div className="space-y-6 mt-6">
<Card>
<Card className="border-none shadow-sm bg-[var(--color-panel)]">
<CardHeader>
<div className="flex items-center justify-between">
<div>
<CardTitle>
{t("ui.admin.tenants.schema.title", "User Schema Extension")}
<div className="space-y-1">
<CardTitle className="text-2xl font-bold">
{t("ui.admin.tenants.schema.title", "사용자 스키마 확장")}
</CardTitle>
<CardDescription>
{t(
"msg.admin.tenants.schema.subtitle",
"Define custom attributes for users in this tenant.",
"이 테넌트 사용자를 위한 커스텀 속성을 정의합니다.",
)}
</CardDescription>
</div>
<Button onClick={addField} size="sm">
<Plus size={16} className="mr-2" />
{t("ui.admin.tenants.schema.add_field", "Add Field")}
{t("ui.admin.tenants.schema.add_field", "필드 추가")}
</Button>
</div>
</CardHeader>
<CardContent className="space-y-4">
{fields.length === 0 && (
<div className="py-8 text-center text-muted-foreground border border-dashed rounded-md">
<div className="py-12 text-center text-muted-foreground border border-dashed rounded-lg bg-muted/10">
{t(
"msg.admin.tenants.schema.empty",
'No custom fields defined. Click "Add Field" to begin.',
'정의된 커스텀 필드가 없습니다. "필드 추가"를 눌러 시작하세요.',
)}
</div>
)}
{fields.map((field, index) => (
<div
key={field.id}
className="flex items-end gap-4 p-4 border rounded-md bg-muted/30"
className="flex items-end gap-4 p-5 border border-border rounded-xl bg-muted/20 hover:bg-muted/30 transition-colors"
>
<div className="flex-1 space-y-2">
<Label>
{t("ui.admin.tenants.schema.field.key", "Field Key (ID)")}
<Label className="text-xs font-bold uppercase tracking-wider text-muted-foreground">
{t("ui.admin.tenants.schema.field.key", "필드 키 (ID)")}
</Label>
<Input
value={field.key}
onChange={(e) => updateField(index, { key: e.target.value })}
placeholder={t(
"ui.admin.tenants.schema.field.key_placeholder",
"e.g. employee_id",
"예: employee_id",
)}
className="h-10"
/>
</div>
<div className="flex-1 space-y-2">
<Label>
{t("ui.admin.tenants.schema.field.label", "Display Label")}
<Label className="text-xs font-bold uppercase tracking-wider text-muted-foreground">
{t("ui.admin.tenants.schema.field.label", "표시 라벨")}
</Label>
<Input
value={field.label}
@@ -176,14 +172,17 @@ export function TenantSchemaPage() {
}
placeholder={t(
"ui.admin.tenants.schema.field.label_placeholder",
"e.g. 사번",
"예: 사번",
)}
className="h-10"
/>
</div>
<div className="w-32 space-y-2">
<Label>{t("ui.admin.tenants.schema.field.type", "Type")}</Label>
<div className="w-40 space-y-2">
<Label className="text-xs font-bold uppercase tracking-wider text-muted-foreground">
{t("ui.admin.tenants.schema.field.type", "유형")}
</Label>
<select
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm"
className="flex h-10 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus:ring-1 focus:ring-primary"
value={field.type}
onChange={(e) => {
const nextType = e.target.value;
@@ -197,36 +196,37 @@ export function TenantSchemaPage() {
}}
>
<option value="text">
{t("ui.admin.tenants.schema.field.type_text", "Text")}
{t("ui.admin.tenants.schema.field.type_text", "텍스트 (Text)")}
</option>
<option value="number">
{t("ui.admin.tenants.schema.field.type_number", "Number")}
{t("ui.admin.tenants.schema.field.type_number", "숫자 (Number)")}
</option>
<option value="boolean">
{t("ui.admin.tenants.schema.field.type_boolean", "Boolean")}
{t("ui.admin.tenants.schema.field.type_boolean", "불리언 (Boolean)")}
</option>
</select>
</div>
<Button
variant="ghost"
size="icon"
className="text-destructive"
className="text-destructive hover:bg-destructive/10 h-10 w-10"
onClick={() => removeField(index)}
>
<Trash2 size={16} />
<Trash2 size={18} />
</Button>
</div>
))}
</CardContent>
</Card>
<div className="flex justify-end">
<div className="flex justify-end pt-2">
<Button
onClick={() => updateMutation.mutate(fields)}
disabled={updateMutation.isPending || tenantQuery.isLoading}
className="px-8 h-11"
>
<Save size={16} className="mr-2" />
{t("ui.admin.tenants.schema.save", "Save Schema Changes")}
<Save size={18} className="mr-2" />
{t("ui.admin.tenants.schema.save", "변경사항 저장")}
</Button>
</div>
</div>

View File

@@ -1,141 +0,0 @@
import { useQuery } from "@tanstack/react-query";
import { Building2, Plus, Users } from "lucide-react";
import { useState } from "react";
import { Link } from "react-router-dom";
import { Badge } from "../../../components/ui/badge";
import { Button } from "../../../components/ui/button";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "../../../components/ui/card";
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "../../../components/ui/table";
import { fetchGroups, fetchTenants } from "../../../lib/adminApi";
export default function GlobalUserGroupListPage() {
const { data: tenantList, isLoading: isTenantsLoading } = useQuery({
queryKey: ["admin-tenants"],
queryFn: () => fetchTenants(100, 0),
});
if (isTenantsLoading)
return <div className="p-8">Loading tenants and groups...</div>;
return (
<div className="space-y-8">
<header className="flex items-start justify-between">
<div className="space-y-1">
<h2 className="text-3xl font-bold tracking-tight">User Groups</h2>
<p className="text-muted-foreground">
.
.
</p>
</div>
</header>
<div className="grid gap-6">
{tenantList?.items.map((tenant) => (
<TenantGroupCard key={tenant.id} tenant={tenant} />
))}
</div>
</div>
);
}
function TenantGroupCard({ tenant }: { tenant: any }) {
const { data: groups, isLoading } = useQuery({
queryKey: ["tenant-user-groups", tenant.id],
queryFn: () => fetchGroups(tenant.id),
});
return (
<Card>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<div className="space-y-1">
<CardTitle className="text-xl flex items-center gap-2">
<Building2 size={20} className="text-muted-foreground" />
{tenant.name}
<Badge variant="outline" className="ml-2">
{tenant.slug}
</Badge>
</CardTitle>
<CardDescription>
.
</CardDescription>
</div>
<Button size="sm" variant="outline" asChild>
<Link to={`/tenants/${tenant.id}/user-groups`}>
<Plus size={16} className="mr-2" />
</Link>
</Button>
</CardHeader>
<CardContent>
<Table>
<TableHeader>
<TableRow>
<TableHead className="w-[250px]"></TableHead>
<TableHead></TableHead>
<TableHead className="w-[100px]"> </TableHead>
<TableHead className="text-right"></TableHead>
</TableRow>
</TableHeader>
<TableBody>
{isLoading ? (
<TableRow>
<TableCell colSpan={4} className="text-center">
Loading...
</TableCell>
</TableRow>
) : groups?.length === 0 ? (
<TableRow>
<TableCell
colSpan={4}
className="text-center text-muted-foreground py-4"
>
.
</TableCell>
</TableRow>
) : (
groups?.map((group) => (
<TableRow key={group.id}>
<TableCell className="font-medium">
<div className="flex items-center gap-2">
<Users size={14} className="text-primary" />
<Link
to={`/tenants/${tenant.id}/user-groups/${group.id}`}
className="hover:underline"
>
{group.name}
</Link>
</div>
</TableCell>
<TableCell>{group.description || "-"}</TableCell>
<TableCell>{group.members?.length || 0} </TableCell>
<TableCell className="text-right">
<Button variant="ghost" size="sm" asChild>
<Link
to={`/tenants/${tenant.id}/user-groups/${group.id}`}
>
</Link>
</Button>
</TableCell>
</TableRow>
))
)}
</TableBody>
</Table>
</CardContent>
</Card>
);
}

View File

@@ -1,7 +1,9 @@
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { Plus, Trash2, Users } from "lucide-react";
import { useState } from "react";
import { Plus, Trash2, Upload, Users } from "lucide-react";
import { useRef, useState } from "react";
import { Link, useParams } from "react-router-dom";
import { toast } from "sonner";
import { Badge } from "../../../components/ui/badge";
import { Button } from "../../../components/ui/button";
import {
Card,
@@ -29,14 +31,23 @@ import {
TableHeader,
TableRow,
} from "../../../components/ui/table";
import { createGroup, deleteGroup, fetchGroups } from "../../../lib/adminApi";
import {
createGroup,
deleteGroup,
fetchGroups,
importOrgChart,
} from "../../../lib/adminApi";
import { t } from "../../../lib/i18n";
export function TenantUserGroupsTab() {
const { tenantId } = useParams<{ tenantId: string }>();
const queryClient = useQueryClient();
const fileInputRef = useRef<HTMLInputElement>(null);
const [isCreateOpen, setIsCreateOpen] = useState(false);
const [newGroupName, setNewGroupName] = useState("");
const [newGroupDesc, setNewGroupDesc] = useState("");
const [newParentId, setNewParentId] = useState("");
const [newUnitType, setNewUnitType] = useState("");
const { data: groups, isLoading } = useQuery({
queryKey: ["tenant-user-groups", tenantId],
@@ -46,7 +57,12 @@ export function TenantUserGroupsTab() {
const createMutation = useMutation({
mutationFn: () =>
createGroup(tenantId!, { name: newGroupName, description: newGroupDesc }),
createGroup(tenantId!, {
name: newGroupName,
description: newGroupDesc,
parentId: newParentId || undefined,
unitType: newUnitType || undefined,
}),
onSuccess: () => {
queryClient.invalidateQueries({
queryKey: ["tenant-user-groups", tenantId],
@@ -54,10 +70,25 @@ export function TenantUserGroupsTab() {
setIsCreateOpen(false);
setNewGroupName("");
setNewGroupDesc("");
alert("User group created successfully");
setNewParentId("");
setNewUnitType("");
toast.success(t("msg.admin.groups.list.create_success", "조직 단위가 생성되었습니다."));
},
onError: (error: any) => {
alert(error.message || "Failed to create user group");
toast.error(t("msg.admin.groups.list.create_error", { error: error.message }));
},
});
const importMutation = useMutation({
mutationFn: (file: File) => importOrgChart(tenantId!, file),
onSuccess: () => {
queryClient.invalidateQueries({
queryKey: ["tenant-user-groups", tenantId],
});
toast.success(t("msg.admin.groups.list.import_success", "조직도가 임포트되었습니다."));
},
onError: (error: any) => {
toast.error(t("msg.admin.groups.list.import_error", { error: error.message }));
},
});
@@ -67,137 +98,204 @@ export function TenantUserGroupsTab() {
queryClient.invalidateQueries({
queryKey: ["tenant-user-groups", tenantId],
});
alert("User group deleted successfully");
toast.success(t("msg.admin.groups.list.delete_success", "조직 단위가 삭제되었습니다."));
},
});
if (isLoading) return <div>Loading user groups...</div>;
const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const file = e.target.files?.[0];
if (file) {
importMutation.mutate(file);
}
};
if (isLoading) return <div className="p-8 text-center text-muted-foreground">{t("msg.admin.groups.list.loading", "로딩 중...")}</div>;
return (
<div className="space-y-6">
<Card>
<div className="space-y-6 mt-6">
<Card className="border-none shadow-sm bg-[var(--color-panel)]">
<CardHeader className="flex flex-row items-center justify-between">
<div>
<CardTitle>User Groups</CardTitle>
<div className="space-y-1">
<CardTitle className="text-2xl font-bold">
{t("ui.admin.groups.list.title", "조직 관리")}
</CardTitle>
<CardDescription>
Manage user groups within this tenant for collective permission
assignment.
{t("msg.admin.groups.list.subtitle", "이 테넌트에 정의된 조직 단위들을 관리합니다.")}
</CardDescription>
</div>
<Dialog open={isCreateOpen} onOpenChange={setIsCreateOpen}>
<DialogTrigger asChild>
<Button size="sm">
<Plus size={16} className="mr-2" />
Create Group
</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Create User Group</DialogTitle>
<DialogDescription>
Create a new group to manage users collectively.
</DialogDescription>
</DialogHeader>
<div className="space-y-4 py-4">
<div className="space-y-2">
<Label htmlFor="name">Group Name</Label>
<Input
id="name"
placeholder="e.g. Developers, Project A Managers"
value={newGroupName}
onChange={(e) => setNewGroupName(e.target.value)}
/>
</div>
<div className="space-y-2">
<Label htmlFor="description">Description</Label>
<Input
id="description"
placeholder="Brief description of the group"
value={newGroupDesc}
onChange={(e) => setNewGroupDesc(e.target.value)}
/>
</div>
</div>
<DialogFooter>
<Button
variant="outline"
onClick={() => setIsCreateOpen(false)}
>
Cancel
<div className="flex gap-2">
<input
type="file"
ref={fileInputRef}
className="hidden"
accept=".csv"
onChange={handleFileChange}
/>
<Button
variant="outline"
size="sm"
onClick={() => fileInputRef.current?.click()}
disabled={importMutation.isPending}
>
{importMutation.isPending ? (
t("ui.common.requesting", "요청 중...")
) : (
<>
<Upload size={16} className="mr-2" />
{t("ui.admin.groups.import_csv", "CSV 임포트")}
</>
)}
</Button>
<Dialog open={isCreateOpen} onOpenChange={setIsCreateOpen}>
<DialogTrigger asChild>
<Button size="sm">
<Plus size={16} className="mr-2" />
{t("ui.admin.groups.add_unit", "조직 추가")}
</Button>
<Button
onClick={() => createMutation.mutate()}
disabled={!newGroupName || createMutation.isPending}
>
{createMutation.isPending ? "Creating..." : "Create Group"}
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>{t("ui.admin.groups.create.title", "새 조직 단위 생성")}</DialogTitle>
<DialogDescription>
{t("ui.admin.groups.create.description", "부서나 팀과 같은 새로운 조직 단위를 추가합니다.")}
</DialogDescription>
</DialogHeader>
<div className="space-y-4 py-4">
<div className="space-y-2">
<Label htmlFor="name">{t("ui.admin.groups.form.name_label", "조직명")}</Label>
<Input
id="name"
placeholder={t("ui.admin.groups.form.name_placeholder", "예: 개발팀")}
value={newGroupName}
onChange={(e) => setNewGroupName(e.target.value)}
/>
</div>
<div className="space-y-2">
<Label htmlFor="parentId">{t("ui.admin.groups.form.parent_label", "상위 조직")}</Label>
<select
id="parentId"
className="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm"
value={newParentId}
onChange={(e) => setNewParentId(e.target.value)}
>
<option value="">{t("ui.admin.groups.form.parent_none", "없음 (최상위)")}</option>
{groups?.map((g) => (
<option key={g.id} value={g.id}>
{g.name}
</option>
))}
</select>
</div>
<div className="space-y-2">
<Label htmlFor="unitType">{t("ui.admin.groups.form.unit_level_label", "조직 레벨")}</Label>
<Input
id="unitType"
placeholder={t("ui.admin.groups.form.unit_level_placeholder", "예: 본부, 팀")}
value={newUnitType}
onChange={(e) => setNewUnitType(e.target.value)}
/>
</div>
<div className="space-y-2">
<Label htmlFor="description">{t("ui.admin.groups.form.desc_label", "설명")}</Label>
<Input
id="description"
placeholder={t("ui.admin.groups.form.desc_placeholder", "설명을 입력하세요.")}
value={newGroupDesc}
onChange={(e) => setNewGroupDesc(e.target.value)}
/>
</div>
</div>
<DialogFooter>
<Button
variant="outline"
onClick={() => setIsCreateOpen(false)}
>
{t("ui.common.cancel", "취소")}
</Button>
<Button
onClick={() => createMutation.mutate()}
disabled={!newGroupName || createMutation.isPending}
>
{createMutation.isPending ? t("ui.common.requesting", "생성 중...") : t("ui.admin.groups.form.submit", "생성하기")}
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</div>
</CardHeader>
<CardContent>
<Table>
<TableHeader>
<TableRow>
<TableHead>Name</TableHead>
<TableHead>Description</TableHead>
<TableHead>Created At</TableHead>
<TableHead className="text-right">Actions</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{groups?.length === 0 ? (
<div className="rounded-md border border-border overflow-hidden">
<Table>
<TableHeader className="bg-muted/30">
<TableRow>
<TableCell
colSpan={4}
className="text-center py-8 text-muted-foreground"
>
No user groups found for this tenant.
</TableCell>
<TableHead className="font-bold">{t("ui.admin.groups.table.name", "이름")}</TableHead>
<TableHead className="font-bold">{t("ui.admin.groups.table.level", "레벨")}</TableHead>
<TableHead className="font-bold">{t("ui.admin.groups.form.desc_label", "설명")}</TableHead>
<TableHead className="font-bold">{t("ui.admin.groups.table.created_at", "생성일")}</TableHead>
<TableHead className="text-right font-bold">{t("ui.admin.groups.table.actions", "액션")}</TableHead>
</TableRow>
) : (
groups?.map((group) => (
<TableRow key={group.id}>
<TableCell className="font-medium">
<div className="flex items-center gap-2">
<Users size={16} className="text-muted-foreground" />
<Link
to={`/tenants/${tenantId}/user-groups/${group.id}`}
className="hover:underline text-primary"
>
{group.name}
</Link>
</div>
</TableCell>
<TableCell>{group.description || "-"}</TableCell>
<TableCell>
{group.createdAt
? new Date(group.createdAt).toLocaleDateString()
: "-"}
</TableCell>
<TableCell className="text-right">
<Button
variant="ghost"
size="icon"
className="text-destructive hover:text-destructive hover:bg-destructive/10"
onClick={() => {
if (
confirm(
"Are you sure you want to delete this group?",
)
) {
deleteMutation.mutate(group.id);
}
}}
>
<Trash2 size={16} />
</Button>
</TableHeader>
<TableBody>
{groups?.length === 0 ? (
<TableRow>
<TableCell
colSpan={5}
className="text-center py-12 text-muted-foreground"
>
{t("msg.admin.groups.list.empty", "테넌트에 등록된 조직 단위가 없습니다.")}
</TableCell>
</TableRow>
))
)}
</TableBody>
</Table>
) : (
groups?.map((group) => (
<TableRow key={group.id} className="hover:bg-muted/30 transition-colors">
<TableCell className="font-medium">
<div className="flex items-center gap-2">
<Users size={16} className="text-muted-foreground" />
<Link
to={`/tenants/${tenantId}/organization/${group.id}`}
className="hover:underline text-primary"
>
{group.name}
</Link>
</div>
</TableCell>
<TableCell>
{group.unitType ? (
<Badge variant="secondary" className="font-normal">{group.unitType}</Badge>
) : (
"-"
)}
</TableCell>
<TableCell className="max-w-[200px] truncate">{group.description || "-"}</TableCell>
<TableCell className="text-muted-foreground text-sm">
{group.createdAt
? new Date(group.createdAt).toLocaleDateString()
: "-"}
</TableCell>
<TableCell className="text-right">
<Button
variant="ghost"
size="icon"
className="text-destructive hover:bg-destructive/10"
onClick={() => {
if (
confirm(
t("msg.admin.groups.list.delete_confirm", "정말로 삭제하시겠습니까?")
)
) {
deleteMutation.mutate(group.id);
}
}}
>
<Trash2 size={16} />
</Button>
</TableCell>
</TableRow>
))
)}
</TableBody>
</Table>
</div>
</CardContent>
</Card>
</div>

View File

@@ -2,6 +2,7 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { ArrowLeft, Plus, Shield, Trash2, UserPlus, Users } from "lucide-react";
import { useState } from "react";
import { Link, useParams } from "react-router-dom";
import { toast } from "sonner";
import { Badge } from "../../../components/ui/badge";
import { Button } from "../../../components/ui/button";
import {
@@ -47,6 +48,7 @@ import {
removeGroupMember,
removeGroupRole,
} from "../../../lib/adminApi";
import { t } from "../../../lib/i18n";
export function UserGroupDetailPage() {
const { tenantId, id } = useParams<{ tenantId: string; id: string }>();
@@ -99,10 +101,10 @@ export function UserGroupDetailPage() {
queryClient.invalidateQueries({ queryKey: ["user-group-detail", id] });
setIsAddMemberOpen(false);
setSelectedUserId("");
alert("Member added successfully");
toast.success(t("msg.admin.groups.members.add_success", "구성원이 추가되었습니다."));
},
onError: (error: any) => {
alert(error.message || "Failed to add member");
toast.error(error.message || t("err.common.unknown", "오류가 발생했습니다."));
},
});
@@ -110,7 +112,7 @@ export function UserGroupDetailPage() {
mutationFn: (userId: string) => removeGroupMember(tenantId!, id!, userId),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["user-group-detail", id] });
alert("Member removed successfully");
toast.success(t("msg.admin.groups.members.remove_success", "구성원이 제외되었습니다."));
},
});
@@ -120,10 +122,10 @@ export function UserGroupDetailPage() {
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["user-group-roles", id] });
setIsAddRoleOpen(false);
alert(`Role '${selectedRelation}' assigned successfully`);
toast.success(t("msg.admin.groups.roles.assign_success", "역할이 할당되었습니다."));
},
onError: (error: any) => {
alert(error.message || "Failed to assign role");
toast.error(error.message || t("err.common.unknown", "오류가 발생했습니다."));
},
});
@@ -132,7 +134,7 @@ export function UserGroupDetailPage() {
removeGroupRole(tenantId!, id!, role.targetTenantId, role.relation),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["user-group-roles", id] });
alert("Role removed successfully");
toast.success(t("msg.admin.groups.roles.remove_success", "역할이 회수되었습니다."));
},
});
@@ -141,7 +143,7 @@ export function UserGroupDetailPage() {
<div className="flex items-center justify-center p-12">
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-primary"></div>
<span className="ml-3 text-muted-foreground">
Loading group details...
{t("msg.common.loading", "로딩 중...")}
</span>
</div>
);
@@ -150,32 +152,25 @@ export function UserGroupDetailPage() {
return (
<div className="p-8 text-center space-y-4">
<h3 className="text-xl font-semibold text-destructive">
Could not load group
</h3>
<div className="p-4 bg-red-50 text-red-700 rounded-md text-left text-sm font-mono overflow-auto max-w-xl mx-auto border border-red-100">
<div className="p-4 bg-destructive/10 text-destructive rounded-md text-left text-sm font-mono overflow-auto max-w-xl mx-auto border border-destructive/20">
<p>
Error:{" "}
{(error as any)?.response?.data?.error ||
(error as any)?.message ||
"Not found"}
</p>
<p className="mt-2 text-red-500 opacity-70">
Path: /admin/tenants/{tenantId}/user-groups/{id}
</p>
</div>
<p className="text-muted-foreground pt-2">
The group ID might be invalid or you don't have sufficient
permissions.
</p>
<Button variant="outline" onClick={() => window.location.reload()}>
Retry
{t("ui.common.retry", "다시 시도")}
</Button>
<div className="pt-4 border-t">
<Link
to={`/tenants/${tenantId}/user-groups`}
to={`/tenants/${tenantId}/organization`}
className="text-primary hover:underline text-sm"
>
Return to Group List
{t("ui.admin.groups.detail.breadcrumb_org", "조직 관리 목록으로 돌아가기")}
</Link>
</div>
</div>
@@ -185,72 +180,84 @@ export function UserGroupDetailPage() {
<div className="space-y-8">
<header className="flex flex-wrap items-start justify-between gap-4">
<div className="space-y-2">
<div className="flex items-center gap-2 text-sm text-[var(--color-muted)]">
<div className="flex items-center gap-2 text-sm text-muted-foreground">
<Link
to={`/tenants/${tenantId}`}
className="inline-flex items-center gap-2 hover:text-foreground transition-colors"
>
<ArrowLeft size={14} />
Tenant Detail
{t("ui.admin.groups.detail.breadcrumb_tenant", "테넌트 상세")}
</Link>
<span>/</span>
<span className="text-foreground">User Group</span>
<Link
to={`/tenants/${tenantId}/organization`}
className="hover:text-foreground transition-colors"
>
{t("ui.admin.groups.detail.breadcrumb_org", "조직 관리")}
</Link>
<span>/</span>
<span className="text-foreground">{t("ui.admin.groups.detail.breadcrumb_unit", "조직 단위")}</span>
</div>
<div className="flex items-center gap-3">
<div className="p-2 bg-primary/10 rounded-lg">
<Users size={24} className="text-primary" />
</div>
<h2 className="text-3xl font-semibold">{currentGroup.name}</h2>
{currentGroup.unitType && (
<Badge variant="secondary" className="h-6 font-normal">
{currentGroup.unitType}
</Badge>
)}
</div>
<p className="text-sm text-[var(--color-muted)]">
{currentGroup.description || "No description provided."}
<p className="text-sm text-muted-foreground">
{currentGroup.description || t("msg.common.no_description", "설명이 없습니다.")}
</p>
</div>
<div className="flex gap-2">
<Badge variant="outline">User Group</Badge>
<Badge variant="muted">Tenant: {tenantId?.split("-")[0]}...</Badge>
<Badge variant="outline" className="font-normal">{t("ui.admin.groups.detail.breadcrumb_unit", "조직 단위")}</Badge>
<Badge variant="muted" className="font-normal">ID: {id?.split("-")[0]}...</Badge>
</div>
</header>
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
{/* Members Management */}
<Card>
<Card className="border-none shadow-sm bg-[var(--color-panel)]">
<CardHeader className="flex flex-row items-center justify-between">
<div>
<CardTitle>Members</CardTitle>
<CardDescription>Manage users in this group.</CardDescription>
<CardTitle>{t("ui.admin.groups.detail.members_title", "구성원 관리")}</CardTitle>
<CardDescription>{t("ui.admin.groups.detail.members_subtitle", "이 조직에 소속된 사용자를 관리합니다.")}</CardDescription>
</div>
<Dialog open={isAddMemberOpen} onOpenChange={setIsAddMemberOpen}>
<DialogTrigger asChild>
<Button size="sm" variant="outline">
<UserPlus size={16} className="mr-2" />
Add Member
{t("ui.common.add", "추가")}
</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Add Member</DialogTitle>
<DialogTitle>{t("ui.admin.groups.detail.members_title", "구성원 추가")}</DialogTitle>
<DialogDescription>
Select a user to add to this group.
{t("ui.admin.groups.detail.members_subtitle", "사용자를 검색하여 조직 구성원으로 추가합니다.")}
</DialogDescription>
</DialogHeader>
<div className="space-y-4 py-4">
<div className="space-y-2">
<Label>Search User</Label>
<Label>{t("ui.common.search", "사용자 검색")}</Label>
<Input
placeholder="Search by email or name..."
placeholder={t("ui.admin.users.list.search_placeholder", "이메일 또는 이름으로 검색...")}
value={searchUser}
onChange={(e) => setSearchUser(e.target.value)}
/>
</div>
<div className="space-y-2">
<Label>Select User</Label>
<Label>{t("ui.common.select", "사용자 선택")}</Label>
<Select
value={selectedUserId}
onValueChange={setSelectedUserId}
>
<SelectTrigger>
<SelectValue placeholder="Choose a user" />
<SelectValue placeholder={t("ui.common.select_placeholder", "사용자를 선택하세요")} />
</SelectTrigger>
<SelectContent>
{userList?.items.map((user) => (
@@ -267,98 +274,108 @@ export function UserGroupDetailPage() {
variant="outline"
onClick={() => setIsAddMemberOpen(false)}
>
Cancel
{t("ui.common.cancel", "취소")}
</Button>
<Button
onClick={() => addMemberMutation.mutate(selectedUserId)}
disabled={!selectedUserId || addMemberMutation.isPending}
>
Add
{t("ui.common.add", "추가")}
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</CardHeader>
<CardContent>
<Table>
<TableHeader>
<TableRow>
<TableHead>User</TableHead>
<TableHead className="text-right">Action</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{!currentGroup.members || currentGroup.members.length === 0 ? (
<div className="rounded-md border border-border overflow-hidden">
<Table>
<TableHeader className="bg-muted/30">
<TableRow>
<TableCell
colSpan={2}
className="text-center py-4 text-muted-foreground"
>
No members in this group.
</TableCell>
<TableHead className="font-bold">{t("ui.admin.users.list.table.name_email", "사용자")}</TableHead>
<TableHead className="text-right font-bold">{t("ui.admin.groups.table.actions", "액션")}</TableHead>
</TableRow>
) : (
currentGroup.members.map((member) => (
<TableRow key={member.id}>
<TableCell>
<div>
<p className="font-medium">{member.name}</p>
<p className="text-xs text-muted-foreground">
{member.email}
</p>
</div>
</TableCell>
<TableCell className="text-right">
<Button
variant="ghost"
size="icon"
className="text-destructive"
onClick={() => removeMemberMutation.mutate(member.id)}
>
<Trash2 size={14} />
</Button>
</TableHeader>
<TableBody>
{!currentGroup.members || currentGroup.members.length === 0 ? (
<TableRow>
<TableCell
colSpan={2}
className="text-center py-8 text-muted-foreground"
>
{t("msg.admin.groups.members.empty", "구성원이 없습니다.")}
</TableCell>
</TableRow>
))
)}
</TableBody>
</Table>
) : (
currentGroup.members.map((member) => (
<TableRow key={member.id} className="hover:bg-muted/30 transition-colors">
<TableCell>
<div className="flex items-center gap-3">
<div className="h-8 w-8 rounded-full bg-primary/10 flex items-center justify-center text-primary font-bold text-xs">
{member.name.charAt(0)}
</div>
<div>
<p className="font-medium text-sm">{member.name}</p>
<p className="text-xs text-muted-foreground">
{member.email}
</p>
</div>
</div>
</TableCell>
<TableCell className="text-right">
<Button
variant="ghost"
size="icon"
className="text-destructive hover:bg-destructive/10"
onClick={() => {
if (confirm(t("msg.admin.groups.members.remove_confirm", { name: member.name }))) {
removeMemberMutation.mutate(member.id);
}
}}
>
<Trash2 size={14} />
</Button>
</TableCell>
</TableRow>
))
)}
</TableBody>
</Table>
</div>
</CardContent>
</Card>
{/* Roles/Permissions Management (Keto Based) */}
<Card>
<Card className="border-none shadow-sm bg-[var(--color-panel)]">
<CardHeader className="flex flex-row items-center justify-between">
<div>
<CardTitle>Permissions</CardTitle>
<CardTitle>{t("ui.admin.groups.detail.permissions_title", "권한 관리")}</CardTitle>
<CardDescription>
Tenant roles assigned to this group.
{t("ui.admin.groups.detail.permissions_subtitle", "이 조직이 다른 테넌트에 가지는 역할을 정의합니다.")}
</CardDescription>
</div>
<Dialog open={isAddRoleOpen} onOpenChange={setIsAddRoleOpen}>
<DialogTrigger asChild>
<Button size="sm" variant="outline">
<Shield size={16} className="mr-2" />
Assign Role
{t("ui.common.assign", "할당")}
</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Assign Tenant Role</DialogTitle>
<DialogTitle>{t("ui.admin.groups.detail.permissions_title", "테넌트 역할 할당")}</DialogTitle>
<DialogDescription>
Members of this group will inherit this role on the target
tenant.
{t("msg.admin.groups.roles.description", "이 조직의 구성원들이 대상 테넌트에서 상속받을 역할을 선택하세요.")}
</DialogDescription>
</DialogHeader>
<div className="space-y-4 py-4">
<div className="space-y-2">
<Label>Target Tenant</Label>
<Label>{t("ui.admin.users.detail.form.tenant", "대상 테넌트")}</Label>
<Select
value={selectedTargetTenantId}
onValueChange={setSelectedTargetTenantId}
>
<SelectTrigger>
<SelectValue placeholder="Select target tenant" />
<SelectValue placeholder={t("ui.admin.tenants.list.select_placeholder", "테넌트를 선택하세요")} />
</SelectTrigger>
<SelectContent>
{tenantList?.items.map((t) => (
@@ -370,7 +387,7 @@ export function UserGroupDetailPage() {
</Select>
</div>
<div className="space-y-2">
<Label>Role (Relation)</Label>
<Label>{t("ui.admin.users.detail.form.role", "역할 (Relation)")}</Label>
<Select
value={selectedRelation}
onValueChange={setSelectedRelation}
@@ -379,12 +396,12 @@ export function UserGroupDetailPage() {
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="view">View (Read-only)</SelectItem>
<SelectItem value="view">View ( )</SelectItem>
<SelectItem value="manage">
Manage (Read/Write)
Manage ( )
</SelectItem>
<SelectItem value="admins">
Admin (Full Control)
Admin ( )
</SelectItem>
</SelectContent>
</Select>
@@ -395,7 +412,7 @@ export function UserGroupDetailPage() {
variant="outline"
onClick={() => setIsAddRoleOpen(false)}
>
Cancel
{t("ui.common.cancel", "취소")}
</Button>
<Button
onClick={() => assignRoleMutation.mutate()}
@@ -403,70 +420,74 @@ export function UserGroupDetailPage() {
!selectedTargetTenantId || assignRoleMutation.isPending
}
>
Assign
{t("ui.common.assign", "할당")}
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</CardHeader>
<CardContent>
<Table>
<TableHeader>
<TableRow>
<TableHead>Target Tenant</TableHead>
<TableHead>Role</TableHead>
<TableHead className="text-right">Action</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{isRolesLoading ? (
<div className="rounded-md border border-border overflow-hidden">
<Table>
<TableHeader className="bg-muted/30">
<TableRow>
<TableCell colSpan={3} className="text-center">
Loading...
</TableCell>
<TableHead className="font-bold">{t("ui.admin.users.detail.form.tenant", "대상 테넌트")}</TableHead>
<TableHead className="font-bold">{t("ui.admin.users.detail.form.role", "역할")}</TableHead>
<TableHead className="text-right font-bold">{t("ui.admin.groups.table.actions", "액션")}</TableHead>
</TableRow>
) : !groupRoles || groupRoles.length === 0 ? (
<TableRow>
<TableCell
colSpan={3}
className="text-center py-4 text-muted-foreground"
>
No roles assigned.
</TableCell>
</TableRow>
) : (
groupRoles.map((role, idx) => (
<TableRow key={`${role.tenantId}-${role.relation}-${idx}`}>
<TableCell>
<div className="font-medium">
{role.tenantName || role.tenantId}
</div>
</TableCell>
<TableCell>
<Badge variant="outline" className="capitalize">
{role.relation}
</Badge>
</TableCell>
<TableCell className="text-right">
<Button
variant="ghost"
size="icon"
className="text-destructive"
onClick={() =>
removeRoleMutation.mutate({
targetTenantId: role.tenantId,
relation: role.relation,
})
}
>
<Trash2 size={14} />
</Button>
</TableHeader>
<TableBody>
{isRolesLoading ? (
<TableRow>
<TableCell colSpan={3} className="text-center py-8">
<div className="animate-spin rounded-full h-5 w-5 border-b-2 border-primary mx-auto"></div>
</TableCell>
</TableRow>
))
)}
</TableBody>
</Table>
) : !groupRoles || groupRoles.length === 0 ? (
<TableRow>
<TableCell
colSpan={3}
className="text-center py-8 text-muted-foreground"
>
{t("msg.admin.groups.roles.empty", "할당된 역할이 없습니다.")}
</TableCell>
</TableRow>
) : (
groupRoles.map((role, idx) => (
<TableRow key={`${role.tenantId}-${role.relation}-${idx}`} className="hover:bg-muted/30 transition-colors">
<TableCell>
<div className="font-medium text-sm">
{role.tenantName || role.tenantId}
</div>
</TableCell>
<TableCell>
<Badge variant="outline" className="capitalize font-normal">
{role.relation}
</Badge>
</TableCell>
<TableCell className="text-right">
<Button
variant="ghost"
size="icon"
className="text-destructive hover:bg-destructive/10"
onClick={() => {
if (confirm(t("msg.admin.groups.roles.remove_confirm"))) {
removeRoleMutation.mutate({
targetTenantId: role.tenantId,
relation: role.relation,
});
}
}}
>
<Trash2 size={14} />
</Button>
</TableCell>
</TableRow>
))
)}
</TableBody>
</Table>
</div>
</CardContent>
</Card>
</div>

View File

@@ -62,6 +62,8 @@ function UserCreatePage() {
role: "user",
companyCode: "",
department: "",
position: "",
jobTitle: "",
metadata: {},
},
});
@@ -366,6 +368,38 @@ function UserCreatePage() {
</div>
</div>
<div className="grid gap-4 md:grid-cols-2">
<div className="space-y-2">
<Label htmlFor="position">
{t("ui.admin.users.create.form.position", "직급")}
</Label>
<Input
id="position"
placeholder={t(
"ui.admin.users.create.form.position_placeholder",
"수석/책임/선임",
)}
{...register("position")}
/>
</div>
<div className="space-y-2">
<Label htmlFor="jobTitle">
{t("ui.admin.users.create.form.job_title", "직무")}
</Label>
<Input
id="jobTitle"
placeholder={t(
"ui.admin.users.create.form.job_title_placeholder",
"프론트엔드 개발",
)}
{...register("jobTitle")}
/>
</div>
</div>
{userSchema.length > 0 && (
<div className="border-t pt-4">
<h3 className="mb-4 text-sm font-medium text-muted-foreground">

View File

@@ -70,6 +70,8 @@ function UserDetailPage() {
status: "active",
companyCode: "",
department: "",
position: "",
jobTitle: "",
password: "",
metadata: {},
},
@@ -104,6 +106,8 @@ function UserDetailPage() {
status: user.status,
companyCode: user.companyCode || "",
department: user.department || "",
position: user.position || "",
jobTitle: user.jobTitle || "",
password: "",
metadata: user.metadata || {},
});
@@ -337,6 +341,38 @@ function UserDetailPage() {
</div>
</div>
<div className="grid gap-4 md:grid-cols-2">
<div className="space-y-2">
<Label htmlFor="position">
{t("ui.admin.users.detail.form.position", "직급")}
</Label>
<Input
id="position"
placeholder={t(
"ui.admin.users.detail.form.position_placeholder",
"수석/책임/선임",
)}
{...register("position")}
/>
</div>
<div className="space-y-2">
<Label htmlFor="jobTitle">
{t("ui.admin.users.detail.form.job_title", "직무")}
</Label>
<Input
id="jobTitle"
placeholder={t(
"ui.admin.users.detail.form.job_title_placeholder",
"프론트엔드 개발",
)}
{...register("jobTitle")}
/>
</div>
</div>
{userSchema.length > 0 && (
<div className="border-t pt-4">
<h3 className="mb-4 text-sm font-medium text-muted-foreground">

View File

@@ -199,6 +199,9 @@ function UserListPage() {
"TENANT / DEPT",
)}
</TableHead>
<TableHead>
{t("ui.admin.users.list.table.position_job", "POSITION / JOB")}
</TableHead>
<TableHead>
{t("ui.admin.users.list.table.created", "CREATED")}
</TableHead>
@@ -272,6 +275,14 @@ function UserListPage() {
</span>
</div>
</TableCell>
<TableCell>
<div className="flex flex-col text-sm">
<span className="font-medium">{user.position || "-"}</span>
<span className="text-xs text-muted-foreground">
{user.jobTitle || "-"}
</span>
</div>
</TableCell>
<TableCell className="text-sm text-muted-foreground">
{new Date(user.createdAt).toLocaleDateString()}
</TableCell>

View File

@@ -21,6 +21,7 @@ export type AuditLogListResponse = {
export type TenantSummary = {
id: string;
type: string; // PERSONAL, COMPANY, COMPANY_GROUP, USER_GROUP
name: string;
slug: string;
description: string;
@@ -33,6 +34,7 @@ export type TenantSummary = {
export type TenantCreateRequest = {
name: string;
type?: string;
slug?: string;
description?: string;
status?: string;
@@ -49,6 +51,7 @@ export type TenantListResponse = {
export type TenantUpdateRequest = {
name?: string;
type?: string;
slug?: string;
description?: string;
status?: string;
@@ -170,8 +173,10 @@ export type GroupMember = {
export type GroupSummary = {
id: string;
tenantId: string;
parentId?: string;
name: string;
description?: string;
unitType?: string;
members?: GroupMember[];
createdAt?: string;
updatedAt?: string;
@@ -179,19 +184,21 @@ export type GroupSummary = {
export type GroupCreateRequest = {
name: string;
parentId?: string;
description?: string;
unitType?: string;
};
export async function fetchGroups(tenantId: string) {
const { data } = await apiClient.get<GroupSummary[]>(
`/v1/admin/tenants/${tenantId}/user-groups`,
`/v1/admin/tenants/${tenantId}/organization`,
);
return data;
}
export async function fetchGroup(tenantId: string, groupId: string) {
const { data } = await apiClient.get<GroupSummary>(
`/v1/admin/tenants/${tenantId}/user-groups/${groupId}`,
`/v1/admin/tenants/${tenantId}/organization/${groupId}`,
);
return data;
}
@@ -201,7 +208,7 @@ export async function createGroup(
payload: GroupCreateRequest,
) {
const { data } = await apiClient.post<GroupSummary>(
`/v1/admin/tenants/${tenantId}/user-groups`,
`/v1/admin/tenants/${tenantId}/organization`,
payload,
);
return data;
@@ -209,7 +216,7 @@ export async function createGroup(
export async function deleteGroup(tenantId: string, groupId: string) {
await apiClient.delete(
`/v1/admin/tenants/${tenantId}/user-groups/${groupId}`,
`/v1/admin/tenants/${tenantId}/organization/${groupId}`,
);
}
@@ -219,7 +226,7 @@ export async function addGroupMember(
userId: string,
) {
await apiClient.post(
`/v1/admin/tenants/${tenantId}/user-groups/${groupId}/members`,
`/v1/admin/tenants/${tenantId}/organization/${groupId}/members`,
{ userId },
);
}
@@ -230,7 +237,7 @@ export async function removeGroupMember(
userId: string,
) {
await apiClient.delete(
`/v1/admin/tenants/${tenantId}/user-groups/${groupId}/members/${userId}`,
`/v1/admin/tenants/${tenantId}/organization/${groupId}/members/${userId}`,
);
}
@@ -242,7 +249,7 @@ export type GroupRole = {
export async function fetchGroupRoles(tenantId: string, groupId: string) {
const { data } = await apiClient.get<GroupRole[]>(
`/v1/admin/tenants/${tenantId}/user-groups/${groupId}/roles`,
`/v1/admin/tenants/${tenantId}/organization/${groupId}/roles`,
);
return data;
}
@@ -254,7 +261,7 @@ export async function assignGroupRole(
relation: string,
) {
await apiClient.post(
`/v1/admin/tenants/${tenantId}/user-groups/${groupId}/roles`,
`/v1/admin/tenants/${tenantId}/organization/${groupId}/roles`,
{ tenantId: targetTenantId, relation },
);
}
@@ -266,10 +273,25 @@ export async function removeGroupRole(
relation: string,
) {
await apiClient.delete(
`/v1/admin/tenants/${tenantId}/user-groups/${groupId}/roles/${targetTenantId}/${relation}`,
`/v1/admin/tenants/${tenantId}/organization/${groupId}/roles/${targetTenantId}/${relation}`,
);
}
export async function importOrgChart(tenantId: string, file: File) {
const formData = new FormData();
formData.append("file", file);
const { data } = await apiClient.post(
`/v1/admin/tenants/${tenantId}/organization/import`,
formData,
{
headers: {
"Content-Type": "multipart/form-data",
},
},
);
return data;
}
// API Key Management (M2M)
export type ApiKeyCreateRequest = {
name: string;
@@ -315,6 +337,8 @@ export type UserSummary = {
tenant?: TenantSummary;
metadata?: Record<string, unknown>;
department?: string;
position?: string;
jobTitle?: string;
createdAt: string;
updatedAt: string;
};
@@ -334,6 +358,8 @@ export type UserCreateRequest = {
role?: string;
companyCode?: string;
department?: string;
position?: string;
jobTitle?: string;
};
export type UserCreateResponse = UserSummary & {
@@ -348,6 +374,8 @@ export type UserUpdateRequest = {
status?: string;
companyCode?: string;
department?: string;
position?: string;
jobTitle?: string;
};
export async function fetchUsers(limit = 50, offset = 0, search?: string) {

View File

@@ -1338,6 +1338,6 @@ logout = "Logout"
overview = "Overview"
relying_parties = "Apps (RP)"
tenant_dashboard = "Tenant Dashboard"
user_groups = "User Groups"
user_groups = "Organization"
tenants = "Tenants"
users = "Users"

View File

@@ -5,13 +5,11 @@
affiliate = "가족사 임직원"
general = "일반 사용자"
[domain.company]
baron = "바론"
halla = "한라"
hanmac = "한맥"
jangheon = "장헌"
ptc = "PTC"
saman = "삼안"
[domain.tenant_type]
company = "COMPANY (일반 기업)"
company_group = "COMPANY_GROUP (그룹사/지주사)"
personal = "PERSONAL (개인 워크스페이스)"
user_group = "USER_GROUP (내부 부서/팀)"
[err]
@@ -90,13 +88,34 @@ count = "로드된 로그 {{count}}건"
[msg.admin.groups]
[msg.admin.groups.list]
subtitle = "이 테넌트에 정의된 사용자 그룹 목록입니다."
create_success = "조직 단위가 성공적으로 생성되었습니다."
create_error = "조직 단위 생성에 실패했습니다: {{error}}"
delete_confirm = "정말로 이 조직 단위를 삭제하시겠습니까?"
delete_success = "조직 단위가 삭제되었습니다."
import_success = "조직도가 성공적으로 임포트되었습니다."
import_error = "조직도 임포트에 실패했습니다: {{error}}"
loading = "조직 단위를 불러오는 중..."
subtitle = "이 테넌트에 정의된 조직 단위 목록입니다."
title = "조직 관리"
[msg.admin.groups.members]
count = "{{count}} 명"
empty = "멤버가 없습니다."
title = "[{{name}}] 멤버 관리"
[msg.admin.groups.members]
add_success = "구성원이 추가되었습니다."
empty = "구성원이 없습니다."
remove_confirm = "{{name}} 님을 이 조직에서 제외하시겠습니까?"
remove_success = "구성원이 제외되었습니다."
[msg.admin.groups.roles]
assign_success = "역할이 성공적으로 할당되었습니다."
description = "이 조직의 구성원들이 대상 테넌트에서 상속받을 역할을 선택하세요."
empty = "할당된 역할이 없습니다."
remove_confirm = "할당된 역할을 회수하시겠습니까?"
remove_success = "역할이 회수되었습니다."
[msg.admin.groups.prompt]
user_id = "추가할 사용자의 UUID를 입력하세요:"
@@ -123,11 +142,37 @@ tenant_title = "Tenant isolation"
description = "주요 운영 화면으로 바로 이동합니다."
[msg.admin.tenants]
approve_confirm = "이 테넌트를 승인하시겠습니까?"
approve_success = "테넌트가 승인되었습니다."
delete_confirm = "테넌트 \\\"{{name}}\\\"를 삭제할까요?"
delete_success = "테넌트가 삭제되었습니다."
empty = "아직 등록된 테넌트가 없습니다."
fetch_error = "테넌트 목록 조회에 실패했습니다."
missing_id = "테넌트 ID가 없습니다."
subtitle = "현재 등록된 테넌트를 확인하고 상태를 관리합니다."
[msg.admin.tenants.admins]
add_success = "관리자가 성공적으로 추가되었습니다."
empty = "등록된 관리자가 없습니다."
remove_confirm = "{{name}} 사용자의 관리자 권한을 회수할까요?"
remove_success = "관리자 권한이 회수되었습니다."
subtitle = "이 테넌트의 자원을 관리할 수 있는 권한을 가진 사용자들입니다."
title = "테넌트 관리자 설정"
[ui.admin.tenants.admins]
add_button = "관리자 추가"
already_admin = "이미 관리자"
dialog_description = "이름 또는 이메일로 사용자를 검색하여 관리 권한을 부여하세요."
dialog_no_results = "검색 결과가 없습니다."
dialog_search_hint = "검색어를 입력해 주세요."
dialog_search_placeholder = "사용자 검색 (최소 2자)..."
dialog_title = "새 관리자 추가"
remove_title = "관리자 권한 회수"
table_actions = "액션"
table_email = "이메일"
table_name = "이름"
title = "테넌트 관리자"
[msg.admin.tenants.create]
subtitle = "글로벌 운영 기준의 신규 테넌트를 등록합니다."
@@ -148,11 +193,11 @@ empty = "소속된 사용자가 없습니다."
count = "총 {{count}}개 테넌트"
[msg.admin.tenants.schema]
empty = "No custom fields defined. Click \\\"Add Field\\\" to begin."
missing_id = "Tenant ID missing"
subtitle = "Define custom attributes for users in this tenant."
update_error = "Failed to update schema"
update_success = "Schema updated successfully"
empty = "정의된 커스텀 필드가 없습니다. \\\"필드 추가\\\"를 눌러 시작하세요."
missing_id = "테넌트 ID가 없습니다."
subtitle = "이 테넌트 사용자를 위한 커스텀 속성을 정의합니다."
update_error = "스키마 업데이트에 실패했습니다."
update_success = "스키마가 성공적으로 업데이트되었습니다."
[msg.admin.tenants.sub]
empty = "하위 테넌트가 없습니다."
@@ -655,19 +700,38 @@ status = "STATUS"
time = "TIME"
[ui.admin.groups]
add_unit = "조직 추가"
import_csv = "CSV 임포트"
[ui.admin.groups.create]
title = "새 그룹 생성"
description = "부서나 팀과 같은 새로운 조직 단위를 추가합니다."
title = "새 조직 단위 생성"
[ui.admin.groups.detail]
breadcrumb_org = "조직 관리"
breadcrumb_tenant = "테넌트 상세"
breadcrumb_unit = "조직 단위"
members_title = "구성원 관리"
members_subtitle = "이 조직 단위에 소속된 사용자들을 관리합니다."
permissions_title = "권한 관리"
permissions_subtitle = "이 조직 단위가 다른 테넌트에 대해 가지는 역할을 관리합니다."
subtitle = "조직 단위의 구성원 및 권한을 관리합니다."
title = "조직 단위 상세"
[ui.admin.groups.form]
desc_label = "설명"
desc_placeholder = "그룹 용도 설명"
name_label = "그룹 이름"
desc_placeholder = "조직 단위 용도 설명"
name_label = "조직명"
name_placeholder = "예: 개발팀, 인사팀"
parent_label = "상위 조직"
parent_none = "없음 (최상위)"
submit = "생성하기"
unit_level_label = "조직 레벨"
unit_level_placeholder = "예: 본부, 실, 팀, 셀"
[ui.admin.groups.list]
title = "User Groups"
subtitle = "이 테넌트에 정의된 조직 단위(부서, 팀 등) 목록입니다."
title = "조직 관리"
[ui.admin.groups.members]
@@ -677,19 +741,21 @@ name = "이름"
remove = "제거"
[ui.admin.groups.table]
actions = "ACTIONS"
members = "MEMBERS"
name = "NAME"
actions = "액션"
created_at = "생성일"
level = "레벨"
members = "멤버"
name = "이름"
[ui.admin.header]
plane = "Admin Plane"
[ui.admin.overview]
kicker = "Global Overview"
title = "Tenant-independent control plane"
kicker = "글로벌 개요"
title = "테넌트 통합 관리 평면"
[ui.admin.overview.playbook]
title = "Admin playbook"
title = "운영 플레이북"
[ui.admin.overview.quick_links]
add_tenant = "테넌트 추가"
@@ -697,6 +763,12 @@ tenant_dashboard = "테넌트 대시보드"
title = "빠른 이동"
view_audit_logs = "감사 로그 보기"
[ui.admin.overview.summary]
audit_events_24h = "감사 이벤트 (24h)"
oidc_clients = "OIDC 클라이언트"
policy_gate = "정책 게이트"
total_tenants = "전체 테넌트"
[ui.admin.role]
rp_admin = "RP ADMIN"
super_admin = "SUPER ADMIN"
@@ -714,24 +786,44 @@ section = "Tenants"
[ui.admin.tenants.create]
title = "테넌트 추가"
[ui.admin.tenants.detail]
breadcrumb_list = "테넌트 목록"
header_subtitle = "테넌트 정보를 수정하거나 연동 설정을 관리합니다."
loading = "테넌트 정보를 불러오는 중..."
tab_admins = "관리자 설정"
tab_federation = "외부 연동"
tab_organization = "조직 관리"
tab_profile = "프로필"
tab_schema = "사용자 스키마"
title = "테넌트 상세"
[ui.admin.tenants.create.breadcrumb]
action = "Create"
section = "Tenants"
[ui.admin.tenants.create.form]
description = "Description"
domains_label = "Allowed Domains (Comma separated)"
description = "설명"
domains_label = "허용된 도메인 (콤마로 구분)"
domains_placeholder = "example.com, example.kr"
name = "Tenant name"
slug = "Slug"
name = "테넌트 이름"
slug = "슬러그 (Slug)"
slug_placeholder = "tenant-slug"
status = "Status"
status = "상태"
type = "테넌트 유형"
[ui.admin.tenants.create.memo]
title = "정책 메모"
[ui.admin.tenants.create.profile]
title = "Tenant Profile"
[ui.admin.tenants.profile]
allowed_domains = "허용된 도메인 (콤마로 구분)"
allowed_domains_help = "이 도메인을 가진 이메일로 가입한 사용자는 자동으로 이 테넌트에 배정됩니다."
description = "설명"
name = "테넌트 이름"
slug = "슬러그 (Slug)"
status = "상태"
subtitle = "슬러그 및 상태 변경은 즉시 적용됩니다."
title = "테넌트 프로필"
type = "테넌트 유형"
[ui.admin.tenants.members]
title = "Tenant Members ({{count}})"
@@ -742,23 +834,35 @@ name = "NAME"
role = "ROLE"
status = "STATUS"
[ui.admin.tenants.profile]
allowed_domains = "허용된 도메인 (콤마로 구분)"
allowed_domains_help = "이 도메인을 가진 이메일로 가입한 사용자는 자동으로 이 테넌트에 배정됩니다."
approve_button = "테넌트 승인"
description = "설명"
name = "테넌트 이름"
slug = "슬러그 (Slug)"
status = "상태"
subtitle = "슬러그 및 상태 변경은 즉시 적용됩니다."
title = "테넌트 프로필"
type = "테넌트 유형"
[ui.admin.tenants.registry]
title = "Tenant registry"
[ui.admin.tenants.schema]
add_field = "Add Field"
save = "Save Schema Changes"
title = "User Schema Extension"
add_field = "필드 추가"
save = "스키마 변경사항 저장"
title = "사용자 스키마 확장"
[ui.admin.tenants.schema.field]
key = "Field Key (ID)"
key_placeholder = "e.g. employee_id"
label = "Display Label"
label_placeholder = "e.g. 사번"
type = "Type"
type_boolean = "Boolean"
type_number = "Number"
type_text = "Text"
key = "필드 키 (ID)"
key_placeholder = "예: employee_id"
label = "표시 라벨"
label_placeholder = "예: 사번"
type = "유형"
type_boolean = "불리언 (Boolean)"
type_number = "숫자 (Number)"
type_text = "텍스트 (Text)"
[ui.admin.tenants.sub]
add = "하위 테넌트 추가"
@@ -790,8 +894,8 @@ title = "사용자 추가"
title = "계정 정보"
[ui.admin.users.create.breadcrumb]
new = "New"
section = "Users"
new = "신규"
section = "사용자 관리"
[ui.admin.users.create.custom_fields]
title = "테넌트 확장 정보 (Custom Fields)"
@@ -802,12 +906,16 @@ department = "부서"
department_placeholder = "개발팀"
email = "이메일"
email_placeholder = "user@example.com"
job_title = "직무"
job_title_placeholder = "프론트엔드 개발"
name = "이름"
name_placeholder = "홍길동"
password = "비밀번호"
password_placeholder = "********"
phone = "전화번호"
phone_placeholder = "010-1234-5678"
position = "직급"
position_placeholder = "수석/책임/선임"
role = "역할 (Role)"
tenant = "테넌트 (Tenant)"
tenant_global = "시스템 전역 (소속 없음)"
@@ -821,7 +929,7 @@ edit_title = "정보 수정"
title = "사용자 상세"
[ui.admin.users.detail.breadcrumb]
section = "Users"
section = "사용자 관리"
[ui.admin.users.detail.custom_fields]
title = "테넌트 확장 정보 (Custom Fields)"
@@ -829,10 +937,14 @@ title = "테넌트 확장 정보 (Custom Fields)"
[ui.admin.users.detail.form]
department = "부서"
department_placeholder = "개발팀"
job_title = "직무"
job_title_placeholder = "프론트엔드 개발"
name = "이름"
name_placeholder = "홍길동"
phone = "전화번호"
phone_placeholder = "010-1234-5678"
position = "직급"
position_placeholder = "수석/책임/선임"
role = "역할 (Role)"
status = "상태"
tenant = "테넌트 (Tenant)"
@@ -852,19 +964,20 @@ tenant_slug = "Slug: {{slug}}"
title = "사용자 관리"
[ui.admin.users.list.breadcrumb]
list = "List"
section = "Users"
list = "목록"
section = "사용자 관리"
[ui.admin.users.list.registry]
title = "User Registry"
title = "사용자 레지스트리"
[ui.admin.users.list.table]
actions = "ACTIONS"
created = "CREATED"
name_email = "NAME / EMAIL"
role = "ROLE"
status = "STATUS"
tenant_dept = "TENANT / DEPT"
actions = "액션"
created = "생성일"
name_email = "이름 / 이메일"
position_job = "직급 / 직무"
role = "역할"
status = "상태"
tenant_dept = "테넌트 / 부서"
[ui.common]
@@ -882,10 +995,10 @@ edit = "편집"
hyphen = "-"
na = "N/A"
never = "Never"
next = "Next"
page_of = "Page {{page}} of {{total}}"
next = "다음"
page_of = "{{page}} / {{total}} 페이지"
prev = "이전"
previous = "Previous"
previous = "이전"
qr = "QR"
read_only = "읽기 전용"
refresh = "새로고침"
@@ -1330,6 +1443,18 @@ verify = "본인인증"
[ui.userfront.signup.success]
action = "로그인하기"
[msg.admin]
header_subtitle = "테넌트 격리 및 최소 권한 원칙 기본 적용"
idp_env_prod = "IDP 환경: 운영(Prod)"
logout_confirm = "로그아웃 하시겠습니까?"
scope_admin = "/admin 네임스페이스 한정"
session_ttl = "세션 유효기간: 15분"
tenant_headers = "테넌트 식별 헤더 적용"
[ui.admin]
brand = "Baron 로그인"
title = "운영 도구"
[ui.admin.nav]
api_keys = "API 키"
audit_logs = "감사 로그"
@@ -1338,6 +1463,6 @@ logout = "로그아웃"
overview = "개요"
relying_parties = "애플리케이션(RP)"
tenant_dashboard = "테넌트 대시보드"
user_groups = "유저 그룹"
user_groups = "조직 관리"
tenants = "테넌트"
users = "사용자"