Penambahan Trigger Refresh halaman

This commit is contained in:
Ariyutta
2026-12-01 16:19:49 +07:00
parent 419490e68e
commit ba2b1b6df8
@@ -511,7 +511,10 @@
data, data,
success: function (res) { success: function (res) {
showNotification('success', 'Berhasil', res.message); showNotification('success', 'Berhasil', res.message);
// Form langsung ditutup agar tidak terkirim dua kali selama menunggu halaman dimuat ulang.
tampilkanDetail(res.data, res.state); tampilkanDetail(res.data, res.state);
// Jeda singkat supaya pesan berhasil sempat terbaca.
setTimeout(() => window.location.reload(), 2000);
}, },
error: function (xhr) { error: function (xhr) {
showNotification('error', 'Gagal', ambilPesanError(xhr)); showNotification('error', 'Gagal', ambilPesanError(xhr));