admin role enhancment
basic invitation flow
This commit is contained in:
1 parent
d112dbb122
commit
b1f01208fa
6 files changed
+59
-13
No files matched your search
@@ -362,8 +362,12 @@ export function UserManagement({ gymId }: UserManagementProps) {
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Only superAdmins and admins can reassign gyms */}
|
||||
{user?.publicMetadata?.role !== "trainer" && (
|
||||
{/* Only superAdmins can reassign gyms */}
|
||||
{(() => {
|
||||
const currentRole = user?.publicMetadata?.role;
|
||||
console.log("Current user role for gym selector:", currentRole);
|
||||
return currentRole === "superAdmin";
|
||||
})() && (
|
||||
<div className="mb-4">
|
||||
<label className="block text-sm font-medium mb-1">Gym</label>
|
||||
<select
|
||||
|
||||
Reference in new issue
Block a user