$(document).ready(async function () {
  $("#btnLogin").click(async () => {
    // alert('HELO')
    const username = $("#inputUsername").val()
    const password = $("#inputPassword").val()
    const data = {
      action: "LOGIN",
      username,
      password
    }
    console.log(data)
    const result = await util.sendData(data)
    console.log(result)
    if (result.result === "SUCCESS") {
      sessionStorage.setItem("user", JSON.stringify(result))
      location.href="index.php?page=dashboard"
    }
    else {
      alert(result.result)
    }
    
  })
})