Removed the ability to change the user from the list
This commit is contained in:
@@ -181,52 +181,6 @@ export default function UserList({
|
||||
};
|
||||
return (
|
||||
<div className="flex gap-4">
|
||||
{checkAccess(user, updateUserPermission.list, permissions, updateUserPermission.perm) && (
|
||||
<Popover className="relative">
|
||||
<Popover.Button>
|
||||
<div data-tip="Change Type" className="cursor-pointer tooltip">
|
||||
<BsPerson className="hover:text-mti-purple-light transition ease-in-out duration-300" />
|
||||
</div>
|
||||
</Popover.Button>
|
||||
<Transition
|
||||
as={Fragment}
|
||||
enter="transition ease-out duration-200"
|
||||
enterFrom="opacity-0 translate-y-1"
|
||||
enterTo="opacity-100 translate-y-0"
|
||||
leave="transition ease-in duration-150"
|
||||
leaveFrom="opacity-100 translate-y-0"
|
||||
leaveTo="opacity-0 translate-y-1">
|
||||
<Popover.Panel className="absolute z-10 w-screen right-1/2 translate-x-1/3 max-w-sm">
|
||||
<div className="bg-white p-4 rounded-lg grid grid-cols-2 gap-2 w-full drop-shadow-xl">
|
||||
<Button
|
||||
onClick={() => updateAccountType(row.original, "student")}
|
||||
className="text-sm !py-2 !px-4"
|
||||
disabled={row.original.type === "student" || !PERMISSIONS.generateCode["student"].includes(user.type)}>
|
||||
Student
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => updateAccountType(row.original, "teacher")}
|
||||
className="text-sm !py-2 !px-4"
|
||||
disabled={row.original.type === "teacher" || !PERMISSIONS.generateCode["teacher"].includes(user.type)}>
|
||||
Teacher
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => updateAccountType(row.original, "corporate")}
|
||||
className="text-sm !py-2 !px-4"
|
||||
disabled={row.original.type === "corporate" || !PERMISSIONS.generateCode["corporate"].includes(user.type)}>
|
||||
Corporate
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => updateAccountType(row.original, "admin")}
|
||||
className="text-sm !py-2 !px-4"
|
||||
disabled={row.original.type === "admin" || !PERMISSIONS.generateCode["admin"].includes(user.type)}>
|
||||
Admin
|
||||
</Button>
|
||||
</div>
|
||||
</Popover.Panel>
|
||||
</Transition>
|
||||
</Popover>
|
||||
)}
|
||||
{!row.original.isVerified && checkAccess(user, updateUserPermission.list, permissions, updateUserPermission.perm) && (
|
||||
<div data-tip="Verify User" className="cursor-pointer tooltip" onClick={() => verifyAccount(row.original)}>
|
||||
<BsCheck className="hover:text-mti-purple-light transition ease-in-out duration-300" />
|
||||
|
||||
Reference in New Issue
Block a user