<?php if (isset($component)) { $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\AdminPanelLayout::class, []); ?>
<?php $component->withName('admin-panel-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('title'); ?>
        لیست متخصص های این خدمت
     <?php $__env->endSlot(); ?>
     <?php $__env->slot('main'); ?>
        <!-- Checked checkbox -->
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0 text-dark">لیست متخصص های این خدمت</h1>
                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-left">

                            <li class="breadcrumb-item">مدیریت سفارشات خدمات</li>
                            <li class="breadcrumb-item active">لیست متخصص های این خدمت</li>
                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <section class="content mt-sm-3">
            <div class="card">
                <div class="card-header">
                    <h3 class="card-title">متخصص های این خدمت</h3>
                </div>
                <!-- /.card-header -->
                <div class="card-body p-0">
                    <div class="alert alert-success col-md-11 mx-auto mt-2 d-none" role="alert" id="alertDelUser">
                        متخصص خدمات با موفقیت حذف گردید
                    </div>
                    <form class="d-flex justify-content-around mt-3 mb-1" action="<?php echo e(route('users.index')); ?>">
                        <div class="form-row align-items-center">
                            <div class="col-4 my-1">
                                <select name="filter" class="custom-select mr-sm-2" id="inlineFormCustomSelect">
                                    <option selected hidden>بر اساس</option>
                                    <option value="id">آیدی</option>
                                </select>
                            </div>
                            <div class="col-4 my-1">
                                <input name="value" type="text" class="form-control" id="inlineFormInputName"
                                       placeholder="مقدار" value="<?php echo e(old('value',request()->value)); ?>">
                            </div>
                            <div class="col-auto my-1 col-4">
                                <button type="submit" class=" btn btn-outline-info">جستجو</button>
                            </div>
                        </div>
                    </form>

                    <div class="tableSection bg-light smSmall p-0 pr-sm-4 pl-sm-4 pt-sm-4 pb-0 table-responsive">
                        <p>متخصص پیشنهادی</p>
                        <div class="d-flex flex-wrap">
                            <?php $__currentLoopData = $experts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $expert): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php if($expert->services->where('id',$order_service->service->id)->count() > 0 && $expert->regions->where('id',$order_service->region->id)->count() > 0): ?>
                                    <div class="card col-sm-3 ml-2">
                                        <?php if($expert->profile_pic): ?>
                                            <img class="card-img-top rounded rounded mt-1" style="height: 45%"
                                                 src="<?php echo e($expert->thumb()); ?>">
                                        <?php else: ?>
                                            <p class="p-2 mx-auto">بدون عکس</p>
                                        <?php endif; ?>
                                        <div class="card-body p-1 d-flex flex-column justify-content-between">
                                            <p class="card-text">
                                            <div class="small">
                                                <?php echo e($expert->mobile); ?>-
                                                <?php echo e($expert->name ?? "-"); ?>

                                                <?php echo e($expert->lname ?? "-"); ?>

                                            </div>
                                            <div class="">
                                                <span class="small">مناطق : </span>
                                                <?php $__currentLoopData = $expert->regions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $region): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <span class="small">
                                            <?php echo e($region->name); ?>

                                            </span>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </div>
                                            <div class="">
                                                <span class="small">تخصص ها : </span>
                                                <?php $__currentLoopData = $expert->services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <span class="small">
                                            <?php echo e($service->name); ?>

                                        </span>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </div>
                                        </div>
                                            <?php if($expert->status != Mehrab\User\Models\User::NOT_AVAILABLE && $expert->status != Mehrab\User\Models\User::BAN): ?>
                                                <button class="btn btn-outline-primary btn-sm mb-1 btn-block" onclick="choosePerson(event,<?php echo e($expert->id); ?>)">انتخاب</button>
                                                <form method="post" id="person_<?php echo e($expert->id); ?>" action="<?php echo e(route('choose_expert.store',[$order_service->id,$expert->id])); ?>" >
                                                    <?php echo csrf_field(); ?>
                                                    <input id="message_<?php echo e($expert->id); ?>" type="hidden" name="message" />
                                                </form>
                                            <?php else: ?>
                                                <button class="btn btn-warning disabled btn-sm mb-1 btn-block">فعلا در دسترس نیست</button>
                                            <?php endif; ?>
                                    </div>
                                <?php endif; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>

                        <p>متخصص های دیگر</p>
                        <div class="d-flex flex-wrap">
                            <?php $__currentLoopData = $experts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $expert): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php if($expert->services->where('id',$order_service->service->id)->count() == 0 || $expert->regions->where('id',$order_service->region->id)->count() == 0): ?>
                                    <div class="card col-sm-3 ml-2">
                                        <?php if($expert->profile_pic): ?>
                                            <img class="card-img-top rounded rounded mt-1" style="height: 45%"
                                                 src="<?php echo e($expert->thumb()); ?>">
                                        <?php else: ?>
                                            <p class="p-2 mx-auto">بدون عکس</p>
                                        <?php endif; ?>
                                        <div class="card-body p-1 d-flex flex-column justify-content-between">
                                            <p class="card-text">
                                            <div class="small">
                                                <?php echo e($expert->mobile); ?>-
                                                <?php echo e($expert->name ?? "-"); ?>

                                                <?php echo e($expert->lname ?? "-"); ?>

                                            </div>
                                            <div class="">
                                                <span class="small">مناطق : </span>
                                                <?php $__currentLoopData = $expert->regions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $region): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <span class="small">
                                            <?php echo e($region->name); ?>

                                            </span>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </div>
                                            <div class="">
                                                <span class="small">تخصص ها : </span>
                                                <?php $__currentLoopData = $expert->services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <span class="small">
                                            <?php echo e($service->name); ?>

                                        </span>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </div>
                                        </div>
                                            <?php if($expert->status != Mehrab\User\Models\User::NOT_AVAILABLE && $expert->status != Mehrab\User\Models\User::BAN): ?>
                                            <button class="btn btn-outline-primary btn-sm mb-1 btn-block" onclick="choosePerson(event,<?php echo e($expert->id); ?>)">انتخاب</button>
                                            <form method="post" id="person_<?php echo e($expert->id); ?>" action="<?php echo e(route('choose_expert.store',[$order_service->id,$expert->id])); ?>" >
                                                <?php echo csrf_field(); ?>
                                                <input id="message_<?php echo e($expert->id); ?>" type="hidden" name="message" />
                                            </form>
                                            <?php else: ?>
                                                <button class="btn btn-warning disabled btn-sm mb-1 btn-block">فعلا در دسترس نیست</button>
                                            <?php endif; ?>
                                    </div>
                                <?php endif; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>

                    </div>

                </div>
                <!-- /.card-body -->
            </div>
        </section>
     <?php $__env->endSlot(); ?>
    <?php if(session()->get('status') == 'done'): ?>
         <?php $__env->slot('linkScript'); ?>
            <script>
                Swal.fire({
                    icon: 'success',
                    text: 'ویرایش جزئیات سفارش با موفقیت انجام شد',
                })
            </script>
         <?php $__env->endSlot(); ?>
    <?php endif; ?>
    <?php if(session()->get('status') == 'failed'): ?>
         <?php $__env->slot('linkScript'); ?>
            <script>
                Swal.fire({
                    icon: 'error',
                    text: 'انتخاب سرتیم سفارش با خطا مواجه شد',
                })
            </script>
         <?php $__env->endSlot(); ?>
    <?php endif; ?>
 <?php if (isset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5)): ?>
<?php $component = $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5; ?>
<?php unset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5); ?>
<?php endif; ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\newer\Modules\Mehrab\OrderService\Providers/../Resources/Views//Admin/TeamLeader/list_experts_order_service.blade.php ENDPATH**/ ?>
