admin page
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
<div class="col-2 justify-content-start">
|
||||
</div>
|
||||
<div class="col-8 justify-content-center">
|
||||
<form action="{{ route('barcodetebus.scanned') }}" onsubmit="return checkserah(this)" method="post">
|
||||
<form action="{{ route('barcodetebus.scanned') }}" method="post">
|
||||
@csrf
|
||||
<label>Scan Barcode Keluar Marhun Dari Peti Besi </label>
|
||||
<input type="text" class="form-control col-6 mx-auto" name="norujukan_barcode" autocomplete="off" id="norujukan_barcode" placeholder="SILA SCAN BARCODE PADA SAG"/>
|
||||
@@ -205,35 +205,35 @@ var api_url = "<?php echo $api_url ?>";
|
||||
});
|
||||
});
|
||||
|
||||
function checkserah(func){
|
||||
event.preventDefault();
|
||||
var norujukan = $('#norujukan_barcode').val();
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: api_url + '/api/check/serah/tebus',
|
||||
datatype:'json',
|
||||
data:{
|
||||
'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
|
||||
'norujukan': norujukan
|
||||
},
|
||||
success:function(data){
|
||||
console.log(data);
|
||||
if(data == 'true'){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Penebusan Sudah Scan'
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}else if(data == 'false'){
|
||||
$(func).attr("onSubmit","return true;");
|
||||
$(func).submit();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// function checkserah(func){
|
||||
// event.preventDefault();
|
||||
// var norujukan = $('#norujukan_barcode').val();
|
||||
// $.ajax({
|
||||
// method:'get',
|
||||
// url: api_url + '/api/check/serah/tebus',
|
||||
// datatype:'json',
|
||||
// data:{
|
||||
// 'kodcaw': "{{ $cawangan_info['kodcaw'] }}",
|
||||
// 'norujukan': norujukan
|
||||
// },
|
||||
// success:function(data){
|
||||
// console.log(data);
|
||||
// if(data == 'true'){
|
||||
// Swal.fire({
|
||||
// icon: 'error',
|
||||
// title: 'Amaran',
|
||||
// text: 'Penebusan Sudah Scan'
|
||||
// });
|
||||
// event.preventDefault();
|
||||
// return false;
|
||||
// }else if(data == 'false'){
|
||||
// $(func).attr("onSubmit","return true;");
|
||||
// $(func).submit();
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user