1
0
forked from baron/baron-sso

refactor(adminfront): rename legacy companyCode to tenantSlug across frontend (#426)

This commit is contained in:
2026-03-23 16:59:05 +09:00
parent b2f96b216d
commit b0e18cc724
12 changed files with 48 additions and 48 deletions

View File

@@ -88,8 +88,8 @@ function UserListPage() {
// Lock company for tenant_admin
React.useEffect(() => {
if (profile?.role === "tenant_admin" && profile.companyCode) {
setSelectedCompany(profile.companyCode);
if (profile?.role === "tenant_admin" && profile.tenantSlug) {
setSelectedCompany(profile.tenantSlug);
}
}, [profile]);
@@ -134,7 +134,7 @@ function UserListPage() {
const query = useQuery({
queryKey: [
"users",
{ limit, offset, search, companyCode: selectedCompany },
{ limit, offset, search, tenantSlug: selectedCompany },
],
queryFn: () => fetchUsers(limit, offset, search, selectedCompany),
placeholderData: (previousData) => previousData,
@@ -531,7 +531,7 @@ function UserListPage() {
<TableCell>
<div className="flex flex-col text-sm">
<span className="font-medium text-blue-600">
{user.tenant?.name || user.companyCode || "-"}
{user.tenant?.name || user.tenantSlug || "-"}
</span>
<span className="text-xs text-muted-foreground">
{user.department || "-"}