fix sedikit2
This commit is contained in:
@@ -688,23 +688,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
function ulangcetakagh()
|
||||
function ulangcetakagh(e)
|
||||
{
|
||||
if($("input[name='options']:checked").val() == 'belum_tebus'){
|
||||
var komen2 = $(e).data('komen2');
|
||||
|
||||
if(komen2 !== null)
|
||||
{
|
||||
if($("input[name='options']:checked").val() == 'belum_tebus'){
|
||||
let histid = $('input[name="belum"]:checked').val();
|
||||
if(histid == null){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Sila pilih salah satu SAG'
|
||||
});
|
||||
}else{
|
||||
let urlroute = '{{ route("agh.ulangcetak", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', histid);
|
||||
window.open(urlroute, '_blank');
|
||||
swal.close();
|
||||
if(histid == null){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran',
|
||||
text: 'Sila pilih salah satu SAG'
|
||||
});
|
||||
}else{
|
||||
let urlroute = '{{ route("agh.ulangcetak", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', histid);
|
||||
window.open(urlroute, '_blank');
|
||||
swal.close();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$('#AGHModalEdit').modal('show');
|
||||
swal.close();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function saghilangfunc()
|
||||
@@ -724,6 +734,7 @@
|
||||
data:{ "norujukan" : histid,"kodcaw" : kodcaw},
|
||||
success:function(data)
|
||||
{
|
||||
|
||||
var count = Object.keys(data).length;
|
||||
|
||||
if(count > 0)
|
||||
@@ -735,7 +746,7 @@
|
||||
showConfirmButton: false,
|
||||
html: "<br>" +
|
||||
'<button type="button" role="button" tabindex="0" class="btn btn-primary mr-1" onclick="swal.close()">' + 'Okay' + '</button>' +
|
||||
'<button type="button" role="button" tabindex="0" class="btn btn-primary" onclick="ulangcetakagh()">' + 'Ulang Cetak' + '</button>',
|
||||
'<button type="button" role="button" tabindex="0" class="btn btn-primary" onclick="ulangcetakagh(this)" data-komen2="' + data[0].komen2 + '">' + 'Ulang Cetak' + '</button>',
|
||||
icon: 'error',
|
||||
title: 'Surat Akuan Gadaian Hilang telah dikeluarkan!'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user