Enable request api/komuditi/batal when hapus gadai

This commit is contained in:
amirhassan
2024-01-22 12:14:23 +08:00
parent 6f4a4b9da6
commit eca3f49fa1
+17 -17
View File
@@ -2307,23 +2307,23 @@
location.reload();
});
// $.ajax({
// method:'put',
// url: api_url + '/api/komuditi/batal',
// dataType:'json',
// data:{
// norujukan: hapusid
// },
// success:function(batalkomuditi){
// swalWithBootstrapButtons.fire(
// 'Hapus!',
// 'Maklumat gadaian telah dihapuskan.',
// 'success'
// ).then(function(){
// location.reload();
// });
// }
// })
$.ajax({
method:'put',
url: api_url + '/api/komuditi/batal',
dataType:'json',
data:{
norujukan: hapusid
},
success:function(batalkomuditi){
swalWithBootstrapButtons.fire(
'Hapus!',
'Maklumat gadaian telah dihapuskan.',
'success'
).then(function(){
location.reload();
});
}
})
},error: function(xhr, status, error) {
var err = eval("(" + xhr.responseText + ")");
alert(xhr.responseText);