File: /home/imensosw/.trash/storage.2/framework/views/10bed7cd871fd5c21d6161f055445a512d3b0949.php
<?php $__env->startSection("style"); ?>
<link href="<?php echo e(asset('assets/plugins/datatable/css/dataTables.bootstrap5.min.css')); ?>" rel="stylesheet" />
<?php $__env->stopSection(); ?>
<?php $__env->startSection('pageTitle'); ?>
<title><?php echo e(trans('panel.site_title')); ?> <?php echo e(trans('global.partners')); ?></title>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<!--start page wrapper -->
<div class="page-wrapper">
<div class="page-content">
<!--breadcrumb-->
<div class="page-breadcrumb d-none d-sm-flex align-items-center mb-3">
<div class="breadcrumb-title pe-3"><?php echo e(trans('global.partners')); ?></div>
<div class="ps-3">
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0 p-0">
<li class="breadcrumb-item"><a href="javascript:;"><i class="bx bx-home-alt"></i></a>
</li>
<li class="breadcrumb-item active" aria-current="page"><?php echo e(trans('global.partners')); ?> <?php echo e(trans('global.list')); ?></li>
</ol>
</nav>
</div>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('partner_create')): ?>
<div class="ms-auto">
<div class="btn-group">
<a href="<?php echo e(route("admin.partners.create")); ?>" class="btn btn-outline-primary"><?php echo e(trans('global.add')); ?> <?php echo e(trans('global.partner')); ?></a>
</div>
</div>
<?php endif; ?>
</div>
<!--end breadcrumb-->
<hr/>
<div class="card">
<div class="card-body">
<?php echo $__env->make('layouts/notification', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<div class="table-responsive">
<table class="datatable table table-striped table-bordered" style="width:100%">
<thead>
<tr>
<th>Organization</th>
<th>Url Slug</th>
<th>Partner Name</th>
<th>Type</th>
<th>Logo</th>
<th>Email</th>
<th>Status</th>
<th class="text-center sorting-none" width="50"> </th>
</tr>
</thead>
<tbody>
<?php $count = 0; ?>
<?php $__currentLoopData = $partners; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if(isset($user->org_logo) && !empty($user->org_logo)){ $org_logo = URL::asset('Profile/'.$user->id.'/'.$user->org_logo); }else { $org_logo = URL::asset('images/org_logo.png'); } ?>
<?php $count++; ?>
<tr data-entry-id="<?php echo e($user->id); ?>">
<td><?php echo e($user->org_name); ?></td>
<td><?php echo e($user->slug); ?></td>
<td><?php echo e($user->name); ?></td>
<td><?php if(isset($organizations[$user->org_type])): ?> <?php echo e($organizations[$user->org_type]); ?> <?php else: ?> <?php echo e($user->org_type); ?> <?php endif; ?></td>
<td><img src="<?php echo e($org_logo); ?>" class="org_logo_file" height="40" /></td>
<td><a href="tel:<?php echo e($user->org_contact); ?>" class="btn btn-link"><?php echo e($user->email); ?></a></td>
<td>
<?php if($user->user_status == 1): ?>
<a class="btn btn-outline-success approve_user_id_<?php echo e($user->id); ?>" href="javascript:;"><i class="fadeIn animated bx bx-user-check"></i></a>
<?php else: ?>
<a class="btn btn-outline-warning approve_user_id_<?php echo e($user->id); ?>" href="javascript:;" <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('user_management_access')): ?> onclick="approve_this_user('<?php echo e($user->id); ?>');" <?php endif; ?> ><i class="fadeIn animated bx bx-check-square"></i></a>
<?php endif; ?>
</td>
<td >
<div class="btn-group">
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('partner_show')): ?>
<a class="btn btn-xs btn-outline-primary" href="<?php echo e(route('admin.partners.show', $user->id)); ?>">
<i class="lni lni-eye"></i>
</a>
<?php endif; ?>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('partner_edit')): ?>
<a class="btn btn-xs btn-outline-success" href="<?php echo e(route('admin.partners.edit', $user->id)); ?>">
<i class="fadeIn animated bx bx-edit-alt"></i>
</a>
<?php endif; ?>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('partner_delete')): ?>
<form action="<?php echo e(route('admin.partners.destroy', $user->id)); ?>" method="POST" style="display: inline-block;">
<input type="hidden" name="_method" value="DELETE">
<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
<button type="button" class="btn btn-xs btn-outline-danger" onclick="confirmdelet('<?php echo e($user->id); ?>');"><i class="fadeIn animated bx bx-trash-alt"></i></button>
<button type="submit" class="btn btn-xs btn-outline-danger hide d-none delete_button_<?php echo e($user->id); ?>" ><i class="fadeIn animated bx bx-trash-alt"></i></button>
</form>
<?php endif; ?>
</div>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script src="<?php echo e(asset('assets/plugins/datatable/js/jquery.dataTables.min.js')); ?>"></script>
<script src="<?php echo e(asset('assets/plugins/datatable/js/dataTables.bootstrap5.min.js')); ?>"></script>
<script>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('user_management_access')): ?>
function approve_this_user(user_id){
if(user_id){
swal({
title: "<?php echo e(trans('global.areYouSure')); ?>",
text: "<?php echo e(trans('global.approveUser')); ?>",
icon: "info", //Success, warning, info, error
buttons: true,
dangerMode: true,
})
.then((willComment) => {
if (willComment) {
var postData=new FormData();
postData.append('user_id',user_id);
var url="<?php echo e(route('admin.approve_user')); ?>";
$.ajax({
headers:{'X-CSRF-Token':'<?php echo e(csrf_token()); ?>'},
async:true,
type:"post",
dataType: 'json',
contentType:false,
url:url,
data:postData,
processData:false,
success:function(data){
if(data.status == 'success'){
$('.approve_user_id_'+user_id).removeClass('btn-outline-warning');
$('.approve_user_id_'+user_id).addClass('btn-outline-success');
$('.approve_user_id_'+user_id).removeAttr('onclick');
$('.approve_user_id_'+user_id).find('i').attr('class','fadeIn animated bx bx-user-check');
swal("Done!",data.msg,"success");
}else{
swal("Opps!",data.msg,"error");
}
},
error: function(data, errorThrown)
{
swal("Opps!",errorThrown,"error");
},
});
}
});
}else{
swal("Opps!",'Not Found!',"error");
}
}
<?php endif; ?>
$(document).ready(function(){
$('.datatable').DataTable();
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/imensosw/liftcincy.imenso.co/resources/views/admin/partners/index.blade.php ENDPATH**/ ?>