mirror of
https://github.com/MizuchiLabs/mantrae.git
synced 2026-05-08 09:00:34 -05:00
fix: action button on dns, users, agents
This commit is contained in:
@@ -74,6 +74,7 @@
|
||||
return renderComponent(TableActions, {
|
||||
actions: [
|
||||
{
|
||||
type: 'button',
|
||||
label: editText,
|
||||
icon: editIcon,
|
||||
onClick: () => {
|
||||
@@ -84,6 +85,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
label: 'Delete Agent',
|
||||
icon: Trash,
|
||||
classProps: 'text-destructive',
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
return renderComponent(TableActions, {
|
||||
actions: [
|
||||
{
|
||||
type: 'button',
|
||||
label: 'Edit DNSProvider',
|
||||
icon: Pencil,
|
||||
onClick: () => {
|
||||
@@ -95,6 +96,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
label: 'Delete DNSProvider',
|
||||
icon: Trash,
|
||||
classProps: 'text-destructive',
|
||||
|
||||
@@ -82,25 +82,10 @@
|
||||
id: 'actions',
|
||||
enableHiding: false,
|
||||
cell: ({ row }) => {
|
||||
if (row.original.id === 1) {
|
||||
return renderComponent(TableActions, {
|
||||
actions: [
|
||||
{
|
||||
label: 'Edit User',
|
||||
icon: Pencil,
|
||||
onClick: () => {
|
||||
modalState = {
|
||||
isOpen: true,
|
||||
user: row.original
|
||||
};
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
return renderComponent(TableActions, {
|
||||
actions: [
|
||||
{
|
||||
type: 'button',
|
||||
label: 'Edit User',
|
||||
icon: Pencil,
|
||||
onClick: () => {
|
||||
@@ -111,12 +96,14 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
label: 'Delete User',
|
||||
icon: Trash,
|
||||
classProps: 'text-destructive',
|
||||
onClick: () => {
|
||||
deleteUser(row.original);
|
||||
}
|
||||
},
|
||||
disabled: row.original.id === 1
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user