)[key];
+ form.setError(errorKey, { message: errorMessage });
+ }
+ });
+ toast.error('Det er en eller flere feil i skjemaet');
+ },
+ });
+ };
+
+ return (
+
+
+
+ Opprett ny gruppe
+ Velg gruppetype og opprett en ny gruppe.
+
+
+
+
+
+
+
+ );
+}
diff --git a/src/pages/Profile/components/ProfileAdmin.tsx b/src/pages/Profile/components/ProfileAdmin.tsx
index 80c370f8..f9ca9fab 100644
--- a/src/pages/Profile/components/ProfileAdmin.tsx
+++ b/src/pages/Profile/components/ProfileAdmin.tsx
@@ -1,4 +1,4 @@
-import { Boxes, BriefcaseBusiness, Calendar, ChevronRightIcon, Grip, Info, LucideIcon, Newspaper, Users } from 'lucide-react';
+import { Boxes, BriefcaseBusiness, Calendar, ChevronRightIcon, Grip, Info, LucideIcon, Newspaper, Plus, Users } from 'lucide-react';
import { Link } from 'react-router-dom';
import URLS from 'URLS';
@@ -86,6 +86,13 @@ const Admin = () => {
primary: 'Bannere',
secondary: 'Opprett, endre og slett bannere',
},
+ {
+ apps: [PermissionApp.GROUP],
+ icon: Plus,
+ to: URLS.newGroupAdmin,
+ primary: 'Ny gruppe',
+ secondary: 'Legg til en ny gruppe',
+ },
];
return (
diff --git a/src/types/Group.tsx b/src/types/Group.tsx
index 16eae674..5c6729e8 100644
--- a/src/types/Group.tsx
+++ b/src/types/Group.tsx
@@ -49,6 +49,12 @@ export type GroupMutate = Partial