adaptasi toastr dan delete showjs.blade.php

This commit is contained in:
Andy Chaerudin
2024-10-22 11:59:51 +07:00
parent 1157428f3f
commit e11f42c2ca
6 changed files with 129 additions and 193 deletions

View File

@@ -38,11 +38,23 @@
// }
},
success: function(response) {
console.log(response);
if ('success' == response.status)
{
$("#textReg").text(response.datas.nomor_registrasi);
setJenisPenilaianList(response.jenisPenilaians,0);
setRegionList(response.regions,0);
$("#textReg").text(response.datas.nomor_registrasi);
setJenisPenilaianList(response.jenisPenilaians,0);
setRegionList(response.regions,0);
// success
// var message = response.message;
// toastrku("success", message);
}
else if('error' == response.status)
{
var message = response.message;
toastrku("error", message);
}
},
error: function(xhr) {
},
@@ -152,8 +164,14 @@
else
{
//toastr.success(response.message);
var url = "{{ route('registrasi.index') }}";
$(location).attr('href',url);
var message = response.message;
toastrku("success", message);
setTimeout(function () {
var url = "{{ route('registrasi.index') }}";
$(location).attr('href',url);
// window.location.href = "https://www.newurl.com";
}, 2000);
}
},
@@ -189,10 +207,5 @@
}
});
/*
$('#{{$route[0]}}_jenis_penilaian').on('change', function() {
console.log( this.value );
});
*/
</script>
@endpush