change alerts

This commit is contained in:
Hafifie PKB
2025-07-06 12:01:48 +08:00
parent 00c4b9d55e
commit 11d4e975a1
4 changed files with 46 additions and 21 deletions
@@ -2838,6 +2838,8 @@
showCancelButton: true,
confirmButtonText: 'Hantar',
cancelButtonText: 'Batal',
allowOutsideClick: false,
allowEscapeKey: false,
inputValidator: (value) => {
if (!value) {
return 'Sila masukkan komen!';
+32 -17
View File
@@ -1,17 +1,35 @@
@if($errorapproval)
<script>
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 jenis = "{{ $errorapproval['mohon'] }}";
if(jenis == 'Hapus Ansuran'){
Swal.fire({
title: 'Tunggu Pengesahan Daripada Khazanah-Operasi.',
icon: 'info',
width: 600,
padding: '3em',
background: '#fffff',
showCancelButton: false,
showConfirmButton: false,
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false
});
}else{
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
})
}
getPusherResponse();
@@ -27,12 +45,9 @@
let ansuranlatest = await fetch(api_url + '/admin/ansuran/getLatest?' + queryString)
.then(response => response.json())
.then(response => {return response});
console.log("Ansuran Latest:", ansuranlatest);
console.log("{{ $errorapproval['norujukan'] }}","{{ $errorapproval['siri'] }}",ansuranlatest['created_at'],ansuranlatest['id']);
try{
let pusherresponse = await PusherResponse("{{ $errorapproval['norujukan'] }}","{{ $errorapproval['siri'] }}",ansuranlatest['created_at'],ansuranlatest['id']);
let pusherresponse = await PusherResponse("{{ $errorapproval['norujukan'] }}","{{ $errorapproval['recno'] }}",ansuranlatest['created_at'],ansuranlatest['id']);
}catch(error){
console.error("Error:", error);