Viewing file: 2379559bf4d20d657266b7bb8ace6a2ac229b24b.php (13.66 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php if(auth()->user()->type =='admin'): ?> <?php $__env->startSection('title',trans('layout.customer')); ?> <?php else: ?> <?php $__env->startSection('title',trans('layout.staff')); ?> <?php endif; ?>
<?php $__env->startSection('css'); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('main-content'); ?> <div class="row page-titles mx-0"> <div class="col-sm-6 p-md-0"> <div class="welcome-text"> <?php if(auth()->user()->type =='admin'): ?> <h4><?php echo e(trans('layout.customer')); ?></h4> <?php else: ?> <h4><?php echo e(trans('layout.staff')); ?></h4> <?php endif; ?> <p class="mb-0"></p> </div> </div> <div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>"><?php echo e(trans('layout.home')); ?></a></li> <?php if(auth()->user()->type =='admin'): ?> <li class="breadcrumb-item active"><a href="javascript:void(0)"><?php echo e(trans('layout.customer')); ?></a></li> <?php else: ?> <li class="breadcrumb-item active"><a href="javascript:void(0)"><?php echo e(trans('layout.staff')); ?></a></li> <?php endif; ?> </ol> </div> </div> <!-- row -->
<div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-header"> <h4 class="card-title"><?php echo e(trans('layout.list')); ?></h4> <div class="pull-right"> <a href="<?php echo e(route('customers.create')); ?>" class="btn btn-sm btn-primary"><?php echo e(trans('layout.create')); ?></a> </div> </div> <div class="card-body"> <div class="table-responsive"> <table class="table table-responsive-md"> <thead> <tr> <th><strong>#</strong></th> <th><strong><?php echo e(trans('layout.name')); ?></strong></th> <?php if(auth()->user()->type =='restaurant_owner'): ?> <th><strong><?php echo e(trans('layout.role')); ?></strong></th> <th><strong><?php echo e(trans('layout.restaurant')); ?></strong></th> <?php endif; ?> <?php if(auth()->user()->type =='admin'): ?> <th><strong><?php echo e(trans('layout.plan_name')); ?></strong></th> <th><strong><?php echo e(trans('layout.expiry_date')); ?></strong></th> <th><strong><?php echo e(trans('layout.plan_status')); ?></strong></th> <th><strong><?php echo e(trans('layout.user_status')); ?></strong></th> <?php else: ?> <th></th> <th></th> <?php endif; ?> <th><strong><?php echo e(trans('layout.action')); ?></strong></th> </tr> </thead> <tbody> <?php $__currentLoopData = $customers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=> $customer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $currentPlan=isset($customer->current_plans[0])?$customer->current_plans[0]:''; ?> <tr> <td><?php echo e(++$key); ?></td> <td><?php echo e($customer->name); ?></td> <?php if(auth()->user()->type =='restaurant_owner'): ?> <td><?php echo e(ucfirst(str_replace('_', ' ', $customer->role))); ?></td> <td><?php echo e($customer->restaurant->name); ?></td> <?php endif; ?>
<?php if(auth()->user()->type=='admin'): ?> <?php if(isset($currentPlan->plan) && $currentPlan->plan->id == 1): ?> <td><?php echo e(trans('layout.choose_a_plan')); ?></td> <?php else: ?> <td><?php echo e($currentPlan?ucwords($currentPlan->plan->title):''); ?></td> <?php endif; ?> <td><?php echo e($currentPlan?$customer->current_plans[0]->expired_date:''); ?></td> <td> <?php if($currentPlan?ucwords($customer->current_plans[0]->status=='approved'):''): ?> <span class="badge light badge-success"><?php echo e(trans('layout.approved')); ?></span> <?php else: ?> <span class="badge light badge-warning"><?php echo e(trans('layout.pending')); ?></span> <?php endif; ?> </td> <td> <?php if($customer->status=='pending'): ?> <span class="badge light badge-info"><?php echo e(trans('layout.pending')); ?></span> <?php elseif($customer->status=='banned'): ?> <span class="badge light badge-warning"><?php echo e(trans('layout.banned')); ?></span> <?php else: ?> <span class="badge light badge-success"><?php echo e(trans('layout.approved')); ?></span> <?php endif; ?> </td> <?php else: ?> <td></td> <td></td> <?php endif; ?> <td> <div class="dropdown"> <button type="button" class="btn btn-success light sharp" data-toggle="dropdown"> <svg width="20px" height="20px" viewBox="0 0 24 24" version="1.1"> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <rect x="0" y="0" width="24" height="24"/> <circle fill="#000000" cx="5" cy="12" r="2"/> <circle fill="#000000" cx="12" cy="12" r="2"/> <circle fill="#000000" cx="19" cy="12" r="2"/> </g> </svg> </button> <div class="dropdown-menu"> <a href="<?php echo e(route('customers.edit',[$customer])); ?>" class="dropdown-item" type="button"><?php echo e(trans('layout.edit')); ?></a> <button class="dropdown-item" type="button" data-message="<?php echo e(trans('layout.message.customer_delete_warning')); ?>" data-action='<?php echo e(route('customers.destroy',[$customer])); ?>' data-input={"_method":"delete"} data-toggle="modal" data-target="#modal-confirm"><?php echo e(trans('layout.delete')); ?></button> <?php if($customer->status == 'approved'): ?> <button class="dropdown-item" type="button" data-message="<?php echo e(trans('layout.message.customer_banned_warning')); ?>" data-action='<?php echo e(route('user.banned',[$customer])); ?>' data-input={"_method":"get","banned_id":"<?php echo e($customer->id); ?>"} data-toggle="modal" data-target="#modal-confirm"><?php echo e(trans('layout.banned')); ?></button> <?php elseif($customer->status == 'banned'): ?> <button class="dropdown-item" type="button" data-message="<?php echo e(trans('layout.message.customer_approved_warning')); ?>" data-action='<?php echo e(route('user.approved',[$customer])); ?>' data-input={"_method":"get","approved_id":"<?php echo e($customer->id); ?>"} data-toggle="modal" data-target="#modal-confirm"><?php echo e(trans('layout.approved')); ?></button> <?php else: ?> <button class="dropdown-item" type="button" data-message="<?php echo e(trans('layout.message.customer_banned_warning')); ?>" data-action='<?php echo e(route('user.banned',[$customer])); ?>' data-input={"_method":"get","banned_id":"<?php echo e($customer->id); ?>"} data-toggle="modal" data-target="#modal-confirm"><?php echo e(trans('layout.banned')); ?></button> <button class="dropdown-item" type="button" data-message="<?php echo e(trans('layout.message.customer_approved_warning')); ?>" data-action='<?php echo e(route('user.approved',[$customer])); ?>' data-input={"_method":"get","approved_id":"<?php echo e($customer->id); ?>"} data-toggle="modal" data-target="#modal-confirm"><?php echo e(trans('layout.approved')); ?></button> <?php endif; ?>
<?php if(auth()->user()->type=='admin'): ?> <?php if(!isset($customer->email_verified_at)): ?> <a class="dropdown-item" href="<?php echo e(route('verified.user', ['id'=>$customer->id])); ?>"><?php echo e(trans('layout.verify')); ?></a> <?php endif; ?> <button class="dropdown-item" type="button" data-message="<?php echo e(trans('layout.message.login_as_warning')); ?>" data-action='<?php echo e(route('restaurant.login.as',['id'=>$customer->id])); ?>' data-input={"_method":"get"} data-toggle="modal" data-target="#modal-confirm"><?php echo e(trans('layout.login_as')); ?></button> <?php endif; ?> </div> </div> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> </div> </div> </div> </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/picotech/domains/multirest.picotech.app/public_html/resources/views/customer/index.blade.php ENDPATH**/ ?>
|