window.addEventListener('note-updated', event => { $('#add_edit_note').modal('hide'); Swal.fire({ icon: 'success', title: "{{ config('env.themes.dreams_tech.swal.success.title') }}", text: "The note was updated successfully!", showConfirmButton: false, timer: {{ config('env.themes.dreams_tech.swal.success.timer') }} }); }); window.addEventListener('note-created', event => { Swal.fire({ title: "Good job!", text: "The note was added successfully!", }); });