<script>
    function deleteItem(url, id) {
        Swal.fire({
            title: '<?php echo e(__("Sure! You want to delete?")); ?>',
            text: "<?php echo e(__("You wont be able to revert this!")); ?>",
            icon: 'warning',
            showCancelButton: true,
            confirmButtonColor: '#3085d6',
            cancelButtonColor: '#d33',
            confirmButtonText: '<?php echo e(__("Yes, Delete It!")); ?>'
        }).then((result) => {
            if (result.value) {
                $.ajax({
                    type: 'POST',
                    url: url,
                    data: { "_token": $('meta[name="csrf-token"]').attr('content')},
                    success: function (data) {
                        toastr.success(data.message);
                        $('#' + id).DataTable().ajax.reload();
                    },
                    error: function (error) {
                        toastr.error(error.responseJSON.message)
                    }
                })
            }
        })
    }
</script>
<?php /**PATH /home6/metawebd/metagrievance.metawebdevelopment.cloud/resources/views/common/common-functions.blade.php ENDPATH**/ ?>