parent
c1282b2973
commit
db4f7851fb
1 changed files with 5 additions and 4 deletions
|
@ -60,14 +60,16 @@ export const GroupsSection = () => {
|
|||
setIsCreateModalOpen(!isCreateModalOpen);
|
||||
};
|
||||
|
||||
const deleteGroup = (group: GroupRepresentation) => {
|
||||
const deleteGroup = async (group: GroupRepresentation) => {
|
||||
try {
|
||||
return adminClient.groups.del({
|
||||
await adminClient.groups.del({
|
||||
id: group.id!,
|
||||
});
|
||||
addAlert(t("groupDelete"), AlertVariant.success);
|
||||
} catch (error) {
|
||||
addAlert(t("groupDeleteError", { error }), AlertVariant.danger);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const multiDelete = async () => {
|
||||
|
@ -147,8 +149,7 @@ export const GroupsSection = () => {
|
|||
{
|
||||
title: t("common:delete"),
|
||||
onRowClick: async (group: GroupRepresentation) => {
|
||||
await deleteGroup(group);
|
||||
return true;
|
||||
return deleteGroup(group);
|
||||
},
|
||||
},
|
||||
]}
|
||||
|
|
Loading…
Reference in a new issue