$(function() {
	'use strict';
	
  $('.form-control').on('input', function() {
	  var $field = $(this).closest('.form-group');
	  if (this.value) {
	    $field.addClass('field--not-empty');
	  } else {
	    $field.removeClass('field--not-empty');
	  }
	});

});
function login(){
	var username = document.getElementById("username").value;
	var password = document.getElementById("password").value;
	//if (username && password!= undefined){

// const data = { 'username': username, 'password': password };

// fetch('https://localhost/erm/auth.php', {
//   method: 'POST', // or 'PUT'
//   headers: {
//     'Content-Type': 'application/json',
//   },
//   body: JSON.stringify(data),
// })
// .then(response => response.json())
// .then(data => {
//   console.log('Success:', data);
// })
// .catch((error) => {
//   console.error('Error:', error);
// });

var vm = "http://localhost/erm/auth.php?username=".concat(username,"&").concat("password=",password,"&").concat("department=",password);
      
//alert(ticketNo);

fetch(vm);
console.log("sent");
alert("login successful");



	//}
}