mirror of
https://github.com/andwati/dokploy.git
synced 2026-12-05 17:18:47 +00:00
Refactor Sidebar organization actions: streamline default organization setting and deletion logic, ensuring proper error handling and UI consistency.
This commit is contained in:
@@ -627,7 +627,7 @@ function SidebarLogo() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
{org.ownerId === session?.user?.id && (
|
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
@@ -677,6 +677,8 @@ function SidebarLogo() {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
|
{org.ownerId === session?.user?.id && (
|
||||||
|
<>
|
||||||
<AddOrganization organizationId={org.id} />
|
<AddOrganization organizationId={org.id} />
|
||||||
<DialogAction
|
<DialogAction
|
||||||
title="Delete Organization"
|
title="Delete Organization"
|
||||||
@@ -709,9 +711,10 @@ function SidebarLogo() {
|
|||||||
<Trash2 className="size-4 text-primary group-hover:text-red-500" />
|
<Trash2 className="size-4 text-primary group-hover:text-red-500" />
|
||||||
</Button>
|
</Button>
|
||||||
</DialogAction>
|
</DialogAction>
|
||||||
</div>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{(user?.role === "owner" || isCloud) && (
|
{(user?.role === "owner" || isCloud) && (
|
||||||
|
|||||||
Reference in New Issue
Block a user