Skip to content

Commit

Permalink
Don't allow deleting default group
Browse files Browse the repository at this point in the history
  • Loading branch information
albinmedoc committed Dec 1, 2024
1 parent de7968e commit 16ae1c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/routes/admin/groups/[groupId]/members/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@
};
const deleteGroup = () => {
if (data.config.defaultGroup === $page.params.groupId) {
modalStore.trigger({
type: "alert",
title: "Cannot Delete Default Group",
body: "You cannot delete the default group. Please change the default group before deleting this group."
});
return;
}
modalStore.trigger({
type: "confirm",
title: "Delete Group",
Expand Down

0 comments on commit 16ae1c4

Please sign in to comment.