commit error swal fire

This commit is contained in:
hafifierahman
2024-11-18 00:32:06 +08:00
parent 8b1dccb718
commit 89d3084bcd
4 changed files with 63 additions and 32 deletions
+18 -8
View File
@@ -2402,14 +2402,24 @@
var urlroute = '{{ route("resit.autotawarruq", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
Swal.fire(
'Berjaya!',
'Tebus Auto Tawarruq Berjaya',
'success'
) .then(function() {
window.open(urlroute, '_blank');
window.location.replace("{{ route('customer_info') }}");
})
if(success_data == 'success'){
Swal.fire(
'Berjaya!',
'Penyelesaian Pembiayaan Semula Berjaya',
'success'
) .then(function() {
window.open(urlroute, '_blank');
window.location.replace("{{ route('customer_info') }}");
})
}else{
Swal.fire(
'Tidak Berjaya!',
'Penyelesaian Pembiayaan Semula Tidak Berjaya!',
'error'
).then(function(){
window.location.replace("{{ route('customer_info') }}");
});
}
},error: function (request, status, error) {
console.log(request.responseText);
}
@@ -2660,17 +2660,25 @@
},
success:function(success_data){
var urlroute = '{{ route("resit.autotawarruq", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
Swal.fire(
'Berjaya!',
'Penyelesaian Pembiayaan Semula Berjaya',
'success'
) .then(function() {
window.open(urlroute, '_blank');
window.location.replace("{{ route('customer_info') }}");
})
if(success_data == 'success'){
var urlroute = '{{ route("resit.autotawarruq", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
Swal.fire(
'Berjaya!',
'Penyelesaian Pembiayaan Semula Berjaya',
'success'
) .then(function() {
window.open(urlroute, '_blank');
window.location.replace("{{ route('customer_info') }}");
})
}else{
Swal.fire(
'Tidak Berjaya!',
'Penyelesaian Pembiayaan Semula Tidak Berjaya!',
'error'
);
}
},error: function (request, status, error) {
console.log(request.responseText);
}
+19 -8
View File
@@ -3298,14 +3298,25 @@
var urlroute = '{{ route("resit.autotawarruq", ":id") }}';
urlroute = urlroute.replace(':id', norujukan);
Swal.fire(
'Berjaya!',
'Penyelesaian Pembiayaan Semula Berjaya',
'success'
) .then(function() {
window.open(urlroute, '_blank');
window.location.replace("{{ route('customer_info') }}");
})
if(success_data == 'success'){
Swal.fire(
'Berjaya!',
'Penyelesaian Pembiayaan Semula Berjaya',
'success'
) .then(function() {
window.open(urlroute, '_blank');
window.location.replace("{{ route('customer_info') }}");
})
}else{
Swal.fire(
'Tidak Berjaya!',
'Penyelesaian Pembiayaan Semula Tidak Berjaya!',
'error'
).then(function(){
window.location.replace("{{ route('customer_info') }}");
});
}
},error: function (request, status, error) {
console.log(request.responseText);
}