

<?php $__env->startSection('title'); ?>
<title><?php echo e(__('admin.Agent Details')); ?></title>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('admin-content'); ?>
      <!-- Main Content -->
      <div class="main-content">
        <section class="section">
          <div class="section-header">
            <h1><?php echo e(__('admin.Agent Details')); ?></h1>

          </div>

          <div class="section-body">
            <a href="<?php echo e(route('admin.our-agent')); ?>" class="btn btn-primary"><i class="fas fa-list"></i> <?php echo e(__('admin.Our Agent')); ?></a>
            <div class="row mt-4">
                <div class="col">
                  <div class="card">
                    <div class="card-body">
                      <div class="table-responsive table-invoice">
                        <table class="table table-striped table-bordered">
                            <tr>
                                <td><?php echo e(__('admin.Image')); ?></td>
                                <td>
                                    <?php if($customer->image): ?>
                                    <img src="<?php echo e(asset($customer->image)); ?>" class="rounded-circle" alt="" width="80px">
                                    <?php endif; ?>
                                </td>
                            </tr>
                            <tr>
                                <td><?php echo e(__('admin.Name')); ?></td>
                                <td><?php echo e($customer->name); ?></td>
                            </tr>
                            <tr>
                                <td><?php echo e(__('admin.Email')); ?></td>
                                <td><?php echo e($customer->email); ?></td>
                            </tr>
                            <tr>
                                <td><?php echo e(__('admin.Phone')); ?></td>
                                <td><?php echo e($customer->phone); ?></td>
                            </tr>
                            <tr>
                                <td><?php echo e(__('admin.Address')); ?></td>
                                <td><?php echo e($customer->address); ?></td>
                            </tr>

                            <?php if($customer->facebook): ?>
                            <tr>
                                <td><?php echo e(__('admin.Facebook')); ?></td>
                                <td><a href="<?php echo e($customer->facebook); ?>"><?php echo e($customer->facebook); ?> </a></td>
                            </tr>
                            <?php endif; ?>
                            <?php if($customer->twitter): ?>
                            <tr>
                                <td><?php echo e(__('admin.Twitter')); ?></td>
                                <td><a href="<?php echo e($customer->twitter); ?>"><?php echo e($customer->twitter); ?> </a></td>
                            </tr>
                            <?php endif; ?>
                            <?php if($customer->linkedin): ?>
                            <tr>
                                <td><?php echo e(__('admin.Linkedin')); ?></td>
                                <td><a href="<?php echo e($customer->linkedin); ?>"><?php echo e($customer->linkedin); ?> </a></td>
                            </tr>
                            <?php endif; ?>
                            <?php if($customer->whatsapp): ?>
                            <tr>
                                <td><?php echo e(__('admin.Whatsapp')); ?></td>
                                <td><a href="<?php echo e($customer->whatsapp); ?>"><?php echo e($customer->whatsapp); ?> </a></td>
                            </tr>
                            <?php endif; ?>

                            <?php if($customer->website): ?>
                            <tr>
                                <td><?php echo e(__('admin.Website')); ?></td>
                                <td><a href="<?php echo e($customer->website); ?>"><?php echo e($customer->website); ?> </a></td>
                            </tr>
                            <?php endif; ?>


                            <tr>
                                <td><?php echo e(__('admin.Status')); ?></td>
                                <td>
                                    <?php if($customer->status == 1): ?>
                                        <a href="javascript:;" onclick="manageCustomerStatus(<?php echo e($customer->id); ?>)">
                                            <input id="status_toggle" type="checkbox" checked data-toggle="toggle" data-on="<?php echo e(__('admin.Active')); ?>" data-off="<?php echo e(__('admin.InActive')); ?>" data-onstyle="success" data-offstyle="danger">
                                        </a>
                                        <?php else: ?>
                                        <a href="javascript:;" onclick="manageCustomerStatus(<?php echo e($customer->id); ?>)">
                                            <input id="status_toggle" type="checkbox" data-toggle="toggle" data-on="<?php echo e(__('admin.Active')); ?>" data-off="<?php echo e(__('admin.InActive')); ?>" data-onstyle="success" data-offstyle="danger">
                                        </a>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>
                      </div>
                    </div>
                  </div>
                </div>
          </div>
        </section>
      </div>

<script>
    function manageCustomerStatus(id){
        var isDemo = "<?php echo e(env('PROJECT_MODE')); ?>"
        if(isDemo == 0){
            toastr.error('This Is Demo Version. You Can Not Change Anything');
            return;
        }
        $.ajax({
            type:"put",
            data: { _token : '<?php echo e(csrf_token()); ?>' },
            url:"<?php echo e(url('/admin/user-status/')); ?>"+"/"+id,
            success:function(response){
                toastr.success(response)
            },
            error:function(err){
                console.log(err);

            }
        })
    }
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.master_layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/fwvrhhfw/topriserealtors.com/resources/views/admin/show_agent.blade.php ENDPATH**/ ?>