forked from baron/baron-sso
누락된 키 추가: 테넌트 수정 화면에 새롭게 추가한 '상위 테넌트' 관련 UI 키 2종을 로컬 설정 파일에 반영했습니다
This commit is contained in:
@@ -79,9 +79,8 @@ function UserCreatePage() {
|
||||
|
||||
// Lock company for tenant_admin
|
||||
React.useEffect(() => {
|
||||
const p = profile as any;
|
||||
if (p?.role === "tenant_admin" && p.tenantSlug) {
|
||||
setValue("tenantSlug", p.tenantSlug);
|
||||
if (profile?.role === "tenant_admin" && profile.tenantSlug) {
|
||||
setValue("tenantSlug", profile.tenantSlug);
|
||||
}
|
||||
}, [profile, setValue]);
|
||||
|
||||
@@ -362,7 +361,7 @@ function UserCreatePage() {
|
||||
id="tenantSlug"
|
||||
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"
|
||||
{...register("tenantSlug")}
|
||||
disabled={(profile as any)?.role === "tenant_admin"}
|
||||
disabled={profile?.role === "tenant_admin"}
|
||||
>
|
||||
<option value="">
|
||||
{t(
|
||||
|
||||
@@ -147,9 +147,21 @@ function TenantProfileCard({
|
||||
: false,
|
||||
})}
|
||||
/>
|
||||
{errors.metadata?.[tenant.id]?.[field.key] && (
|
||||
{(
|
||||
errors.metadata as unknown as Record<
|
||||
string,
|
||||
Record<string, { message?: string }>
|
||||
>
|
||||
)?.[tenant.id]?.[field.key] && (
|
||||
<p className="text-[10px] text-destructive">
|
||||
{(errors.metadata as any)?.[tenant.id]?.[field.key]?.message}
|
||||
{
|
||||
(
|
||||
errors.metadata as unknown as Record<
|
||||
string,
|
||||
Record<string, { message?: string }>
|
||||
>
|
||||
)?.[tenant.id]?.[field.key]?.message
|
||||
}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
@@ -248,7 +260,10 @@ function UserDetailPage() {
|
||||
position: user.position || "",
|
||||
jobTitle: user.jobTitle || "",
|
||||
password: "",
|
||||
metadata: (user.metadata || {}) as any,
|
||||
metadata: (user.metadata || {}) as unknown as Record<
|
||||
string,
|
||||
Record<string, unknown>
|
||||
>,
|
||||
});
|
||||
}
|
||||
}, [user, reset]);
|
||||
|
||||
@@ -140,7 +140,7 @@ export function UserBulkMoveGroupModal({
|
||||
userIds,
|
||||
tenantSlug: selectedTenantSlug,
|
||||
department: selectedGroupName, // can be empty for "No Department"
|
||||
} as any);
|
||||
});
|
||||
};
|
||||
|
||||
const filteredGroups = React.useMemo(() => {
|
||||
|
||||
@@ -22,7 +22,7 @@ user2@test.com,Kim Cheol Su,,admin,baron,IT,E002`;
|
||||
},
|
||||
});
|
||||
expect(result[1].email).toBe("user2@test.com");
|
||||
expect((result[1] as any).metadata.emp_id).toBe("E002");
|
||||
expect(result[1].metadata.emp_id).toBe("E002");
|
||||
});
|
||||
|
||||
it("should return empty array for empty input", () => {
|
||||
|
||||
Reference in New Issue
Block a user