Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/modules/activity/ActivityDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion src/modules/groups/EditGroupNameModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down
7 changes: 7 additions & 0 deletions src/modules/groups/table/GroupsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -228,6 +229,11 @@ export const GroupsTableColumns: ColumnDef<GroupUsage>[] = [
</GroupProvider>
),
},
{
accessorKey: "search",
accessorFn: (row) => removeAllSpaces(row.name),
filterFn: "fuzzy",
},
];

type Props = {
Expand Down Expand Up @@ -266,6 +272,7 @@ export default function GroupsTable({ headingTarget }: Readonly<Props>) {
rightSide={() => <AddGroupButton />}
columnVisibility={{
in_use: false,
search: false,
}}
>
{(table) => (
Expand Down