From 1bc41ecd560c03979f038b339d04f321764f35b0 Mon Sep 17 00:00:00 2001 From: Akalanka Perera Date: Sun, 15 Sep 2024 18:57:26 +0530 Subject: [PATCH] Fix: exception in user add submit handler --- src/components/users/dialog.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/users/dialog.jsx b/src/components/users/dialog.jsx index 5793c4a..37196bf 100644 --- a/src/components/users/dialog.jsx +++ b/src/components/users/dialog.jsx @@ -30,7 +30,7 @@ const UserDialog = ({ refresh }) => { await addUser({ name: e.target.name.value, email: e.target.email.value, - role: e.target.role.value + role }) .unwrap() .then(() => { @@ -58,7 +58,7 @@ const UserDialog = ({ refresh }) => { className="sm:h-14" label="Select Role" name="role" - options={userRoleOptions} + options={userRoleOptions.filter((option) => option.key !== "GROUP")} value={role} onChange={(e) => setRole(e.target.value)} />