File: /var/www/html/dashboard.orbiwheels.com/storage/framework/views/b0f63fa37238f65142eca97c92dec20d.php
<?php $__env->startSection('content'); ?>
<div class="right_col" role="main">
<div class="">
<div class="clearfix"></div>
<div class="row" style="display: block;">
<div class="col-md-12 col-sm-12 ">
<div class="x_panel">
<div class="x_title">
<h2>Staff<small>List</small></h2>
<ul class="nav navbar-right panel_toolbox">
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('staff.create')): ?>
<li><a href="<?php echo e(route('admin.staff.create')); ?>" class="addBtn"><i class="fa fa-plus"></i> Add</a>
</li>
<?php endif; ?>
</ul>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="row">
<div class="col-sm-12">
<div class="card-box table-responsive">
<?php echo e($dataTable->table()); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('script'); ?>
<?php echo e($dataTable->scripts(attributes: ['type' => 'module'])); ?>
<script>
$(document).ready(function(){
$(document).on('click', '.delete', function(){
var url = $(this).data('url');
Swal.fire({
title: "Are you sure?",
text: "You won't be able to revert this!",
icon: "warning",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Yes, delete it!"
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
method: 'DELETE',
url: url,
data: {
_token: '<?php echo e(csrf_token()); ?>'
},
success: function(response) {
if(response.status){
Swal.fire({
title: "Deleted!",
text: response.message,
icon: "success"
});
$('#users-table').DataTable().ajax.reload();
}else{
Swal.fire({
title: "Error",
text: response.message,
icon: "error"
});
}
},
error: function(xhr, status, error) {
console.log(xhr.responseText);
Swal.fire({
title: "Error",
text: "An error occurred. Please try again later.",
icon: "error"
});
}
});
}
});
});
});
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layout.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/html/dashboard.orbiwheels.com/resources/views/admin/staff/index.blade.php ENDPATH**/ ?>