fix skit
This commit is contained in:
@@ -71,7 +71,11 @@
|
||||
if($mohon['tagdeposit'] === 1)
|
||||
{
|
||||
echo '<button data-mohonid="' . $mohon["mohonid"] . '" id="btnterima" class="btn btn-success"><i class="fas fa-check"></i></button>';
|
||||
}else{
|
||||
}else if(($mohon['tagcit'] === 0 && $mohon['jenismohon'] === 'bayaranbalik'))
|
||||
{
|
||||
echo '<button data-mohonid="' . $mohon["mohonid"] . '" id="btncit" class="btn btn-secondary">CIT</button>';
|
||||
}
|
||||
else{
|
||||
echo '<span class="p-2 badge badge-info">DALAM PROSES</span>';
|
||||
}
|
||||
@endphp
|
||||
@@ -184,5 +188,51 @@
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#btncit', function(e) {
|
||||
|
||||
let mid = $(this).data("mohonid");
|
||||
|
||||
var bank = @php echo json_encode($bank) @endphp;
|
||||
var options = {};
|
||||
$.map(bank,
|
||||
function(o) {
|
||||
options[o.abbreviation] = o.name;
|
||||
});
|
||||
|
||||
Swal.fire({
|
||||
title: 'BANK CIT',
|
||||
text: 'Sila Pilih Bank',
|
||||
input: 'select',
|
||||
inputOptions: options,
|
||||
showCancelButton: true,
|
||||
animation: 'slide-from-top',
|
||||
inputPlaceholder: 'Sila Pilih Bank',
|
||||
allowOutsideClick: false
|
||||
}).then(function (result) {
|
||||
if (result) {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
$.ajax({
|
||||
method:"put",
|
||||
url: api_url + '/admin/permohonan/tagcit',
|
||||
data: {
|
||||
"mohonid" : mid,
|
||||
"bank" : result.value
|
||||
},
|
||||
success:function(data)
|
||||
{
|
||||
if(data === 1)
|
||||
Swal.fire('Diterima!', '', 'success')
|
||||
}
|
||||
});
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user