Merge branch 'new-super' into afiqhamzah-feat-mykad-reader-registration
This commit is contained in:
@@ -1275,6 +1275,7 @@
|
||||
// mycard-read endpoint initialization
|
||||
let mykad_reader_endpoint = "{{ config('mykad-reader.endpoint') }}";
|
||||
let wakil_caricustomer_endpoint = "{{ route('wakil.caricustomer') }}";
|
||||
let mykad_reader_driver_endpoint = "{{ route('mykadreader.driver.download') }}";
|
||||
</script>
|
||||
<script src="{{ asset('js/iris-mykad-websocket-client-api.js') }}"></script>
|
||||
<script src="{{ asset('js/mykad-reader-customer.js') }}"></script>
|
||||
|
||||
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user