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
+7 -5
View File
@@ -459,13 +459,15 @@ class PenebusanController extends Controller
"jenisAT" => $request->jenisAT,
])->json();
$alirantunai = new AliranTunaiController();
event(new TebusNotify('lulus',Auth::user()->cawangan));
event(new GadaiNotify('lulus',Auth::user()->cawangan));
$alirantunai->alirantunaiTebusAutoTawarruq($request);
return response()->json($updatetebus['data'],200);
if($updatetebus['result'] == 'success'){
$alirantunai = new AliranTunaiController();
event(new TebusNotify('lulus',Auth::user()->cawangan));
event(new GadaiNotify('lulus',Auth::user()->cawangan));
$alirantunai->alirantunaiTebusAutoTawarruq($request);
}
return response()->json($updatetebus['result'],200);
}
public function tebusseparuh(Request $request)
+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);
}