function orderDelete(id) {
    event.preventDefault();
    Swal.fire({
        title: 'Jeste li sigurni?',
        text: "Želite li otkazati ovu narudžbu?",
        icon: 'question',
        showCancelButton: true,
        confirmButtonColor: '#3085D6',
        cancelButtonColor: '#D33',
        confirmButtonText: 'Da, otkaži',
        cancelButtonText: 'Poništi'
    }).then((result) => {
        if (result.isConfirmed) {
          var idTag = id;
          var url = "helpers/delete-order.php";
          var params = "id="+idTag;
          var xhr = new XMLHttpRequest();
          xhr.open("GET", url+"?"+params, true);
          xhr.onreadystatechange = function() {
              if (xhr.readyState === 4 && xhr.status === 200) {
              }
          };
          xhr.send();
          Swal.fire(
            'Otkazano!',
            'Narudžba je otkazana.',
            'success'
          ).then((result) => {
            if (result.isConfirmed) {
                location.reload();
            }
          })
        }
    })
}

function orderCompleted() {
  Swal.fire(
    '',
    'Ovaj menu je već naručen.',
    'warning'
  )
}