mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
confirm deletion.
This commit is contained in:
parent
68caf82167
commit
3350f3c39a
@ -136,13 +136,23 @@
|
||||
});
|
||||
}
|
||||
function deleteUser(userId) {
|
||||
$.post(`/Admin/DeleteUser?userId=${userId}`, function (data) {
|
||||
if (data) {
|
||||
reloadUserTable();
|
||||
} else {
|
||||
errorToast(genericErrorMessage());
|
||||
Swal.fire({
|
||||
title: "Confirm Deletion?",
|
||||
text: "Deleted Users cannot be restored.",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "Delete",
|
||||
confirmButtonColor: "#dc3545"
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.post(`/Admin/DeleteUser?userId=${userId}`, function (data) {
|
||||
if (data) {
|
||||
reloadUserTable();
|
||||
} else {
|
||||
errorToast(genericErrorMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
function generateNewToken() {
|
||||
Swal.fire({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user