ENCOA-114: In Exam List and Group List provide Fuzzy Search Filter
This commit is contained in:
@@ -109,23 +109,6 @@ export default function UserList({
|
||||
.finally(reload);
|
||||
};
|
||||
|
||||
const updateAccountType = (user: User, type: Type) => {
|
||||
if (!confirm(`Are you sure you want to update ${user.name}'s account from ${capitalize(user.type)} to ${capitalize(type)}?`)) return;
|
||||
|
||||
axios
|
||||
.post<{user?: User; ok?: boolean}>(`/api/users/update?id=${user.id}`, {
|
||||
...user,
|
||||
type,
|
||||
})
|
||||
.then(() => {
|
||||
toast.success("User type updated successfully!");
|
||||
reload();
|
||||
})
|
||||
.catch(() => {
|
||||
toast.error("Something went wrong!", {toastId: "update-error"});
|
||||
});
|
||||
};
|
||||
|
||||
const verifyAccount = (user: User) => {
|
||||
axios
|
||||
.post<{user?: User; ok?: boolean}>(`/api/users/update?id=${user.id}`, {
|
||||
|
||||
Reference in New Issue
Block a user