forked from baron/baron-sso
내정보 멀티 테턴트 표시
This commit is contained in:
@@ -286,6 +286,49 @@ function AppLayout() {
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Manageable Tenants Section */}
|
||||
{profile?.manageableTenants &&
|
||||
profile.manageableTenants.length > 0 && (
|
||||
<div className="px-2 py-2 border-b border-border/50 mb-1">
|
||||
<p className="px-1 mb-2 text-[10px] font-bold uppercase tracking-wider text-muted-foreground">
|
||||
{t(
|
||||
"ui.admin.profile.manageable_tenants",
|
||||
"Manageable Tenants",
|
||||
)}
|
||||
</p>
|
||||
<div className="max-h-40 overflow-y-auto space-y-1 pr-1 custom-scrollbar">
|
||||
{profile.manageableTenants.map((tenant) => (
|
||||
<button
|
||||
key={tenant.id}
|
||||
type="button"
|
||||
onClick={() => {
|
||||
setIsProfileOpen(false);
|
||||
navigate(`/tenants/${tenant.id}`);
|
||||
}}
|
||||
className="w-full flex items-center gap-2 rounded-lg px-2 py-1.5 text-xs text-left text-muted-foreground transition hover:bg-muted/50 hover:text-foreground group"
|
||||
>
|
||||
<div className="flex h-5 w-5 shrink-0 items-center justify-center rounded bg-muted text-muted-foreground group-hover:bg-primary/20 group-hover:text-primary transition-colors">
|
||||
{tenant.type === "USER_GROUP" ? (
|
||||
<Users size={12} />
|
||||
) : (
|
||||
<Building2 size={12} />
|
||||
)}
|
||||
</div>
|
||||
<div className="flex flex-col truncate">
|
||||
<span className="font-medium truncate">
|
||||
{tenant.name}
|
||||
</span>
|
||||
<span className="text-[9px] opacity-60 font-mono truncate">
|
||||
{tenant.slug}
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
|
||||
Reference in New Issue
Block a user