-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- configure codeclimate reporting
- Loading branch information
Showing
4 changed files
with
34 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
const verify_user = document.getElementById('verify_user'); | ||
const un_verify_user = document.getElementById('un_verify_user'); | ||
|
||
verify_user.addEventListener('click', e => { | ||
e.preventDefault(); | ||
const cont = prompt( | ||
'Please confirm if you want to verify this user', | ||
'Click okay to reject this loan request'); | ||
|
||
const promptUser = (text, defaultText, msg) => { | ||
const cont = prompt(text, defaultText); | ||
if (cont !== null) { | ||
// verify user | ||
alert('User was verified.'); | ||
// Send email notification | ||
alert(msg); | ||
} | ||
}; | ||
|
||
verify_user.addEventListener('click', e => { | ||
e.preventDefault(); | ||
|
||
promptUser( | ||
'Confirm user verification', | ||
'Click okay to verify this user', | ||
'User was verified.' | ||
); | ||
return; | ||
}); | ||
|
||
un_verify_user.addEventListener('click', e => { | ||
e.preventDefault(); | ||
const cont = prompt( | ||
"Please confirm if you want to verify revoke this user's verification", | ||
"Click okay to revoke this user's verification"); | ||
|
||
if (cont !== null) { | ||
// revoke verification | ||
alert("User's verification was revoked."); | ||
// Send email notification | ||
} | ||
|
||
promptUser( | ||
'Confirm revoking user verification', | ||
"Click okay to revoke this user's verification", | ||
"User's verification was revoked." | ||
); | ||
return; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters