fixes of kelulusan and resit and marhun and notifikasi
This commit is contained in:
@@ -217,26 +217,35 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
Jumlah Pembiayaan Semasa / Limit Pembiayaan Semasa
|
||||
<div class="col-md-4">
|
||||
Pembiayaan Semasa
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-8">
|
||||
@php
|
||||
$outstanding_semasa = Http::get($api_url . '/api/gadai/customers/'. $customer_info['kpbaru'] .'/outstandingsemasa')->json();
|
||||
@endphp
|
||||
<input type="text" class="form-control" name="outstanding_semasa" id="outstanding_semasa" readonly value="{{ number_format($outstanding_semasa,2) }}">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-4">
|
||||
Limit Pembiayaan
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
@php
|
||||
$limit_pinjaman_semasa = 0;
|
||||
@endphp
|
||||
<input type="text" class="form-control" name="outstanding_semasa" id="outstanding_semasa" readonly value="{{ number_format($limit_pinjaman_semasa,2) }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-4">
|
||||
No Telefon
|
||||
@@ -245,8 +254,7 @@
|
||||
<input type="text" class="form-control" name="nota_semasa" id="nota_semasa" readonly value="{{ $customer_info['telefon'] }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-4">
|
||||
Nota
|
||||
@@ -255,9 +263,8 @@
|
||||
<input type="text" class="form-control" name="nota_semasa" id="nota_semasa" readonly value="{{ $customer_info['nota'] }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12 mt-md-3 justify-content-between form-group row">
|
||||
<div class="btn-group btn-group-toggle col-md-6" data-toggle="buttons">
|
||||
@@ -607,10 +614,80 @@
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
var urlroute = '{{ route("gadaian.edit", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', ubahid);
|
||||
Swal.fire({
|
||||
title: 'Tunggu Pengesahan Daripada Khazanah.',
|
||||
icon: 'info',
|
||||
width: 600,
|
||||
padding: '3em',
|
||||
background: '#fffff',
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false
|
||||
})
|
||||
|
||||
let mohon = "Ubah Gadai";
|
||||
|
||||
$.ajax({
|
||||
method:'post',
|
||||
url: '{{ route("teller.createkelulusan") }}',
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"norujukan" : ubahid,
|
||||
"mohon" : mohon
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
console.log(data);
|
||||
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
//TIME INTERVAL
|
||||
let timerInterval;
|
||||
|
||||
timerInterval = setInterval(function()
|
||||
{
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: "{{ route('teller.getkelulusan') }}",
|
||||
data: {
|
||||
"norujukan" : ubahid
|
||||
},
|
||||
success:function(data){
|
||||
console.log(data);
|
||||
if(data != 0)
|
||||
{
|
||||
console.log('berjaya');
|
||||
clearInterval(timerInterval);
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Anda Berjaya Menerima Pengesahan'
|
||||
}).then(function(){
|
||||
|
||||
var urlroute = '{{ route("gadaian.edit", ":id") }}';
|
||||
urlroute = urlroute.replace(':id', ubahid);
|
||||
|
||||
window.location.replace(urlroute);
|
||||
|
||||
return true;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
}, 3000);
|
||||
|
||||
|
||||
window.location.replace(urlroute);
|
||||
|
||||
|
||||
}else if (result.dismiss === Swal.DismissReason.cancel) {
|
||||
@@ -670,6 +747,71 @@
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
Swal.fire({
|
||||
title: 'Tunggu Pengesahan Daripada Khazanah.',
|
||||
icon: 'info',
|
||||
width: 600,
|
||||
padding: '3em',
|
||||
background: '#fffff',
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false
|
||||
})
|
||||
|
||||
let mohon = "Hapus Gadai";
|
||||
let id = 0;
|
||||
if($("input[name='options']:checked").val() == 'belum_tebus')
|
||||
{
|
||||
id = hapusid;
|
||||
}
|
||||
else if($("input[name='options']:checked").val() == 'sudah_tebus')
|
||||
{
|
||||
id = hapusidsudah;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
method:'post',
|
||||
url: '{{ route("teller.createkelulusan") }}',
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"norujukan" : id,
|
||||
"mohon" : mohon
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
console.log(data);
|
||||
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
//TIME INTERVAL
|
||||
let timerInterval;
|
||||
|
||||
timerInterval = setInterval(function()
|
||||
{
|
||||
$.ajax({
|
||||
method:'get',
|
||||
url: "{{ route('teller.getkelulusan') }}",
|
||||
data: {
|
||||
"norujukan" : id
|
||||
},
|
||||
success:function(data){
|
||||
console.log(data);
|
||||
if(data != 0)
|
||||
{
|
||||
console.log('berjaya');
|
||||
clearInterval(timerInterval);
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Anda Berjaya Menerima Pengesahan'
|
||||
}).then(function(){
|
||||
|
||||
if($("input[name='options']:checked").val() == 'belum_tebus')
|
||||
{
|
||||
|
||||
@@ -700,7 +842,7 @@
|
||||
|
||||
$.ajax({
|
||||
method:'put',
|
||||
url:api_url+'/api/tebus/hapus/' + kodcaw + '/' + hapusid,
|
||||
url:api_url+'/api/tebus/hapus/' + kodcaw + '/' + hapusidsudah,
|
||||
success:function(data)
|
||||
{
|
||||
if(data != "Bukan-Tebus")
|
||||
@@ -729,6 +871,21 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
}, 3000);
|
||||
|
||||
|
||||
}else if (result.dismiss === Swal.DismissReason.cancel) {
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Cancelled',
|
||||
|
||||
Reference in New Issue
Block a user