<script type="text/javascript">
    $(document).ready(function() {
        // Cek Session Error dari Laravel
        <?php if(session('error')): ?>
            if (typeof jAlert === "function") {
                jAlert("<?php echo e(session('error')); ?>", 'Peringatan');
            } else {
                alert("<?php echo e(session('error')); ?>");
            }
        <?php endif; ?>

        // Cek Session Success (Optional, buat jaga-jaga)
        <?php if(session('success')): ?>
            if (typeof jAlert === "function") {
                jAlert("<?php echo e(session('success')); ?>", 'Berhasil');
            } else {
                alert("<?php echo e(session('success')); ?>");
            }
        <?php endif; ?>
        
        // Cek Error Validasi (jika ada input form yang salah)
        <?php if($errors->any()): ?>
            if (typeof jAlert === "function") {
                jAlert("<?php echo e($errors->first()); ?>", 'Peringatan');
            } else {
                alert("<?php echo e($errors->first()); ?>");
            }
        <?php endif; ?>
    });
</script><?php /**PATH /home/mxzsceue/public_html/resources/views/frontend/partials/alerts.blade.php ENDPATH**/ ?>