/home/brandsfa/www/storage/framework/views/cd2a02abf6859ed1409ed68666354ed8.php
<?php $__env->startSection('title',translate('deliveryman_List')); ?>

<?php $__env->startSection('content'); ?>
    <div class="content container-fluid">
        <div class="mb-3">
            <h2 class="h1 mb-0 text-capitalize d-flex align-items-center gap-2">
                <img src="<?php echo e(dynamicAsset(path: 'public/assets/back-end/img/deliveryman.png')); ?>" width="20" alt="">
                <?php echo e(translate('delivery_man')); ?> <span class="badge badge-soft-dark radius-50 fz-12"><?php echo e($deliveryMens->total()); ?></span>
            </h2>
        </div>

        <div class="row">
            <div class="col-sm-12 mb-3">
                <div class="card">
                    <div class="px-3 py-4">
                        <div class="d-flex justify-content-between gap-10 flex-wrap align-items-center">
                            <div class="">
                                <form action="<?php echo e(url()->current()); ?>" method="GET">
                                    <div class="input-group input-group-merge input-group-custom">
                                        <div class="input-group-prepend">
                                            <div class="input-group-text">
                                                <i class="tio-search"></i>
                                            </div>
                                        </div>
                                        <input id="datatableSearch_" type="search" name="searchValue" class="form-control"
                                                placeholder="<?php echo e(translate('search')); ?>" aria-label="Search" value="<?php echo e(request('searchValue')); ?>" required>
                                        <button type="submit" class="btn btn--primary"><?php echo e(translate('search')); ?></button>
                                    </div>
                                </form>
                            </div>

                            <div class="d-flex justify-content-end gap-2">
                                <div class="dropdown text-nowrap">
                                    <button type="button" class="btn btn-outline--primary" data-toggle="dropdown">
                                        <i class="tio-download-to"></i>
                                        <?php echo e(translate('export')); ?>

                                        <i class="tio-chevron-down"></i>
                                    </button>

                                    <ul class="dropdown-menu dropdown-menu-right">
                                        <li>
                                            <a type="submit" class="dropdown-item d-flex align-items-center gap-2 " href="<?php echo e(route('admin.delivery-man.export',['searchValue' => request('searchValue')])); ?>">
                                                <img width="14" src="<?php echo e(dynamicAsset(path: 'public/assets/back-end/img/excel.png')); ?>" alt="">
                                                <?php echo e(translate('excel')); ?>

                                            </a>
                                        </li>
                                    </ul>
                                </div>
                                <a href="<?php echo e(route('admin.delivery-man.add')); ?>" class="btn btn--primary text-nowrap">
                                    <i class="tio-add"></i>
                                    <?php echo e(translate('add_Delivery_Man')); ?>

                                </a>
                            </div>
                        </div>
                    </div>
                    <div class="table-responsive datatable-custom">
                        <table class="table table-hover table-borderless table-thead-bordered table-align-middle card-table <?php echo e(Session::get('direction') === 'rtl' ? 'text-right' : 'text-left'); ?>">
                            <thead class="thead-light thead-50 text-capitalize table-nowrap">
                            <tr>
                                <th><?php echo e(translate('SL')); ?></th>
                                <th><?php echo e(translate('name')); ?></th>
                                <th><?php echo e(translate('contact info')); ?></th>
                                <th><?php echo e(translate('total_Orders')); ?></th>
                                <th><?php echo e(translate('rating')); ?></th>
                                <th class="text-center"><?php echo e(translate('status')); ?></th>
                                <th class="text-center"><?php echo e(translate('action')); ?></th>
                            </tr>
                            </thead>

                            <tbody id="set-rows">
                            <?php $__empty_1 = true; $__currentLoopData = $deliveryMens; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $deliveryMen): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                <tr>
                                    <td><?php echo e($deliveryMens->firstitem()+$key); ?></td>
                                    <td>
                                        <div class="media align-items-center gap-10">
                                            <img class="rounded-circle avatar avatar-lg" alt=""
                                                 src="<?php echo e(getValidImage(path: 'storage/app/public/delivery-man/'.$deliveryMen['image'],type:'backend-profile')); ?>">
                                            <div class="media-body">
                                                <a title="Earning Statement"
                                                   class="title-color hover-c1"
                                                   href="<?php echo e(route('admin.delivery-man.earning-statement-overview', ['id' => $deliveryMen['id']])); ?>">
                                                    <?php echo e($deliveryMen['f_name'].' '.$deliveryMen['l_name']); ?>

                                                </a>
                                            </div>
                                        </div>
                                    </td>
                                    <td>
                                        <div class="d-flex flex-column gap-1">
                                            <div><a class="title-color hover-c1" href="mailto:<?php echo e($deliveryMen['email']); ?>"><strong><?php echo e($deliveryMen['email']); ?></strong></a></div>
                                            <a class="title-color hover-c1" href="tel:<?php echo e($deliveryMen['country_code']); ?><?php echo e($deliveryMen['phone']); ?>"><?php echo e($deliveryMen['country_code'].' '. $deliveryMen['phone']); ?></a>
                                        </div>
                                    </td>
                                    <td>
                                        <a href="<?php echo e(route('admin.orders.list', ['all', 'delivery_man_id' => $deliveryMen['id']])); ?>" class="badge fz-14 badge-soft--primary">
                                            <span><?php echo e($deliveryMen->orders_count); ?></span>
                                        </a>
                                    </td>
                                    <td>
                                        <a href="<?php echo e(route('admin.delivery-man.rating', ['id' => $deliveryMen['id']])); ?>" class="badge fz-14 badge-soft-info">
                                            <span><?php echo e(isset($deliveryMen->rating[0]->average) ? number_format($deliveryMen->rating[0]->average, 2, '.', ' ') : 0); ?> <i class="tio-star"></i> </span>
                                        </a>
                                    </td>
                                    <td>

                                        <form action="<?php echo e(route('admin.delivery-man.status-update')); ?>" method="post" id="deliveryman_status<?php echo e($deliveryMen['id']); ?>-form" class="deliveryman_status_form">
                                            <?php echo csrf_field(); ?>
                                            <input type="hidden" name="id" value="<?php echo e($deliveryMen['id']); ?>">
                                            <label class="switcher mx-auto">
                                                <input type="checkbox" class="switcher_input toggle-switch-message" id="deliveryman_status<?php echo e($deliveryMen['id']); ?>" name="status" value="1" <?php echo e($deliveryMen->is_active == 1 ? 'checked':''); ?>

                                                   data-modal-id = "toggle-status-modal"
                                                   data-toggle-id = "deliveryman_status<?php echo e($deliveryMen['id']); ?>"
                                                   data-on-image = "deliveryman-status-on.png"
                                                   data-off-image = "deliveryman-status-off.png"
                                                   data-on-title = "<?php echo e(translate('Want_to_Turn_ON_Deliveryman_Status').'?'); ?>"
                                                   data-off-title = "<?php echo e(translate('Want_to_Turn_OFF_Deliveryman_Status').'?'); ?>"
                                                   data-on-message = "<p><?php echo e(translate('if_enabled_this_deliveryman_can_log_in_to_the_system_and_deliver_products')); ?></p>"
                                                   data-off-message = "<p><?php echo e(translate('if_disabled_this_deliveryman_cannot_log_in_to_the_system_and_deliver_any_products')); ?></p>"
                                                >
                                                <span class="switcher_control"></span>
                                            </label>
                                        </form>
                                    </td>
                                    <td>
                                        <div class="d-flex justify-content-center align-items-center gap-10">
                                            <a  class="btn btn-outline--primary btn-sm edit"
                                                title="<?php echo e(translate('edit')); ?>"
                                                href="<?php echo e(route('admin.delivery-man.edit',[$deliveryMen['id']])); ?>">
                                                <i class="tio-edit"></i></a>
                                            <a title="Earning Statement"
                                               class="btn btn-outline-info btn-sm square-btn"
                                               href="<?php echo e(route('admin.delivery-man.earning-statement-overview', ['id' => $deliveryMen['id']])); ?>">
                                                <i class="tio-money"></i>
                                            </a>
                                            <a class="btn btn-outline-danger btn-sm delete delete-data" href="javascript:"
                                                data-id="delivery-man-<?php echo e($deliveryMen['id']); ?>"
                                                title="<?php echo e(translate('delete')); ?>">
                                                <i class="tio-delete"></i>
                                            </a>
                                            <form action="<?php echo e(route('admin.delivery-man.delete',[$deliveryMen['id']])); ?>"
                                                    method="post" id="delivery-man-<?php echo e($deliveryMen['id']); ?>">
                                                <?php echo csrf_field(); ?> <?php echo method_field('delete'); ?>
                                            </form>
                                        </div>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                <tr>
                                    <td colspan="7">
                                        <div class="text-center p-4">
                                            <img class="mb-3 w-160" src="<?php echo e(dynamicAsset(path: 'public/assets/back-end/svg/illustrations/sorry.svg')); ?>" alt="Image Description">
                                            <p class="mb-0"><?php echo e(translate('no_delivery_man_found')); ?></p>
                                        </div>
                                    </td>
                                </tr>
                            <?php endif; ?>

                            </tbody>
                        </table>
                    </div>
                    <div class="table-responsive mt-4">
                        <div class="px-4 d-flex justify-content-lg-end">
                            <?php echo $deliveryMens->links(); ?>

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

<?php $__env->startPush('script_2'); ?>
    <script src="<?php echo e(dynamicAsset(path: 'public/assets/back-end/js/admin/deliveryman.js')); ?>"></script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.back-end.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/brandsfa/public_html/resources/views/admin-views/delivery-man/list.blade.php ENDPATH**/ ?>