From 98dd924e9ff3892cce1b83cd32bd49f759ded27e Mon Sep 17 00:00:00 2001 From: kyy Date: Mon, 15 Jun 2026 13:37:08 +0900 Subject: [PATCH] =?UTF-8?q?=ED=97=88=EC=9A=A9=20=ED=85=8C=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=ED=85=8C=EC=9D=B4=EB=B8=94=EB=A1=9C=20=EC=A0=84?= =?UTF-8?q?=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../features/clients/ClientGeneralPage.tsx | 261 ++++++++++++------ .../clients/components/TenantAccessPicker.tsx | 2 +- 2 files changed, 183 insertions(+), 80 deletions(-) diff --git a/devfront/src/features/clients/ClientGeneralPage.tsx b/devfront/src/features/clients/ClientGeneralPage.tsx index 7885825f..c68afeec 100644 --- a/devfront/src/features/clients/ClientGeneralPage.tsx +++ b/devfront/src/features/clients/ClientGeneralPage.tsx @@ -26,9 +26,18 @@ import { CardHeader, CardTitle, } from "../../components/ui/card"; +import { CopyButton } from "../../components/ui/copy-button"; import { Input } from "../../components/ui/input"; import { Label } from "../../components/ui/label"; import { Switch } from "../../components/ui/switch"; +import { + Table, + TableBody, + TableCell, + TableHead, + TableHeader, + TableRow, +} from "../../components/ui/table"; import { Textarea } from "../../components/ui/textarea"; import { toast } from "../../components/ui/use-toast"; import type { @@ -55,7 +64,6 @@ import { cn } from "../../lib/utils"; import { fetchMe, type UserProfile } from "../auth/authApi"; import { useDeveloperAccessGate } from "../developer-access/developerAccessGate"; import { ClientDetailTabs } from "./ClientDetailTabs"; -import { AllowedTenantBadge } from "./components/AllowedTenantBadge"; import { TenantAccessPicker } from "./components/TenantAccessPicker"; import { claimDateTimeValueToInputString, @@ -2298,12 +2306,20 @@ function ClientGeneralPage() { "테넌트 접근 제한", )} - - {t( - "ui.dev.clients.general.tenant_access.subtitle", - "허용된 테넌트만 이 RP에 접근할 수 있도록 제한합니다.", - )} - +
+

+ {t( + "ui.dev.clients.general.tenant_access.subtitle", + "허용된 테넌트만 이 RP에 접근할 수 있도록 제한합니다.", + )} +

+

+ {t( + "ui.dev.clients.general.tenant_access.hint", + "제한을 켜면 tenant 스코프가 자동으로 포함되며, 허용 테넌트를 하나 이상 선택해야 합니다.", + )} +

+
@@ -2334,81 +2350,168 @@ function ClientGeneralPage() {
- -

- {t( - "ui.dev.clients.general.tenant_access.hint", - "제한을 켜면 tenant 스코프가 자동으로 포함되며, 허용 테넌트를 하나 이상 선택해야 합니다.", - )} -

+ + {tenantAccessRestricted ? ( +
+
+ + + handleSelectAllowedTenant(selection.id) + } + /> +
-
-
- - - handleSelectAllowedTenant(selection.id) - } - /> -
- -
- -
- {tenantAccessRestricted && allowedTenantIds.length > 0 ? ( -
- {selectedAllowedTenants.map((tenant) => ( - toggleAllowedTenant(tenant.id)} - disabled={isGeneralSettingsReadOnly} - /> - ))} - {allowedTenantIds - .filter( - (tenantId) => - !selectedAllowedTenants.some( - (tenant) => tenant.id === tenantId, - ), - ) - .map((tenantId) => ( - toggleAllowedTenant(tenantId)} - disabled={isGeneralSettingsReadOnly} - /> - ))} -
- ) : ( -
- {tenantAccessRestricted - ? t( - "ui.dev.clients.general.tenant_access.selected_empty", - "아직 선택된 테넌트가 없습니다.", - ) - : t( - "ui.dev.clients.general.tenant_access.disabled", - "제한 없음", - )} -
- )} +
+ +
+ {allowedTenantIds.length > 0 ? ( +
+ + + + + {t( + "ui.dev.clients.general.tenant_access.table.name", + "테넌트명", + )} + + + {t( + "ui.dev.clients.general.tenant_access.table.slug", + "슬러그", + )} + + + {t( + "ui.dev.clients.general.tenant_access.table.id", + "테넌트 ID", + )} + + + {t( + "ui.dev.clients.general.tenant_access.table.actions", + "작업", + )} + + + + + {selectedAllowedTenants.map((tenant) => ( + + + {tenant.name} + + + {tenant.slug || "-"} + + + {tenant.id} + + +
+ + +
+
+
+ ))} + {allowedTenantIds + .filter( + (tenantId) => + !selectedAllowedTenants.some( + (tenant) => tenant.id === tenantId, + ), + ) + .map((tenantId) => ( + + + {tenantId} + + + - + + + {tenantId} + + +
+ + +
+
+
+ ))} +
+
+
+ ) : ( +
+ {t( + "ui.dev.clients.general.tenant_access.selected_empty", + "아직 선택된 테넌트가 없습니다.", + )} +
+ )} +
-
+ ) : null} diff --git a/devfront/src/features/clients/components/TenantAccessPicker.tsx b/devfront/src/features/clients/components/TenantAccessPicker.tsx index f787eed5..259bc938 100644 --- a/devfront/src/features/clients/components/TenantAccessPicker.tsx +++ b/devfront/src/features/clients/components/TenantAccessPicker.tsx @@ -133,7 +133,7 @@ export function TenantAccessPicker({ {selectedCount > 0 ? t( "msg.dev.clients.general.tenant_access.picker_hint_with_count", - "선택기를 열어 허용 테넌트를 추가하세요. 현재 {{count}}개가 선택되어 있습니다.", + "현재 {{count}}개가 선택되어 있습니다.", { count: selectedCount }, ) : t(