관리-도구
편집 파일: 683a22356126da466fee9ca9c7d11af4.php
<?php use Illuminate\Support\Str; ?> <?php $__env->startSection('title', translate('Customer_List')); ?> <?php $__env->startSection('content'); ?> <div class="content container-fluid"> <div class="mb-4"> <h2 class="h1 mb-0 text-capitalize d-flex align-items-center gap-2"> <img width="20" src="<?php echo e(dynamicAsset(path: 'public/assets/back-end/img/customer.png')); ?>" alt=""> <?php echo e(translate('Customer_List')); ?> <span class="badge badge-soft-dark radius-50"><?php echo e($totalCustomers); ?></span> </h2> </div> <div class="card mb-4"> <div class="card-body"> <form action="<?php echo e(url()->current()); ?>" method="GET"> <div class="row align-items-end g-4"> <div class="col-md-4"> <label class="form-label"><?php echo e(translate('Order_Date')); ?></label> <div class="position-relative"> <span class="fi fi-sr-calendar icon-absolute-on-right"></span> <input type="text" name="order_date" class="js-daterangepicker-with-range form-control cursor-pointer" value="<?php echo e(request('order_date')); ?>" placeholder="<?php echo e(translate('Select_Date')); ?>" autocomplete="off" readonly> </div> </div> <div class="col-md-4"> <label class="form-label"><?php echo e(translate('Customer_Joining_Date')); ?></label> <div class="position-relative"> <span class="fi fi-sr-calendar icon-absolute-on-right cursor-pointer"></span> <input type="text" name="customer_joining_date" class="js-daterangepicker-with-range form-control cursor-pointer" value="<?php echo e(request('customer_joining_date')); ?>" placeholder="<?php echo e(translate('Select_Date')); ?>" autocomplete="off" readonly> </div> </div> <div class="col-md-4"> <label class="form-label"><?php echo e(translate('Customer_Status')); ?></label> <div class="select-wrapper"> <select class="form-select set-filter" name="is_active"> <option <?php echo e(!request()->has('is_active') ?'selected':''); ?> disabled><?php echo e(translate('select_status')); ?></option> <option <?php echo e(request()->has('is_active') && request('is_active') == '' ?'selected':''); ?> value=""><?php echo e(translate('All')); ?></option> <option <?php echo e(request('is_active') == '1'?'selected':''); ?> value="1"><?php echo e(translate('Active')); ?></option> <option <?php echo e(request('is_active') == '0'?'selected':''); ?> value="0"><?php echo e(translate('Inactive')); ?></option> </select> </div> </div> <div class="col-md-4"> <label class="form-label"><?php echo e(translate('Sort_By')); ?></label> <div class="select-wrapper"> <select class="form-select" name="sort_by"> <option disabled <?php echo e(is_null(request('sort_by')) ? 'selected' : ''); ?>><?php echo e(translate('Select_Customer_sorting_order')); ?></option> <option value="order_amount"><?php echo e(translate('Sort_By_Order_Amount')); ?></option> <option value="asc" <?php echo e(request('sort_by') === 'asc' ? 'selected' : ''); ?>><?php echo e(translate('Sort_By_Oldest')); ?></option> <option value="desc" <?php echo e(request('sort_by') === 'desc' ? 'selected' : ''); ?>><?php echo e(translate('Sort_By_Newest')); ?></option> </select> </div> </div> <div class="col-md-4"> <label class="form-label"><?php echo e(translate('Choose_First')); ?></label> <input type="number" class="form-control" min="1" value="<?php echo e(request('choose_first')); ?>" placeholder="<?php echo e(translate('Ex')); ?> : <?php echo e(translate('100')); ?>" name="choose_first"> </div> <div class="col-md-4"> <label class="d-md-block"> </label> <div class="d-flex gap-3 justify-content-end"> <a href="<?php echo e(route('admin.customer.list')); ?>" class="btn btn-secondary btn-block"> <?php echo e(translate('reset')); ?> </a> <button type="submit" class="btn btn-primary btn-block"><?php echo e(translate('Filter')); ?></button> </div> </div> </div> </form> </div> </div> <div class="card"> <div class="card-body"> <div class="d-flex flex-wrap justify-content-between gap-3 align-items-center mb-4"> <h3 class="mb-0"> <?php echo e(translate('Customer_List')); ?> <span class="badge badge-info text-bg-info"><?php echo e($customers->total()); ?></span> </h3> <div class="d-flex gap-3 align-items-center flex-wrap"> <form action="<?php echo e(url()->current()); ?>" method="GET"> <div class="form-group"> <div class="input-group"> <input type="hidden" name="order_date" value="<?php echo e(request('order_date')); ?>"> <input type="hidden" name="customer_joining_date" value="<?php echo e(request('customer_joining_date')); ?>"> <input type="hidden" name="is_active" value="<?php echo e(request('is_active')); ?>"> <input type="hidden" name="sort_by" value="<?php echo e(request('sort_by')); ?>"> <input type="hidden" name="choose_first" value="<?php echo e(request('choose_first')); ?>"> <input id="datatableSearch_" type="search" name="searchValue" class="form-control" placeholder="<?php echo e(translate('search_by_Name_or_Email_or_Phone')); ?>" aria-label="Search orders" value="<?php echo e(request('searchValue')); ?>"> <div class="input-group-append search-submit"> <button type="submit"> <i class="fi fi-rr-search"></i> </button> </div> </div> </div> </form> <a type="button" class="btn btn-outline-primary" href="<?php echo e(route('admin.customer.export', ['sort_by' => request('sort_by'), 'choose_first' => request('choose_first'),'is_active' => request('is_active'), 'order_date' => request('order_date'),'customer_joining_date' => request('customer_joining_date'), 'searchValue' => request('searchValue')])); ?>"> <i class="fi fi-sr-inbox-in"></i> <span class="fs-12"><?php echo e(translate('export')); ?></span> </a> </div> </div> <div class="table-responsive datatable-custom"> <table class="table table-hover table-borderless table-thead-bordered table-nowrap table-align-middle card-table w-100"> <thead class="thead-light thead-50 text-capitalize"> <tr> <th><?php echo e(translate('SL')); ?></th> <th><?php echo e(translate('customer_name')); ?></th> <th><?php echo e(translate('contact_info')); ?></th> <th><?php echo e(translate('total_Order')); ?> </th> <th class="text-center"><?php echo e(translate('block')); ?> / <?php echo e(translate('unblock')); ?></th> <th class="text-center"><?php echo e(translate('action')); ?></th> </tr> </thead> <tbody> <?php $__currentLoopData = $customers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$customer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <td> <?php echo e($customers->firstItem()+$key); ?> </td> <td> <a href="<?php echo e(route('admin.customer.view',[$customer['id']])); ?>" class="text-dark text-hover-primary d-flex align-items-center gap-10"> <img src="<?php echo e(getStorageImages(path:$customer->image_full_url,type:'backend-profile')); ?>" class="avatar rounded-circle " alt="" width="40"> <?php echo e(Str::limit($customer['f_name']." ".$customer['l_name'],20)); ?> </a> </td> <td> <div class="mb-1"> <strong><a class="text-dark text-hover-primary" href="mailto:<?php echo e($customer->email); ?>"><?php echo e($customer->email); ?></a></strong> </div> <a class="text-dark text-hover-primary" href="tel:<?php echo e($customer->phone); ?>"><?php echo e($customer->phone); ?></a> </td> <td> <label class="badge badge-info text-bg-info"> <?php echo e($customer?->orders?->count() ?? 0); ?> </label> </td> <td> <?php if($customer['email'] == 'walking@customer.com'): ?> <div class="text-center"> <div class="badge badge-soft-version"><?php echo e(translate('default')); ?></div> </div> <?php else: ?> <form action="<?php echo e(route('admin.customer.status-update')); ?>" method="post" id="customer-status<?php echo e($customer['id']); ?>-form" class="no-reload-form"> <?php echo csrf_field(); ?> <input type="hidden" name="id" value="<?php echo e($customer['id']); ?>"> <label class="switcher mx-auto" for="customer-status<?php echo e($customer['id']); ?>"> <input class="switcher_input custom-modal-plugin" type="checkbox" value="1" name="is_active" id="customer-status<?php echo e($customer['id']); ?>" <?php echo e($customer['is_active'] == 1 ? 'checked':''); ?> data-modal-type="input-change-form" data-modal-form="#customer-status<?php echo e($customer['id']); ?>-form" data-on-image="<?php echo e(dynamicAsset(path: 'public/assets/new/back-end/img/modal/customer-block-on.png')); ?>" data-off-image="<?php echo e(dynamicAsset(path: 'public/assets/new/back-end/img/modal/customer-block-off.png')); ?>" data-on-title = "<?php echo e(translate('want_to_unblock').' '.$customer['f_name'].' '.$customer['l_name'].'?'); ?>" data-off-title = "<?php echo e(translate('want_to_block').' '.$customer['f_name'].' '.$customer['l_name'].'?'); ?>" data-on-message = "<p><?php echo e(translate('if_enabled_this_customer_will_be_unblocked_and_can_log_in_to_this_system_again')); ?></p>" data-off-message = "<p><?php echo e(translate('if_disabled_this_customer_will_be_blocked_and_cannot_log_in_to_this_system')); ?></p>" data-on-button-text="<?php echo e(translate('turn_on')); ?>" data-off-button-text="<?php echo e(translate('turn_off')); ?>"> <span class="switcher_control"></span> </label> </form> <?php endif; ?> </td> <td> <div class="d-flex justify-content-center gap-2"> <a title="<?php echo e(translate('view')); ?>" class="btn btn-outline-info icon-btn" href="<?php echo e(route('admin.customer.view',[$customer['id']])); ?>"> <i class="fi fi-rr-eye"></i> </a> <?php if($customer['id'] != '0'): ?> <a title="<?php echo e(translate('delete')); ?>" class="btn btn-outline-danger delete icon-btn delete-data" href="javascript:" data-id="customer-<?php echo e($customer['id']); ?>"> <i class="fi fi-rr-trash"></i> </a> <?php endif; ?> </div> <form action="<?php echo e(route('admin.customer.delete',[$customer['id']])); ?>" method="post" id="customer-<?php echo e($customer['id']); ?>"> <?php echo csrf_field(); ?> <?php echo method_field('delete'); ?> </form> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </tbody> </table> </div> <div class="table-responsive mt-4"> <div class="px-4 d-flex justify-content-lg-end"> <?php echo $customers->links(); ?> </div> </div> <?php if(count($customers)==0): ?> <?php echo $__env->make('layouts.admin.partials._empty-state',['text'=>'no_customer_found'],['image'=>'default'], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?> <?php endif; ?> </div> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startPush('script'); ?> <script type="text/javascript"> changeInputTypeForDateRangePicker($('input[name="order_date"]')); changeInputTypeForDateRangePicker($('input[name="customer_joining_date"]')); </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('layouts.admin.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home2/slnssare/public_html/resources/views/admin-views/customer/list.blade.php ENDPATH**/ ?>