fix: action button on dns, users, agents

This commit is contained in:
d34dscene
2025-04-13 23:22:51 +02:00
parent 6faa52bd59
commit 89725af1d4
3 changed files with 8 additions and 17 deletions
+2
View File
@@ -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',
+2
View File
@@ -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',
+4 -17
View File
@@ -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
}
]
});