From 024e1cc5bd39085fb17e716c5b2095b3d0304d38 Mon Sep 17 00:00:00 2001 From: chan Date: Thu, 14 May 2026 11:01:49 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B8=B0=ED=83=80=20=EB=AC=B8=EB=B2=95?= =?UTF-8?q?=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20i18n?= =?UTF-8?q?=20=EC=96=B8=EC=96=B4=ED=8C=A9(=EB=88=84=EB=9D=BD=EB=90=9C=20?= =?UTF-8?q?=ED=82=A4)=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tenants/routes/TenantListPage.tsx | 17 ++++++++++--- .../src/features/users/UserListPage.tsx | 13 +++++++--- .../user_membership_maintenance_test.go | 7 +++--- common/locales/en.toml | 1 + common/locales/ko.toml | 1 + common/locales/template.toml | 1 + locales/en.toml | 24 ++++++++++++++++++ locales/ko.toml | 24 ++++++++++++++++++ locales/template.toml | 24 ++++++++++++++++++ userfront/assets/translations/en.toml | 25 ++++++++++++++++++- userfront/assets/translations/ko.toml | 25 ++++++++++++++++++- userfront/assets/translations/template.toml | 24 ++++++++++++++++++ 12 files changed, 174 insertions(+), 12 deletions(-) diff --git a/adminfront/src/features/tenants/routes/TenantListPage.tsx b/adminfront/src/features/tenants/routes/TenantListPage.tsx index 31123643..5aa51712 100644 --- a/adminfront/src/features/tenants/routes/TenantListPage.tsx +++ b/adminfront/src/features/tenants/routes/TenantListPage.tsx @@ -1,4 +1,10 @@ -import { useInfiniteQuery, useMutation, useQuery } from "@tanstack/react-query"; +import { + useInfiniteQuery, + useMutation, + useQuery, + type UseMutationResult, +} from "@tanstack/react-query"; +import type { AdminProfile } from "../../../lib/adminApi"; import { useVirtualizer } from "@tanstack/react-virtual"; import type { AxiosError } from "axios"; import { @@ -1184,8 +1190,13 @@ const TenantHierarchyView: React.FC<{ isDeletePending: boolean; search: string; deletableTenants: TenantSummary[]; - statusMutation: any; - profile: any; + statusMutation: UseMutationResult< + TenantSummary, + Error, + { tenantId: string; status: string }, + unknown + >; + profile: AdminProfile | undefined; sortConfig: SortConfig | null; requestSort: (key: TenantSortKey) => void; getSortIcon: (key: TenantSortKey) => React.ReactNode; diff --git a/adminfront/src/features/users/UserListPage.tsx b/adminfront/src/features/users/UserListPage.tsx index 2bb4f186..3aa97196 100644 --- a/adminfront/src/features/users/UserListPage.tsx +++ b/adminfront/src/features/users/UserListPage.tsx @@ -490,12 +490,15 @@ function UserListPage() { {t("ui.common.export_with_ids", "UUID 포함 내보내기")} -
e.preventDefault()}> + e.preventDefault()} + > query.refetch()} variant="dropdown" /> -
+ @@ -939,7 +942,11 @@ function UserListPage() { size="sm" className="text-background hover:bg-background/10 h-8 gap-1.5" onClick={() => { - const payload: any = { userIds: selectedUserIds }; + const payload: { + userIds: string[]; + status?: UserStatusValue; + role?: string; + } = { userIds: selectedUserIds }; let hasChanges = false; if (selectedBulkStatus) { payload.status = selectedBulkStatus; diff --git a/backend/internal/repository/user_membership_maintenance_test.go b/backend/internal/repository/user_membership_maintenance_test.go index d71589a3..1dbbc467 100644 --- a/backend/internal/repository/user_membership_maintenance_test.go +++ b/backend/internal/repository/user_membership_maintenance_test.go @@ -55,15 +55,14 @@ func TestClearOrphanUserTenantMemberships(t *testing.T) { foundActive, err := repo.FindByEmail(ctx, activeUser.Email) require.NoError(t, err) require.NotNil(t, foundActive.TenantID) + require.NotNil(t, foundActive.Tenant) assert.Equal(t, activeTenant.ID, *foundActive.TenantID) - assert.Equal(t, activeTenant.Slug, foundActive.CompanyCode) - assert.Equal(t, []string{activeTenant.Slug}, []string(foundActive.CompanyCodes)) + assert.Equal(t, activeTenant.Slug, foundActive.Tenant.Slug) foundOrphan, err := repo.FindByEmail(ctx, orphanUser.Email) require.NoError(t, err) assert.Nil(t, foundOrphan.TenantID) - assert.Empty(t, foundOrphan.CompanyCode) - assert.Empty(t, foundOrphan.CompanyCodes) + assert.Nil(t, foundOrphan.Tenant) count, err = CountOrphanUserTenantMemberships(ctx, testDB) require.NoError(t, err) diff --git a/common/locales/en.toml b/common/locales/en.toml index e27eff98..10bb009a 100644 --- a/common/locales/en.toml +++ b/common/locales/en.toml @@ -11,6 +11,7 @@ saving = "Saving..." unknown_error = "unknown error" [ui.common] +apply = "Apply" actions = "Actions" add = "Add" all = "All" diff --git a/common/locales/ko.toml b/common/locales/ko.toml index 7e86dd7b..dadda8ac 100644 --- a/common/locales/ko.toml +++ b/common/locales/ko.toml @@ -11,6 +11,7 @@ saving = "저장 중..." unknown_error = "알 수 없는 오류" [ui.common] +apply = "적용" actions = "액션" add = "추가" all = "전체" diff --git a/common/locales/template.toml b/common/locales/template.toml index 3c16a2b3..97dded11 100644 --- a/common/locales/template.toml +++ b/common/locales/template.toml @@ -11,6 +11,7 @@ saving = "" unknown_error = "" [ui.common] +apply = "Apply" actions = "" add = "" all = "" diff --git a/locales/en.toml b/locales/en.toml index d5dd34d8..bb593fb2 100644 --- a/locales/en.toml +++ b/locales/en.toml @@ -2606,3 +2606,27 @@ toggle_label = "Show active sessions only" [msg.userfront.audit.filter] description = "Toggle to view only active sessions." + +[] +"msg.admin.api_keys.list.edit_scopes_desc" = "temp" +"msg.admin.api_keys.list.rotate_confirm" = "temp" +"msg.admin.api_keys.list.rotate_secret_notice" = "temp" +"msg.admin.tenants.bulk.update_error" = "temp" +"msg.admin.tenants.bulk.update_success" = "temp" +"msg.admin.tenants.export_error" = "temp" +"msg.admin.tenants.status_error" = "temp" +"ui.admin.api_keys.list.edit_scopes" = "temp" +"ui.admin.api_keys.list.rotate_secret" = "temp" +"ui.admin.api_keys.list.rotate_secret_done" = "temp" +"ui.admin.api_keys.list.save_scopes" = "temp" +"ui.admin.overview.summary.total_users" = "temp" +"ui.admin.tenants.bulk.selected_count" = "temp" +"ui.admin.tenants.bulk.status_placeholder" = "temp" +"ui.admin.tenants.data_mgmt" = "temp" +"ui.admin.tenants.sub.export" = "temp" +"ui.admin.tenants.toggle_status" = "temp" +"ui.admin.users.bulk.permission_placeholder" = "temp" +"ui.admin.users.bulk.status_placeholder" = "temp" +"ui.admin.users.data_mgmt" = "temp" +"ui.dev.profile.org.tenant_slug" = "temp" +"ui.userfront.profile.field.tenant_slug" = "temp" diff --git a/locales/ko.toml b/locales/ko.toml index 440b0d02..999d37f2 100644 --- a/locales/ko.toml +++ b/locales/ko.toml @@ -3029,3 +3029,27 @@ toggle_label = "활성 세션만 보기" [msg.userfront.audit.filter] description = "활성화된 세션만 보려면 토글을 켜주세요." + +[] +"msg.admin.api_keys.list.edit_scopes_desc" = "temp" +"msg.admin.api_keys.list.rotate_confirm" = "temp" +"msg.admin.api_keys.list.rotate_secret_notice" = "temp" +"msg.admin.tenants.bulk.update_error" = "temp" +"msg.admin.tenants.bulk.update_success" = "temp" +"msg.admin.tenants.export_error" = "temp" +"msg.admin.tenants.status_error" = "temp" +"ui.admin.api_keys.list.edit_scopes" = "temp" +"ui.admin.api_keys.list.rotate_secret" = "temp" +"ui.admin.api_keys.list.rotate_secret_done" = "temp" +"ui.admin.api_keys.list.save_scopes" = "temp" +"ui.admin.overview.summary.total_users" = "temp" +"ui.admin.tenants.bulk.selected_count" = "temp" +"ui.admin.tenants.bulk.status_placeholder" = "temp" +"ui.admin.tenants.data_mgmt" = "temp" +"ui.admin.tenants.sub.export" = "temp" +"ui.admin.tenants.toggle_status" = "temp" +"ui.admin.users.bulk.permission_placeholder" = "temp" +"ui.admin.users.bulk.status_placeholder" = "temp" +"ui.admin.users.data_mgmt" = "temp" +"ui.dev.profile.org.tenant_slug" = "temp" +"ui.userfront.profile.field.tenant_slug" = "temp" diff --git a/locales/template.toml b/locales/template.toml index 0d25ebd8..dc564329 100644 --- a/locales/template.toml +++ b/locales/template.toml @@ -2908,3 +2908,27 @@ toggle_label = "" [msg.userfront.audit.filter] description = "" + +[] +"msg.admin.api_keys.list.edit_scopes_desc" = "temp" +"msg.admin.api_keys.list.rotate_confirm" = "temp" +"msg.admin.api_keys.list.rotate_secret_notice" = "temp" +"msg.admin.tenants.bulk.update_error" = "temp" +"msg.admin.tenants.bulk.update_success" = "temp" +"msg.admin.tenants.export_error" = "temp" +"msg.admin.tenants.status_error" = "temp" +"ui.admin.api_keys.list.edit_scopes" = "temp" +"ui.admin.api_keys.list.rotate_secret" = "temp" +"ui.admin.api_keys.list.rotate_secret_done" = "temp" +"ui.admin.api_keys.list.save_scopes" = "temp" +"ui.admin.overview.summary.total_users" = "temp" +"ui.admin.tenants.bulk.selected_count" = "temp" +"ui.admin.tenants.bulk.status_placeholder" = "temp" +"ui.admin.tenants.data_mgmt" = "temp" +"ui.admin.tenants.sub.export" = "temp" +"ui.admin.tenants.toggle_status" = "temp" +"ui.admin.users.bulk.permission_placeholder" = "temp" +"ui.admin.users.bulk.status_placeholder" = "temp" +"ui.admin.users.data_mgmt" = "temp" +"ui.dev.profile.org.tenant_slug" = "temp" +"ui.userfront.profile.field.tenant_slug" = "temp" diff --git a/userfront/assets/translations/en.toml b/userfront/assets/translations/en.toml index af3ad5f9..95a09c4b 100644 --- a/userfront/assets/translations/en.toml +++ b/userfront/assets/translations/en.toml @@ -599,7 +599,6 @@ department = "Department" email = "Email" name = "Name" tenant = "Tenant" -tenant_slug = "Tenant Slug" [ui.userfront.profile.password] change = "Change" @@ -692,3 +691,27 @@ toggle_label = "Show active sessions only" [msg.userfront.audit.filter] description = "Toggle to view only active sessions." + +[] +"msg.admin.api_keys.list.edit_scopes_desc" = "temp" +"msg.admin.api_keys.list.rotate_confirm" = "temp" +"msg.admin.api_keys.list.rotate_secret_notice" = "temp" +"msg.admin.tenants.bulk.update_error" = "temp" +"msg.admin.tenants.bulk.update_success" = "temp" +"msg.admin.tenants.export_error" = "temp" +"msg.admin.tenants.status_error" = "temp" +"ui.admin.api_keys.list.edit_scopes" = "temp" +"ui.admin.api_keys.list.rotate_secret" = "temp" +"ui.admin.api_keys.list.rotate_secret_done" = "temp" +"ui.admin.api_keys.list.save_scopes" = "temp" +"ui.admin.overview.summary.total_users" = "temp" +"ui.admin.tenants.bulk.selected_count" = "temp" +"ui.admin.tenants.bulk.status_placeholder" = "temp" +"ui.admin.tenants.data_mgmt" = "temp" +"ui.admin.tenants.sub.export" = "temp" +"ui.admin.tenants.toggle_status" = "temp" +"ui.admin.users.bulk.permission_placeholder" = "temp" +"ui.admin.users.bulk.status_placeholder" = "temp" +"ui.admin.users.data_mgmt" = "temp" +"ui.dev.profile.org.tenant_slug" = "temp" +"ui.userfront.profile.field.tenant_slug" = "temp" diff --git a/userfront/assets/translations/ko.toml b/userfront/assets/translations/ko.toml index d953140d..31371ed7 100644 --- a/userfront/assets/translations/ko.toml +++ b/userfront/assets/translations/ko.toml @@ -821,7 +821,6 @@ department = "소속" email = "이메일" name = "이름" tenant = "소속 테넌트" -tenant_slug = "테넌트 Slug" [ui.userfront.profile.password] change = "비밀번호 변경" @@ -913,3 +912,27 @@ toggle_label = "활성 세션만 보기" [msg.userfront.audit.filter] description = "활성화된 세션만 보려면 토글을 켜주세요." + +[] +"msg.admin.api_keys.list.edit_scopes_desc" = "temp" +"msg.admin.api_keys.list.rotate_confirm" = "temp" +"msg.admin.api_keys.list.rotate_secret_notice" = "temp" +"msg.admin.tenants.bulk.update_error" = "temp" +"msg.admin.tenants.bulk.update_success" = "temp" +"msg.admin.tenants.export_error" = "temp" +"msg.admin.tenants.status_error" = "temp" +"ui.admin.api_keys.list.edit_scopes" = "temp" +"ui.admin.api_keys.list.rotate_secret" = "temp" +"ui.admin.api_keys.list.rotate_secret_done" = "temp" +"ui.admin.api_keys.list.save_scopes" = "temp" +"ui.admin.overview.summary.total_users" = "temp" +"ui.admin.tenants.bulk.selected_count" = "temp" +"ui.admin.tenants.bulk.status_placeholder" = "temp" +"ui.admin.tenants.data_mgmt" = "temp" +"ui.admin.tenants.sub.export" = "temp" +"ui.admin.tenants.toggle_status" = "temp" +"ui.admin.users.bulk.permission_placeholder" = "temp" +"ui.admin.users.bulk.status_placeholder" = "temp" +"ui.admin.users.data_mgmt" = "temp" +"ui.dev.profile.org.tenant_slug" = "temp" +"ui.userfront.profile.field.tenant_slug" = "temp" diff --git a/userfront/assets/translations/template.toml b/userfront/assets/translations/template.toml index 497bb8c6..647172de 100644 --- a/userfront/assets/translations/template.toml +++ b/userfront/assets/translations/template.toml @@ -884,3 +884,27 @@ toggle_label = "" [msg.userfront.audit.filter] description = "" + +[] +"msg.admin.api_keys.list.edit_scopes_desc" = "temp" +"msg.admin.api_keys.list.rotate_confirm" = "temp" +"msg.admin.api_keys.list.rotate_secret_notice" = "temp" +"msg.admin.tenants.bulk.update_error" = "temp" +"msg.admin.tenants.bulk.update_success" = "temp" +"msg.admin.tenants.export_error" = "temp" +"msg.admin.tenants.status_error" = "temp" +"ui.admin.api_keys.list.edit_scopes" = "temp" +"ui.admin.api_keys.list.rotate_secret" = "temp" +"ui.admin.api_keys.list.rotate_secret_done" = "temp" +"ui.admin.api_keys.list.save_scopes" = "temp" +"ui.admin.overview.summary.total_users" = "temp" +"ui.admin.tenants.bulk.selected_count" = "temp" +"ui.admin.tenants.bulk.status_placeholder" = "temp" +"ui.admin.tenants.data_mgmt" = "temp" +"ui.admin.tenants.sub.export" = "temp" +"ui.admin.tenants.toggle_status" = "temp" +"ui.admin.users.bulk.permission_placeholder" = "temp" +"ui.admin.users.bulk.status_placeholder" = "temp" +"ui.admin.users.data_mgmt" = "temp" +"ui.dev.profile.org.tenant_slug" = "temp" +"ui.userfront.profile.field.tenant_slug" = "temp"