mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-26 21:58:45 +00:00
Merge pull request #3109 from Dokploy/3097-actions-section-not-working-on-users-page
refactor: enhance user management actions in dashboard
This commit is contained in:
@@ -111,13 +111,16 @@ export const ShowUsers = () => {
|
|||||||
</TableCell>
|
</TableCell>
|
||||||
|
|
||||||
<TableCell className="text-right flex justify-end">
|
<TableCell className="text-right flex justify-end">
|
||||||
|
{member.role !== "owner" && (
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
className="h-8 w-8 p-0"
|
className="h-8 w-8 p-0"
|
||||||
>
|
>
|
||||||
<span className="sr-only">Open menu</span>
|
<span className="sr-only">
|
||||||
|
Open menu
|
||||||
|
</span>
|
||||||
<MoreHorizontal className="h-4 w-4" />
|
<MoreHorizontal className="h-4 w-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
@@ -126,14 +129,10 @@ export const ShowUsers = () => {
|
|||||||
Actions
|
Actions
|
||||||
</DropdownMenuLabel>
|
</DropdownMenuLabel>
|
||||||
|
|
||||||
{member.role !== "owner" && (
|
|
||||||
<AddUserPermissions
|
<AddUserPermissions
|
||||||
userId={member.user.id}
|
userId={member.user.id}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
|
|
||||||
{member.role !== "owner" && (
|
|
||||||
<>
|
|
||||||
{!isCloud && (
|
{!isCloud && (
|
||||||
<DialogAction
|
<DialogAction
|
||||||
title="Delete User"
|
title="Delete User"
|
||||||
@@ -158,9 +157,7 @@ export const ShowUsers = () => {
|
|||||||
>
|
>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="w-full cursor-pointer text-red-500 hover:!text-red-600"
|
className="w-full cursor-pointer text-red-500 hover:!text-red-600"
|
||||||
onSelect={(e) =>
|
onSelect={(e) => e.preventDefault()}
|
||||||
e.preventDefault()
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
Delete User
|
Delete User
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
@@ -214,9 +211,7 @@ export const ShowUsers = () => {
|
|||||||
);
|
);
|
||||||
refetch();
|
refetch();
|
||||||
} else {
|
} else {
|
||||||
toast.error(
|
toast.error("Error unlinking user");
|
||||||
"Error unlinking user",
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -227,10 +222,9 @@ export const ShowUsers = () => {
|
|||||||
Unlink User
|
Unlink User
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</DialogAction>
|
</DialogAction>
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user