mirror of
https://github.com/netbirdio/dashboard.git
synced 2026-01-26 01:21:04 +00:00
Add group update activity event (#504)
This commit is contained in:
@@ -391,6 +391,14 @@ export default function ActivityDescription({ event }: Props) {
|
||||
</div>
|
||||
);
|
||||
|
||||
if (event.activity_code == "group.update")
|
||||
return (
|
||||
<div className={"inline"}>
|
||||
Group <Value>{event.meta.old_name}</Value> was renamed to{" "}
|
||||
<Value>{event.meta.new_name}</Value>
|
||||
</div>
|
||||
);
|
||||
|
||||
/**
|
||||
* Account
|
||||
*/
|
||||
|
||||
@@ -36,7 +36,7 @@ export const EditGroupNameModal = ({
|
||||
}, [name, initialName, error]);
|
||||
|
||||
const handleNameChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const newName = trim(e.target.value);
|
||||
const newName = e.target.value;
|
||||
const findGroup = groups?.find((g) => g.name === newName);
|
||||
if (findGroup) {
|
||||
setError("This group already exists. Please choose another name.");
|
||||
|
||||
@@ -3,6 +3,7 @@ import { DataTable } from "@components/table/DataTable";
|
||||
import DataTableHeader from "@components/table/DataTableHeader";
|
||||
import { DataTableRowsPerPage } from "@components/table/DataTableRowsPerPage";
|
||||
import { ColumnDef, SortingState } from "@tanstack/react-table";
|
||||
import { removeAllSpaces } from "@utils/helpers";
|
||||
import { Layers3Icon } from "lucide-react";
|
||||
import { usePathname } from "next/navigation";
|
||||
import React from "react";
|
||||
@@ -228,6 +229,11 @@ export const GroupsTableColumns: ColumnDef<GroupUsage>[] = [
|
||||
</GroupProvider>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: "search",
|
||||
accessorFn: (row) => removeAllSpaces(row.name),
|
||||
filterFn: "fuzzy",
|
||||
},
|
||||
];
|
||||
|
||||
type Props = {
|
||||
@@ -266,6 +272,7 @@ export default function GroupsTable({ headingTarget }: Readonly<Props>) {
|
||||
rightSide={() => <AddGroupButton />}
|
||||
columnVisibility={{
|
||||
in_use: false,
|
||||
search: false,
|
||||
}}
|
||||
>
|
||||
{(table) => (
|
||||
|
||||
Reference in New Issue
Block a user