Skip to content

Commit

Permalink
auto checkin checkout at resource
Browse files Browse the repository at this point in the history
  • Loading branch information
Pancham1603 committed Dec 2, 2023
1 parent ba8a1a7 commit 5047ad0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions apps/validation/static/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,23 @@ function updateUserPass(data,user_data, task, request_user_location) {

if (task['check_out']) {
if (request_user_location == 'campus_resource') {
actionButton.style.visibility = 'visible';
actionButton.innerHTML = `Check Out`;
// checkOut(user_data.registration_number);
// actionButton.style.visibility = 'visible';
// actionButton.innerHTML = `Check Out`;
checkOut(user_data.registration_number);
document.getElementById('pass-card').style.backgroundColor = '#F0E68C';
actionButton.onclick = function() {checkOut(user_data.registration_number);}
// actionButton.onclick = function() {checkOut(user_data.registration_number);}
} else {
actionButton.style.visibility = 'visible';
actionButton.innerHTML = `Check Out`;
document.getElementById('pass-card').style.backgroundColor = '#90EE90'
actionButton.onclick = function() {checkOut(user_data.registration_number);}}
} else if (task['check_in']) {
if (request_user_location == 'campus_resource') {
// checkIn(user_data.registration_number);
checkIn(user_data.registration_number);
document.getElementById('pass-card').style.backgroundColor = '#90EE90';
actionButton.style.visibility = 'visible';
actionButton.innerHTML = `Check In`;
actionButton.onclick = function(){checkIn(user_data.registration_number);}
// actionButton.style.visibility = 'visible';
// actionButton.innerHTML = `Check In`;
// actionButton.onclick = function(){checkIn(user_data.registration_number);}
} else {
document.getElementById('pass-card').style.backgroundColor = '#F0E68C';
actionButton.style.visibility = 'visible';
Expand Down

0 comments on commit 5047ad0

Please sign in to comment.