<commit_before>$(document).ready(function(){

  var $customerVisible = $('.customer-visible')
  var $employeeVisible = $('.employee-visible');
  var $pinInput = $(".pin-input, .pin-btn");
  var $popouts = $(".admin-popout, .pin-popout")
  var $confirm = $(".confirm")

  var lockScreen = function(){
    $employeeVisible.hide();
    $customerVisible.show();
    $pinInput.hide();
    $confirm.hide();
    $(".unlock-screen-btn").show();
    $(".lock-screen-btn").hide();
    $(".lock-status").html("")
    $(".admin-dashboard").hide();
  };

  var unlockScreen = function(){
    $(".unlock-screen-btn").hide();
    $pinInput.show();
    $(".lock-screen-btn").show();
  }

  var hidePopouts = function(){
    $popouts.hide();
  }

  var setTablesNotReady = function(){
    $(".status .ready, .status .seat-party").hide()
  }

  var showConfirm = function(buttonToReplace){
    var $confirm = buttonToReplace.next(".confirm");
    buttonToReplace.hide();  $confirm.show();
  };

  $(".unlock-screen-btn").on("click", function(event){
    unlockScreen();
    $(".pin-popout").show();
  });
  $(".lock-screen-btn").on("click", function(event){
    lockScreen();
    $(".pin-popout").hide();
  });

  lockScreen();
  hidePopouts();
  setTablesNotReady();

  $(".pin-btn").on("click", function(event){
    if ( $(".pin-input").val() === '1234' ) {
      $('.employee-visible').show(); $(".admin-dashboard").show();
      $pinInput.hide(); $('.customer-visible').hide(); $(".pin-popout").hide();
      $(".pin-input").val("");
      setTimeout(lockScreen, 15000);
      $(".lock-status").html("<p style='color:seagreen;'>Screen unlocked!</p><p style='color:orange;'>Will lock automatically in 5 seconds.</p>")
    }
    else {
      $(".lock-status").html("<p style='color:red;'>Incorrect pin!</p>")
    }
  });

  $(".admin-dashboard").on("click", function(){
    $(".admin-popout").toggle();
  });

});
<commit_msg>Fixes late binding issue on admin buttons<commit_after>$(document).ready(function(){

  var $pinInput = $(".pin-input, .pin-btn");
  var $popouts = $(".admin-popout, .pin-popout")
  var $confirm = $(".confirm")

  var lockScreen = function(){
    $('.employee-visible').hide();
    $('.customer-visible').show();
    $pinInput.hide();
    $confirm.hide();
    $(".unlock-screen-btn").show();
    $(".lock-screen-btn").hide();
    $(".lock-status").html("")
    $(".admin-dashboard").hide();
  };

  var unlockScreen = function(){
    $(".unlock-screen-btn").hide();
    $pinInput.show();
    $(".lock-screen-btn").show();
  }

  var hidePopouts = function(){
    $popouts.hide();
  }

  var setTablesNotReady = function(){
    $(".status .ready, .status .seat-party").hide()
  }

  var showConfirm = function(buttonToReplace){
    var $confirm = buttonToReplace.next(".confirm");
    buttonToReplace.hide();  $confirm.show();
  };

  $(".unlock-screen-btn").on("click", function(event){
    unlockScreen();
    $(".pin-popout").show();
  });
  $(".lock-screen-btn").on("click", function(event){
    lockScreen();
    $(".pin-popout").hide();
  });

  lockScreen();
  hidePopouts();
  setTablesNotReady();

  $(".pin-btn").on("click", function(event){
    if ( $(".pin-input").val() === '1234' ) {
      $('.employee-visible').show(); $(".admin-dashboard").show();
      $pinInput.hide(); $('.customer-visible').hide(); $(".pin-popout").hide();
      $(".pin-input").val("");
      setTimeout(lockScreen, 15000);
      $(".lock-status").html("<p style='color:seagreen;'>Screen unlocked!</p><p style='color:orange;'>Will lock automatically in 5 seconds.</p>")
    }
    else {
      $(".lock-status").html("<p style='color:red;'>Incorrect pin!</p>")
    }
  });

  $(".admin-dashboard").on("click", function(){
    $(".admin-popout").toggle();
  });

});

{'fraction_non_alphanumeric': 0.2596332713260696, 'fraction_numerical': 0.005314908317831517, 'mean_word_length': 3.4862932061978547, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5987073', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1223, 'n_words': 188}