kelulusan operasi
This commit is contained in:
@@ -557,13 +557,124 @@
|
||||
}
|
||||
else{
|
||||
if(pinjaman > Number(pembiyaan_max_pelulus)+10){
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Amaran!',
|
||||
text: 'Pembiayaan Memerlukan Kelulusan Operasi'
|
||||
// Swal.fire({
|
||||
// icon: 'error',
|
||||
// title: 'Amaran!',
|
||||
// text: 'Pembiayaan Memerlukan Kelulusan Operasi'
|
||||
// });
|
||||
// event.preventDefault();
|
||||
// return false;
|
||||
|
||||
const swalWithBootstrapButtons = Swal.mixin
|
||||
({
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-success',
|
||||
cancelButton: 'btn btn-danger'
|
||||
},
|
||||
buttonsStyling: false
|
||||
})
|
||||
|
||||
swalWithBootstrapButtons.fire({
|
||||
title: 'Dapatkan Pengesahan Daripada Operasi?',
|
||||
text: "Tetapan margin melebihi 75% untuk Operasi!",
|
||||
icon: 'info',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Setuju!',
|
||||
cancelButtonText: 'Batal',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
|
||||
let norujukan = $('#norujukan').val();
|
||||
|
||||
Swal.fire({
|
||||
title: 'Tunggu Pengesahan Daripada Operasi.',
|
||||
icon: 'info',
|
||||
width: 600,
|
||||
padding: '3em',
|
||||
background: '#fffff',
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
allowEnterKey: false
|
||||
})
|
||||
|
||||
$.ajax({
|
||||
method:'post',
|
||||
url: "{{ route('operasi.createkelulusan') }}",
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"norujukan" : norujukan
|
||||
// "teller" : teller,
|
||||
// "dategadai" : dategadai,
|
||||
// "bilgadai" : noic,
|
||||
// "jumpinjam" : jumpinjam,
|
||||
// "teller" : teller
|
||||
|
||||
},
|
||||
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('khazanah.getkelulusan') }}",
|
||||
data: {
|
||||
"norujukan" : norujukan
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
if(data != '')
|
||||
{
|
||||
clearInterval(timerInterval);
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Anda Berjaya Menerima Pengesahan'
|
||||
}).then(function(){
|
||||
|
||||
$(func).attr("onSubmit","return true;");
|
||||
$(func).submit();
|
||||
return true;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
}, 3000);
|
||||
|
||||
|
||||
} else if (
|
||||
/* Read more about handling dismissals below */
|
||||
result.dismiss === Swal.DismissReason.cancel
|
||||
) {
|
||||
swalWithBootstrapButtons.fire(
|
||||
'Cancelled',
|
||||
'Your imaginary file is safe :)',
|
||||
'error'
|
||||
)
|
||||
}
|
||||
});
|
||||
event.preventDefault();
|
||||
return false;
|
||||
|
||||
event.preventDefault();
|
||||
return false;
|
||||
|
||||
}else if(pinjaman > Number(pembiayaan_max_teller)+10){
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="card-header">{{ __('Dashboard') }}</div>
|
||||
|
||||
<div class="card-body text-center">
|
||||
Operasi
|
||||
<a href="{{ route('operasi.kelulusan') }}" class="btn btn-info btn-lg">Kelulusan</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Dashboard') }}</div>
|
||||
|
||||
<div class="card-body text-center">
|
||||
|
||||
<div class="row mb-4">
|
||||
<div class="col-2 justify-content-start">
|
||||
<a href="{{ url('/') }}" class="ion-backspace" style="font-size:50px;color:blue;"></a>
|
||||
</div>
|
||||
<div class="col-8 mt-3 justify-content-center">
|
||||
<h3>Kelulusan</h3>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
</div>.
|
||||
</div>
|
||||
|
||||
<table class='table mt-4' id='table-kelulusan' style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No Rujukan</th>
|
||||
<th>TARIKH</th>
|
||||
<th>Cawangan</th>
|
||||
<th>Komen</th>
|
||||
<th>Tindakan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($kelulusan as $index=>$k)
|
||||
|
||||
<tr>
|
||||
<td>{{ $k['NORUJUKAN'] }}</td>
|
||||
<td>{{ $k['TARIKH'] }}</td>
|
||||
<td>{{ $cawangan_info['details_caw'] }}</td>
|
||||
<td>{{ $k['KOMEN'] }}</td>
|
||||
<td><button class="btn btn-primary mr-2" onclick="updatelulus(this)" data-norujukan="{{ $k['NORUJUKAN'] }}"><i class="fas fa-thumbs-up"></i></button><button class="btn btn-danger"><i class="fas fa-thumbs-down"></i></button></td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row mt-4 d-flex justify-content-center">
|
||||
|
||||
<a href="#" class="btn btn-info col-3">Kemaskini</a>
|
||||
<a href="#" class="btn btn-info ml-2 col-3">Rekod Telah Lulus</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var tablekelulusan = $('#table-kelulusan').DataTable({
|
||||
"scrollX": true
|
||||
});
|
||||
|
||||
function updatelulus(e)
|
||||
{
|
||||
let norujukan = $(e).data('norujukan');
|
||||
|
||||
$.ajax({
|
||||
method:'put',
|
||||
url: "{{ route('khazanah.updatekelulusan') }}",
|
||||
data: {
|
||||
"_token": "{{ csrf_token() }}",
|
||||
"norujukan" : norujukan
|
||||
},
|
||||
success:function(data){
|
||||
|
||||
Swal.fire({
|
||||
icon: 'success',
|
||||
title: 'Anda Berjaya Mengesahkan Pengesahan'
|
||||
}).then(function(){
|
||||
// location.reload();
|
||||
});
|
||||
|
||||
},error: function(xhr, status, error) {
|
||||
var err = eval("(" + xhr.responseText + ")");
|
||||
alert(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
@@ -135,7 +135,7 @@
|
||||
<form action="">
|
||||
<div class="col-12 form-group row">
|
||||
{{-- <div class="col-4"></div> --}}
|
||||
<div class="col-6">
|
||||
<div class="col-6" id="divbakihargajualan">
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
@@ -201,8 +201,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<div class="form-group row" id="divbakipinjaman">
|
||||
<div class="col-6" id="divbakipinjaman">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
PEMBIAYAAN BARU(RM)
|
||||
</div>
|
||||
@@ -212,8 +212,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<div class="form-group row" id="divperludibayar">
|
||||
<div class="col-6" id="divperludibayar">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
PERLU DIBAYAR(RM)
|
||||
</div>
|
||||
@@ -223,9 +223,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<div class="col-6" id="divpinjamanbaru">
|
||||
|
||||
<div class="form-group row" id="divpinjamanbaru">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
PINJAMAN BARU(RM)
|
||||
</div>
|
||||
@@ -237,8 +237,8 @@
|
||||
</div>
|
||||
</diV>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group row" id="divbayaranditerima">
|
||||
<div class="col-6" id="divbayaranditerima">
|
||||
<div class="form-group row">
|
||||
<div class="col-4">
|
||||
BAYARAN DITERIMA(RM)
|
||||
</div>
|
||||
@@ -331,7 +331,6 @@ function tebusan()
|
||||
dataType: 'json',
|
||||
success:function(data){
|
||||
$('#perludibayar').val(data);
|
||||
alert(data);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -393,7 +392,7 @@ function tebusan()
|
||||
|
||||
if(tarikhgadai >= tarikhtawarruq)
|
||||
{
|
||||
alert('separuh bayar tawarruq');
|
||||
|
||||
//Separuh Bayar Tawarruq
|
||||
$(document).on('click', '#checkmarhun', function(e) {
|
||||
|
||||
@@ -447,7 +446,7 @@ if(tarikhgadai >= tarikhtawarruq)
|
||||
});
|
||||
});
|
||||
|
||||
//checked box
|
||||
//checked box
|
||||
var checkboxes = document.querySelectorAll('input[type="checkbox"]');
|
||||
var checkedOne = Array.prototype.slice.call(checkboxes).some(x => x.checked);
|
||||
|
||||
@@ -544,7 +543,10 @@ $("#sltjenistebus").change(function(){
|
||||
case "T":
|
||||
$('input[type="checkbox"]').hide();
|
||||
$('span.spannar').show();
|
||||
|
||||
$("#bayaran").prop("disabled", true);
|
||||
$("#bayaran").val(0);
|
||||
|
||||
$('#divtambahpinjaman').hide();
|
||||
$('#divpinjamanbaru').hide();
|
||||
$('#divbayaranditerima').hide();
|
||||
@@ -560,7 +562,10 @@ $("#sltjenistebus").change(function(){
|
||||
case "A":
|
||||
$('input[type="checkbox"]').hide();
|
||||
$('span.spannar').show();
|
||||
|
||||
$("#bayaran").prop("disabled", false);
|
||||
$("#bayaran").val(0);
|
||||
|
||||
$('#divtambahpinjaman').hide();
|
||||
$('#divpinjamanbaru').hide();
|
||||
$('#divbayaranditerima').hide();
|
||||
@@ -577,7 +582,10 @@ $("#sltjenistebus").change(function(){
|
||||
case "S":
|
||||
$('input[type="checkbox"]').show();
|
||||
$('span.spannar').hide();
|
||||
|
||||
$("#bayaran").prop("disabled", false);
|
||||
$("#bayaran").val(0);
|
||||
|
||||
$('#divtambahpinjaman').hide();
|
||||
$('#divpinjamanbaru').hide();
|
||||
$('#divbayaranditerima').hide();
|
||||
@@ -605,6 +613,7 @@ $("#sltjenistebus").change(function(){
|
||||
|
||||
|
||||
$("#bayaran").prop("disabled", false);
|
||||
$("#bayaran").val(0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user