Merge branch 'Feature#Editing' into 'new-super'

Feature#editing

See merge request online-sistem1/kaunter!220
This commit is contained in:
hafifie rahman
2023-03-01 07:43:15 +00:00
11 changed files with 123 additions and 33 deletions
+97 -7
View File
@@ -863,11 +863,101 @@
function cetaktuntutbaki(e)
{
let norujukan = $(e).data('norujukan');
let urlroute = '{{ route("resit.tuntutbaki", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
window.open(urlroute, '_blank');
const swalWithBootstrapButtons = Swal.mixin({
customClass: {
confirmButton: 'btn btn-success ml-1',
cancelButton: 'btn btn-danger'
},
buttonsStyling: false
});
swalWithBootstrapButtons.fire({
title: 'Dapatkan Pengesahan PC/PPC',
text: "Kelulusan Ulang Cetak Tuntut Baki Lelong",
icon: 'info',
showCancelButton: true,
confirmButtonText: 'Hantar',
cancelButtonText: 'Batal',
reverseButtons: true
}).then((result) => {
if(result.isConfirmed) {
Swal.fire({
title: 'Tunggu Pengesahan Daripada PC/PPC.',
icon: 'info',
width: 600,
padding: '3em',
background: '#fffff',
showCancelButton: false,
showConfirmButton: false,
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false
})
let mohon = "Ulang Cetak Tuntut Baki";
$.ajax({
method:'post',
url: '{{ route("teller.createkelulusan") }}',
data: {
"_token": "{{ csrf_token() }}",
"norujukan" : norujukan,
"mohon" : mohon
},
success:function(data){
},error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);
}
});
let teller = "{{ Auth::user()->name }}";
var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
cluster: 'ap1',
encrypted: true
});
var channel = pusher.subscribe('notice-ubahhapus');
channel.bind('my-ubahhapus', function(data) {
if(data.norujukan == norujukan && data.teller == teller)
{
if(data.kelulusan == 'lulus')
{
Swal.fire({
icon: 'success',
title: 'Telah Disahkan'
}).then(function(){
let urlroute = '{{ route("resit.tuntutbaki", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
window.open(urlroute, '_blank');
});
}
else if(data.kelulusan == 'batal')
{
Swal.fire({
icon: 'warning',
title: 'Telah Dibatalkan',
text: `Komen : ${data.komen}`
}).then(function(){
location.reload();
return false;
});
}
}
});
}else if (result.dismiss === Swal.DismissReason.cancel){
swalWithBootstrapButtons.fire(
'Batal',
'Tidak Berjaya Mendapatkan Pengesahan Khazanah',
'error'
)
}
});
return;
}
@@ -905,7 +995,7 @@
});
swalWithBootstrapButtons.fire({
title: 'Dapatkan Pengesahan Khazanah',
title: 'Dapatkan Pengesahan PC/PPC',
text: "Kelulusan Tuntut Baki Lelong",
icon: 'info',
showCancelButton: true,
@@ -915,7 +1005,7 @@
}).then((result) => {
if(result.isConfirmed) {
Swal.fire({
title: 'Tunggu Pengesahan Daripada Khazanah.',
title: 'Tunggu Pengesahan Daripada PC/PPC.',
icon: 'info',
width: 600,
padding: '3em',
@@ -995,7 +1085,7 @@
Swal.fire({
icon: 'error',
title: 'Amaran',
text: 'Lelongan telah dibayar!'
text: 'Lelongan telah Dituntut!'
});
}
@@ -1285,7 +1375,7 @@
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false,
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
confirmButtonText: '<i class="fa fa-thumbs-up"></i> OK!!',
icon: 'success',
title: 'Berjaya Mendaftar Wakil Pelanggan!'
}).then(function(){
+4 -4
View File
@@ -795,7 +795,7 @@
var pembiyaan_max_pelulus = $('#pembiyaan_max_pelulus').val();
var pembiyaan_max_pelulus = Number(pembiyaan_max_pelulus.replace(/[^0-9.-]+/g,""));
var min_pinjaman = nilai_marhun_total * 0.10;
var max_pinjaman = nilai_marhun_total * 0.80;
var max_pinjaman = pembiyaan_max_pelulus;
let teller = "{{ Auth::user()->name }}";
let bakiakhir = 0;
@@ -857,7 +857,7 @@
return false;
}
else{
if(pinjaman >=10000){
if(pinjaman >=10000 && pinjaman <= Number(pembiyaan_max_pelulus)){
const swalWithBootstrapButtons = Swal.mixin({
customClass: {
confirmButton: 'btn btn-success',
@@ -975,7 +975,7 @@
event.preventDefault();
return false;
}else if(pinjaman > Number(pembiayaan_max_teller)+10){
}else if(pinjaman > Number(pembiayaan_max_teller)){
const swalWithBootstrapButtons = Swal.mixin({
customClass: {
confirmButton: 'btn btn-success',
@@ -1091,7 +1091,7 @@
event.preventDefault();
return false;
}
else if(pinjaman < 10000){
else if(pinjaman < 10000 && pinjaman <= Number(pembiayaan_max_teller)){
Swal.fire({
icon: 'success',
title: 'Berjaya!',
+3 -3
View File
@@ -690,7 +690,7 @@
var pembiyaan_max_pelulus = $('#pembiyaan_max_pelulus').val();
var pembiyaan_max_pelulus = Number(pembiyaan_max_pelulus.replace(/[^0-9.-]+/g,""));
var min_pinjaman = nilai_marhun_total * 0.10;
var max_pinjaman = nilai_marhun_total * 0.80;
var max_pinjaman = pembiyaan_max_pelulus;
var outstanding_semasa = Number("{{ $outstanding_semasa }}");
let teller = "{{ Auth::user()->name }}";
@@ -796,7 +796,7 @@
return false;
}
else{
if(pinjaman >= 10000){
if(pinjaman >= 10000 && pinjaman <= Number(pembiyaan_max_pelulus)){
const swalWithBootstrapButtons = Swal.mixin({
customClass: {
confirmButton: 'btn btn-success',
@@ -1039,7 +1039,7 @@
event.preventDefault();
return false;
}
else if( pinjaman < 10000){
else if( pinjaman < 10000 && pinjaman <= Number(pembiayaan_max_teller)){
Swal.fire({
icon: 'success',
title: 'Berjaya!',
@@ -233,9 +233,6 @@
class="btn btn-info btn-lg btn-block mb-3">Kelulusan</a>
</div>
{{-- <div class="row">
<a href="#" class="btn btn-danger btn-lg btn-block mb-3">Bajet</a>
</div> --}}
{{-- <div class="row">
<a href="{{ url('permohonan') }}" class="btn btn-danger btn-lg btn-block mb-3">Permohonan</a>
</div> --}}
<div class="row">
@@ -275,6 +272,9 @@
<a href="{{ url('alirantunai') }}" class="btn btn-info btn-lg btn-block mb-3">Aliran
Tunai</a>
</div>
{{-- <div class="row">
<a href="{{ route('khazanah.bajet') }}" class="btn btn-info btn-lg btn-block mb-3">Bajet</a>
</div> --}}
</div>
</div>
+6 -6
View File
@@ -16,9 +16,9 @@
<div class="card-body text-center">
<div class="row justify-content-center">
<div class="d-flex">
<div id="divpembharian" class="card bg-light mb-3 col-4">
<div id="divpembharian" class="card bg-light mb-3 col-4 mr-1">
<div class="card-header font-weight-bold">Pembiayaan</div>
<div class="card-body">
<div class="progress mb-2">
@@ -47,7 +47,7 @@
</div>
</div>
<div class="card bg-light mb-3 col-4">
<div class="card bg-light mb-3 col-4 mr-1">
<div class="card-header font-weight-bold">Penebusan</div>
<div class="card-body">
<div class="progress mb-2">
@@ -108,8 +108,8 @@
<div class="mt-3">
<div class="row justify-content-center">
<div class="card bg-light mb-3 col-4">
<div class="d-flex justify-content-center">
<div class="card bg-light mb-3 col-4 mr-1">
<span class="font-weight-bold mt-2 mb-2">Pembiayaan Bulanan</span>
<div class="card-body">
<div id="chartpembiayaan">
@@ -117,7 +117,7 @@
</div>
</div>
<div class="card bg-light mb-3 col-4">
<div class="card bg-light mb-3 col-4 mr-1">
<span class="font-weight-bold mt-2 mb-2">Penebusan Bulanan</span>
<div class="card-body">
<div id="chartpenebusan">
+1 -1
View File
@@ -1007,7 +1007,7 @@
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false,
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
confirmButtonText: '<i class="fa fa-thumbs-up"></i> OK!!',
icon: 'success',
title: 'Berjaya Mendaftar Wakil Pelanggan!'
}).then(function(){
@@ -250,7 +250,7 @@
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false,
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
confirmButtonText: '<i class="fa fa-thumbs-up"></i> OK!!',
icon: 'success',
title: 'Maklumat Anda Berjaya Direkodkan!',
html: '<b class="text-danger">' + data.nama + '</b><br><b class="text-danger">' + data.nokp + '</b>'
@@ -403,7 +403,7 @@
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false,
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
confirmButtonText: '<i class="fa fa-thumbs-up"></i> OK!!',
icon: 'success',
title: 'Berjaya Mendaftar Wakil Pelanggan!'
}).then(function(){
+2 -2
View File
@@ -250,7 +250,7 @@
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false,
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
confirmButtonText: '<i class="fa fa-thumbs-up"></i> OK!!',
icon: 'success',
title: 'Maklumat Anda Berjaya Direkodkan!',
html: '<b class="text-danger">' + data.nama + '</b><br><b class="text-danger">' + data.nokp + '</b>'
@@ -403,7 +403,7 @@
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false,
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
confirmButtonText: '<i class="fa fa-thumbs-up"></i> OK!!',
icon: 'success',
title: 'Berjaya Mendaftar Wakil Pelanggan!'
}).then(function(){
@@ -923,7 +923,7 @@
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false,
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
confirmButtonText: '<i class="fa fa-thumbs-up"></i> OK!!',
icon: 'success',
title: 'Maklumat Anda Berjaya Direkodkan!',
html: '<b class="text-danger">' + data.nama + '</b><br><b class="text-danger">' + data.nokp + '</b>'
@@ -988,7 +988,7 @@
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false,
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
confirmButtonText: '<i class="fa fa-thumbs-up"></i> OK!!',
icon: 'success',
title: 'Berjaya Mendaftar Wakil Pelanggan!'
}).then(function(){
+2 -2
View File
@@ -2689,7 +2689,7 @@
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false,
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
confirmButtonText: '<i class="fa fa-thumbs-up"></i> OK!!',
icon: 'success',
title: 'Maklumat Anda Berjaya Direkodkan!',
html: '<b class="text-danger">' + data.nama + '</b><br><b class="text-danger">' + data.nokp + '</b>'
@@ -2842,7 +2842,7 @@
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false,
confirmButtonText: '<i class="fa fa-thumbs-up"></i> Baik Boss!',
confirmButtonText: '<i class="fa fa-thumbs-up"></i> OK!!',
icon: 'success',
title: 'Berjaya Mendaftar Wakil Pelanggan!'
}).then(function(){
@@ -272,7 +272,7 @@
@php $counter = 1;$totalpinjamanasalteller = 0;$totalpinjamanteller = 0;$totalupahteller = 0;$totalbayaranteller = 0;$totaljumlahteller = 0; @endphp
@endif
@else
<tr class="new-page">
<tr>
<td colspan="7"><b>{{ $counter-1 }}</b> Jumlah Bagi Teller : <b>{{ $item['teller'] }}</b></td>
<td><b>{{ number_format($totalnmteller,2) }}</b></td>
<td><b>{{ number_format($totalpinjamanasalteller,2) }} </b></td>