From b4883bc9ebdfa868d96132d350540defdb64d094 Mon Sep 17 00:00:00 2001 From: kyy Date: Fri, 5 Jun 2026 14:32:49 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EB=B0=8F=20=EB=A6=AC=EB=8B=A4=EC=9D=B4=EB=A0=89=ED=8A=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tenants/routes/TenantListPage.tsx | 34 +++++++++++++++++++ docker-compose.yaml | 8 +++++ 2 files changed, 42 insertions(+) diff --git a/adminfront/src/features/tenants/routes/TenantListPage.tsx b/adminfront/src/features/tenants/routes/TenantListPage.tsx index 024fef08..0fbfec4b 100644 --- a/adminfront/src/features/tenants/routes/TenantListPage.tsx +++ b/adminfront/src/features/tenants/routes/TenantListPage.tsx @@ -69,6 +69,7 @@ import { SelectTrigger, SelectValue, } from "../../../components/ui/select"; +import { Switch } from "../../../components/ui/switch"; import { Table, TableBody, @@ -88,6 +89,7 @@ import { type TenantImportDetail, type TenantImportResult, type TenantSummary, + type UserProfileResponse, updateTenant, } from "../../../lib/adminApi"; import { t } from "../../../lib/i18n"; @@ -414,6 +416,27 @@ function TenantListPage() { }, }); + const statusMutation = useMutation({ + mutationFn: ({ + tenantId, + status, + }: { + tenantId: string; + status: string; + }) => updateTenant(tenantId, { status }), + onSuccess: () => { + query.refetch(); + toast.success( + t("msg.admin.tenants.bulk.update_success", "선택한 테넌트들의 상태가 수정되었습니다."), + ); + }, + onError: () => { + toast.error( + t("msg.admin.tenants.bulk.update_error", "테넌트 일괄 상태 변경에 실패했습니다."), + ); + }, + }); + const handleApplyBulkStatus = () => { if (selectedIds.length === 0 || !selectedBulkStatus) return; bulkUpdateStatusMutation.mutate({ @@ -965,6 +988,8 @@ function TenantListPage() { onSelectAll={handleSelectAll} search={search} deletableTenants={deletableTenants} + statusMutation={statusMutation} + profile={profile} sortConfig={sortConfig} requestSort={requestSort} getSortIcon={getSortIcon} @@ -1541,6 +1566,13 @@ const TenantHierarchyView: React.FC<{ onSelectAll: (checked: boolean) => void; search: string; deletableTenants: TenantSummary[]; + statusMutation: UseMutationResult< + TenantSummary, + Error, + { tenantId: string; status: string }, + unknown + >; + profile: UserProfileResponse | undefined; sortConfig: SortConfig | null; requestSort: (key: TenantSortKey) => void; getSortIcon: (key: TenantSortKey) => React.ReactNode; @@ -1557,6 +1589,8 @@ const TenantHierarchyView: React.FC<{ onSelectAll, search, deletableTenants, + statusMutation, + profile, sortConfig, requestSort, getSortIcon, diff --git a/docker-compose.yaml b/docker-compose.yaml index 889ac824..71ca0f85 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -55,6 +55,10 @@ services: build: context: . dockerfile: ./adminfront/Dockerfile + args: + VITE_ADMIN_PUBLIC_URL: ${ADMINFRONT_URL} + VITE_OIDC_AUTHORITY: ${VITE_OIDC_AUTHORITY} + VITE_OIDC_CLIENT_ID: adminfront container_name: baron_adminfront env_file: - .env @@ -80,6 +84,10 @@ services: build: context: . dockerfile: ./devfront/Dockerfile + args: + VITE_DEVFRONT_PUBLIC_URL: ${DEVFRONT_URL} + VITE_OIDC_AUTHORITY: ${VITE_OIDC_AUTHORITY} + VITE_OIDC_CLIENT_ID: devfront container_name: baron_devfront env_file: - .env