forked from baron/baron-sso
refactor(adminfront): rename legacy companyCode to tenantSlug across frontend (#426)
This commit is contained in:
@@ -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 || "-"}
|
||||
|
||||
Reference in New Issue
Block a user