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